diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2024-06-19 14:44:10 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2024-06-19 14:44:10 +0200 |
commit | e0a989555b6bef9173088da9e0b980338a88ce0c (patch) | |
tree | 3e35bc65664e881d62cf14970d482884b80289f7 /theme/bulma/templates/base.html | |
parent | 3b3c4db1bdd29b46a23051fc5427197ce2831764 (diff) |
Swiched the theme to bulma-css
Diffstat (limited to 'theme/bulma/templates/base.html')
-rw-r--r-- | theme/bulma/templates/base.html | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/theme/bulma/templates/base.html b/theme/bulma/templates/base.html new file mode 100644 index 0000000..6b281d6 --- /dev/null +++ b/theme/bulma/templates/base.html @@ -0,0 +1,71 @@ +<!DOCTYPE html> +<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock html_lang %}"> +<head> + {% block head %} + <meta charset="utf-8" /> + <meta name="generator" content="Pelican" /> + <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/style.min.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 }} Full 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 }} Full RSS Feed" /> + {% endif %} + {% if FEED_ATOM %} + <link href="{{ FEED_DOMAIN }}/{%if FEED_ATOM_URL %}{{ FEED_ATOM_URL }}{% else %}{{ FEED_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" /> + {% endif %} + {% if FEED_RSS %} + <link href="{{ FEED_DOMAIN }}/{% if FEED_RSS_URL %}{{ FEED_RSS_URL }}{% else %}{{ FEED_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" /> + {% endif %} + {% if CATEGORY_FEED_ATOM and category %} + <link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_ATOM_URL %}{{ CATEGORY_FEED_ATOM_URL.format(slug=category.slug) }}{% else %}{{ CATEGORY_FEED_ATOM.format(slug=category.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Categories Atom Feed" /> + {% endif %} + {% if CATEGORY_FEED_RSS and category %} + <link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_RSS_URL %}{{ CATEGORY_FEED_RSS_URL.format(slug=category.slug) }}{% else %}{{ CATEGORY_FEED_RSS.format(slug=category.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Categories RSS Feed" /> + {% endif %} + {% if TAG_FEED_ATOM and tag %} + <link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_ATOM_URL %}{{ TAG_FEED_ATOM_URL.format(slug=tag.slug) }}{% else %}{{ TAG_FEED_ATOM.format(slug=tag.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Tags Atom Feed" /> + {% endif %} + {% if TAG_FEED_RSS and tag %} + <link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_RSS_URL %}{{ TAG_FEED_RSS_URL.format(slug=tag.slug) }}{% else %}{{ TAG_FEED_RSS.format(slug=tag.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Tags RSS Feed" /> + {% endif %} + {% endblock head %} + <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/font-awesome/css/fontawesome.css"> + <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/font-awesome/css/brands.css"> + <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/font-awesome/css/solid.css"> + <script> + const theme = localStorage.getItem('theme'); + if (theme === "dark") { + document.documentElement.setAttribute('data-theme', 'dark'); + } else { + document.documentElement.setAttribute('data-theme', 'light'); + } + + function modeSwitcher() { + let currentMode = document.documentElement.getAttribute('data-theme'); + if (currentMode === "dark") { + document.documentElement.setAttribute('data-theme', 'light'); + window.localStorage.setItem('theme', 'light'); + } else { + document.documentElement.setAttribute('data-theme', 'dark'); + window.localStorage.setItem('theme', 'dark'); + } + } + </script> + <title>{{ SITENAME }}{% block title %}{% endblock %}</title> +</head> + +<body id="index" class="home"> + <main class="columns"> + <div class="column is-3 has-text-centered aside p-6"> + {% include "partial/sidebar.html" %} + {% include "partial/nav.html" %} + </div> + <div class="column is-9 p-6"> + {% block content %} + {% endblock %} + {% include "partial/footer.html" %} + </div> + </main> +</body> +</html> |