252 lines
16 KiB
HTML
252 lines
16 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock html_lang %}">
|
||
|
|
||
|
<head>
|
||
|
{% block head %}
|
||
|
<meta charset="utf-8" />
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
|
<meta name="generator" content="Pelican" />
|
||
|
<title>{% block title %} {{ SITENAME }} {% endblock %}</title>
|
||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" />
|
||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Slab|Ruda" />
|
||
|
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/main.css" />
|
||
|
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/stork.css">
|
||
|
<link rel="stylesheet" media="screen and (prefers-color-scheme: dark)"
|
||
|
href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/stork-dark.css">
|
||
|
{% if FEED_ALL_ATOM %}
|
||
|
<link
|
||
|
href="{{ FEED_DOMAIN }}/{% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}"
|
||
|
type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" />
|
||
|
{% endif %}
|
||
|
{% if FEED_ALL_RSS %}
|
||
|
<link
|
||
|
href="{{ FEED_DOMAIN }}/{% if FEED_ALL_RSS_URL %}{{ FEED_ALL_RSS_URL }}{% else %}{{ FEED_ALL_RSS }}{% endif %}"
|
||
|
type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
|
||
|
{% endif %}
|
||
|
{% block extra_head %}{% endblock extra_head %}
|
||
|
{% endblock head %}
|
||
|
<script>
|
||
|
if (localStorage.getItem('color-theme') === 'dark' || (!('color-theme' in localStorage) && window.matchMedia(
|
||
|
'(prefers-color-scheme: dark)').matches)) {
|
||
|
document.documentElement.classList.add('dark');
|
||
|
} else {
|
||
|
document.documentElement.classList.remove('dark')
|
||
|
}
|
||
|
</script>
|
||
|
</head>
|
||
|
|
||
|
<body class="min-h-screen flex flex-col max-w-7xl lg:max-w-none text-zinc-800 bg-neutral-100
|
||
|
dark:bg-neutral-900 dark:text-zinc-300 container mx-auto justify-center md:px-3 ">
|
||
|
<nav class="sm:flex sm:justify-between xl:ml-32 pl-4 items-center">
|
||
|
<div class="flex pt-4">
|
||
|
<h1 class="font-semibold text-2xl"><a href="{{ SITEURL }}/">{{ SITENAME }}</a></h1>
|
||
|
<button id="theme-toggle" type="button"
|
||
|
class="text-zinc-700 dark:text-zinc-400 rounded-full focus:outline-none text-sm ml-2 p-1">
|
||
|
<svg id="theme-toggle-dark-icon" class="w-5 h-5 hidden" fill="currentColor" viewBox="0 0 20 20"
|
||
|
xmlns="http://www.w3.org/2000/svg">
|
||
|
<path d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"></path>
|
||
|
</svg>
|
||
|
<svg id="theme-toggle-light-icon" class="w-5 h-5 hidden" fill="currentColor" viewBox="0 0 20 20"
|
||
|
xmlns="http://www.w3.org/2000/svg">
|
||
|
<path
|
||
|
d="M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z"
|
||
|
fill-rule="evenodd" clip-rule="evenodd"></path>
|
||
|
</svg>
|
||
|
</button>
|
||
|
</div>
|
||
|
<ul class="flex flex-wrap lg:mr-24 md:pt-0">
|
||
|
{% if DISPLAY_PAGES_ON_MENU %}
|
||
|
{% for p in pages %}
|
||
|
<li class="mr-4 pt-6"><a {% if p==page %} class="border-b-2 border-zinc-800 dark:border-zinc-300"
|
||
|
{% endif %} href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
|
||
|
{% endfor %}
|
||
|
{% endif %}
|
||
|
<li class="mr-4 pt-6"><a {% if current=="archive" %} class="border-b-2 border-zinc-800 dark:border-zinc-300"
|
||
|
{% endif %} href="{{ SITEURL }}/archives.html">Archive</a></li>
|
||
|
<li class="mr-4 pt-6"><a {% if current=="categories" %}
|
||
|
class="border-b-2 border-zinc-800 dark:border-zinc-300" {% endif %}
|
||
|
href="{{ SITEURL }}/categories.html">Categories</a></li>
|
||
|
<li class="mr-4 pt-6"><a {% if current=="tags" %} class="border-b-2 border-zinc-800 dark:border-zinc-300"
|
||
|
{% endif %} href="{{ SITEURL }}/tags.html">Tags</a></li>
|
||
|
<li class="mr-4 pt-6"><a {% if current=="search" %} class="border-b-2 border-zinc-800 dark:border-zinc-300"
|
||
|
{% endif %} href="{{ SITEURL }}/search.html">Search</a></li>
|
||
|
</ul>
|
||
|
</nav>
|
||
|
<div class="flex-grow md:max-w-screen-md md:mx-auto md:w-3/4 px-4">
|
||
|
{% if article %}
|
||
|
<nav class="text-zinc-800 dark:text-zinc-300 mt-12 pb-2 md:mt-16" aria-label="Breadcrumb">
|
||
|
<ul class="p-0 inline-flex items-center">
|
||
|
<li class="flex items-center">
|
||
|
<a href="{{ SITEURL }}/" class="text-zinc-800 dark:text-zinc-300 inline-flex items-center">
|
||
|
<svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20"
|
||
|
xmlns="http://www.w3.org/2000/svg">
|
||
|
<path
|
||
|
d="M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z">
|
||
|
</path>
|
||
|
</svg>
|
||
|
Home
|
||
|
</a>
|
||
|
<svg class="fill-current w-3 h-3 mr-2 ml-1" xmlns="http://www.w3.org/2000/svg"
|
||
|
viewBox="0 0 320 512">
|
||
|
<path
|
||
|
d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z" />
|
||
|
</svg>
|
||
|
</li>
|
||
|
<li class="flex items-center">
|
||
|
<a href="{{ SITEURL }}/categories.html">Categories</a>
|
||
|
<svg class="fill-current w-3 h-3 mr-2 ml-1" xmlns="http://www.w3.org/2000/svg"
|
||
|
viewBox="0 0 320 512">
|
||
|
<path
|
||
|
d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z" />
|
||
|
</svg>
|
||
|
</li>
|
||
|
<li class="flex items-center">
|
||
|
<a href="{{ SITEURL }}/{{category.url}}">{{ category }}</a>
|
||
|
</li>
|
||
|
<svg class="fill-current w-3 h-3 mr-2 ml-1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
|
||
|
<path
|
||
|
d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z" />
|
||
|
</svg>
|
||
|
</ul>
|
||
|
</nav>
|
||
|
{% elif tag %}
|
||
|
<nav class="text-zinc-800 dark:text-zinc-300 mt-12 pb-3 md:mt-16" aria-label="Breadcrumb">
|
||
|
<ul class="p-0 inline-flex">
|
||
|
<li class="flex items-center">
|
||
|
<a href="{{ SITEURL }}/" class="text-zinc-800 dark:text-zinc-300 inline-flex items-center">
|
||
|
<svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20"
|
||
|
xmlns="http://www.w3.org/2000/svg">
|
||
|
<path
|
||
|
d="M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z">
|
||
|
</path>
|
||
|
</svg>
|
||
|
Home
|
||
|
</a>
|
||
|
<svg class="fill-current w-3 h-3 mr-2 ml-1" xmlns="http://www.w3.org/2000/svg"
|
||
|
viewBox="0 0 320 512">
|
||
|
<path
|
||
|
d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z" />
|
||
|
</svg>
|
||
|
</li>
|
||
|
<li class="flex items-center">
|
||
|
<a href="{{ SITEURL }}/tags.html">Tags</a>
|
||
|
<svg class="fill-current w-3 h-3 mr-2 ml-1" xmlns="http://www.w3.org/2000/svg"
|
||
|
viewBox="0 0 320 512">
|
||
|
<path
|
||
|
d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z" />
|
||
|
</svg>
|
||
|
</li>
|
||
|
<li class="border-b-2 border-zinc-800 dark:border-zinc-300">
|
||
|
{{ tag }}
|
||
|
</li>
|
||
|
</ul>
|
||
|
</nav>
|
||
|
{% elif page %}
|
||
|
<nav class="text-zinc-800 dark:text-zinc-300 mt-12 pb-3 md:mt-16" aria-label="Breadcrumb">
|
||
|
<ul class="p-0 inline-flex">
|
||
|
<li class="flex items-center">
|
||
|
<a href="{{ SITEURL }}/" class="text-zinc-800 dark:text-zinc-300 inline-flex items-center">
|
||
|
<svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20"
|
||
|
xmlns="http://www.w3.org/2000/svg">
|
||
|
<path
|
||
|
d="M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z">
|
||
|
</path>
|
||
|
</svg>
|
||
|
Home
|
||
|
</a>
|
||
|
<svg class="fill-current w-3 h-3 mr-2 ml-1" xmlns="http://www.w3.org/2000/svg"
|
||
|
viewBox="0 0 320 512">
|
||
|
<path
|
||
|
d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z" />
|
||
|
</svg>
|
||
|
</li>
|
||
|
<li class="border-b-2 border-zinc-800 dark:border-zinc-300">
|
||
|
{{page.title}}
|
||
|
</li>
|
||
|
</ul>
|
||
|
</nav>
|
||
|
{% elif category %}
|
||
|
<nav class="text-zinc-800 dark:text-zinc-300 mt-12 pb-3 md:mt-16" aria-label="Breadcrumb">
|
||
|
<ul class="p-0 inline-flex">
|
||
|
<li class="flex items-center">
|
||
|
<a href="{{ SITEURL }}/" class="text-zinc-800 dark:text-zinc-300 inline-flex items-center">
|
||
|
<svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20"
|
||
|
xmlns="http://www.w3.org/2000/svg">
|
||
|
<path
|
||
|
d="M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z">
|
||
|
</path>
|
||
|
</svg>
|
||
|
Home
|
||
|
</a>
|
||
|
<svg class="fill-current w-3 h-3 mr-2 ml-1" xmlns="http://www.w3.org/2000/svg"
|
||
|
viewBox="0 0 320 512">
|
||
|
<path
|
||
|
d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z" />
|
||
|
</svg>
|
||
|
</li>
|
||
|
<li class="flex items-center">
|
||
|
<a href="{{ SITEURL }}/categories.html">Categories</a>
|
||
|
<svg class="fill-current w-3 h-3 mr-2 ml-1" xmlns="http://www.w3.org/2000/svg"
|
||
|
viewBox="0 0 320 512">
|
||
|
<path
|
||
|
d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z" />
|
||
|
</svg>
|
||
|
</li>
|
||
|
<li class="border-b-2 border-zinc-800 dark:border-zinc-300">
|
||
|
{{ category }}
|
||
|
</li>
|
||
|
</ul>
|
||
|
</nav>
|
||
|
{% endif %}
|
||
|
{% block content %} {% endblock %}
|
||
|
</div>
|
||
|
<footer class="flex w-full text-xs justify-center mt-10 mb-6 text-zinc-500 dark:text-zinc-400">
|
||
|
<div class="px-4">
|
||
|
<span>{% if COPYRIGHT %}{{ COPYRIGHT }} • {% endif %}</span>Powered by
|
||
|
<a class="underline" href="https://getpelican.com/">Pelican</a> &
|
||
|
<a class="underline" href="https://github.com/aleylara/Papyrus"> Papyrus</a>
|
||
|
</div>
|
||
|
</footer>
|
||
|
|
||
|
{% include 'analytics.html' %}
|
||
|
{% include 'disqus_script.html' %}
|
||
|
|
||
|
<script>
|
||
|
let themeToggleDarkIcon = document.getElementById('theme-toggle-dark-icon');
|
||
|
let themeToggleLightIcon = document.getElementById('theme-toggle-light-icon');
|
||
|
if (localStorage.getItem('color-theme') === 'dark' || (!('color-theme' in localStorage) && window.matchMedia(
|
||
|
'(prefers-color-scheme: dark)').matches)) {
|
||
|
themeToggleLightIcon.classList.remove('hidden');
|
||
|
} else {
|
||
|
themeToggleDarkIcon.classList.remove('hidden');
|
||
|
}
|
||
|
let themeToggleBtn = document.getElementById('theme-toggle');
|
||
|
themeToggleBtn.addEventListener('click', function () {
|
||
|
themeToggleDarkIcon.classList.toggle('hidden');
|
||
|
themeToggleLightIcon.classList.toggle('hidden');
|
||
|
if (localStorage.getItem('color-theme')) {
|
||
|
if (localStorage.getItem('color-theme') === 'light') {
|
||
|
document.documentElement.classList.add('dark');
|
||
|
localStorage.setItem('color-theme', 'dark');
|
||
|
} else {
|
||
|
document.documentElement.classList.remove('dark');
|
||
|
localStorage.setItem('color-theme', 'light');
|
||
|
}
|
||
|
} else {
|
||
|
if (document.documentElement.classList.contains('dark')) {
|
||
|
document.documentElement.classList.remove('dark');
|
||
|
localStorage.setItem('color-theme', 'light');
|
||
|
} else {
|
||
|
document.documentElement.classList.add('dark');
|
||
|
localStorage.setItem('color-theme', 'dark');
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
</script>
|
||
|
<script src="https://files.stork-search.net/releases/v1.4.0/stork.js"></script>
|
||
|
<script>
|
||
|
stork.register("sitesearch", "{{ SITEURL }}/search-index.st")
|
||
|
</script>
|
||
|
</body>
|
||
|
|
||
|
</html>
|