From 2005b94da2c4f237300eb8fbb8a4d62f7bec8bc9 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Thu, 27 Jul 2023 15:42:11 +0200 Subject: [PATCH] Srly, Google. --- pelicanconf.py | 1 + templates/base.html | 197 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 198 insertions(+) create mode 100644 templates/base.html diff --git a/pelicanconf.py b/pelicanconf.py index 3fd642e..8b32103 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -87,6 +87,7 @@ USE_GOOGLE_FONTS = False DEFAULT_PAGINATION = 10 THEME = "Flex" THEME_STATIC_DIR = "theme" +THEME_TEMPLATES_OVERRIDES = ['templates/'] ARTICLE_URL = "{category}/{slug}.html" STATIC_PATHS = ["images"] diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..96eb177 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,197 @@ +{% if 'jinja2.ext.i18n' not in JINJA_ENVIRONMENT.extensions %} + {%- macro _(msg) -%} + {{ msg % kwargs }} + {%- endmacro -%} +{% endif %} + + + + + + + + + {% if page in hidden_pages %} + + {% else %} + + {% endif %} + + {% if USE_GOOGLE_FONTS != False %} + + {% endif %} + + {% if USE_LESS %} + + + {% else %} + + {% endif %} + + {# DARK THEME STYLES #} + {% if THEME_COLOR == "dark" or THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE or THEME_COLOR_ENABLE_USER_OVERRIDE %} + + {% endif %} + + {# PYGMENTS STYLES #} + {% if THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE or THEME_COLOR_ENABLE_USER_OVERRIDE or THEME_COLOR == "dark" %} + + {% endif %} + {% if THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE or not THEME_COLOR or THEME_COLOR == "light" %} + + {% endif %} + + {% if PLUGINS and ('tipue_search' in PLUGINS or 'pelican.plugins.tipue_search' in PLUGINS) %} + {% if USE_GOOGLE_FONTS != False %} + + {% endif %} + + {% endif %} + + {% if 'pelican.plugins.search' in PLUGINS %} + + {% endif %} + + + + + + {% if CUSTOM_CSS %} + + {% endif %} + + {% include "partial/icon.html" %} + + {% include "partial/color.html" %} + + {% include "partial/feed.html" %} + + {% include "partial/ga.html" %} + {% include "partial/ggst.html" %} + + + {% include "partial/plausible.html" %} + + {% if PGP_KEY %} + + {% endif %} + + {% if WEBMENTION_URL %} + + {% endif %} + + {% if PINGBACK_URL %} + + {% endif %} + + {% if not PLUGINS or 'seo' not in PLUGINS %} + {% if REL_CANONICAL %} + {% if page %} + + {% elif article %} + + {% elif page_name == 'index' and not articles_previous_page %} + + {% elif author or category or tag or page_name == 'index' %} + + {% else %} + + {% endif %} + {% endif %} + {% endif %} + + {% block meta %} + + + {% include "partial/og.html" %} + {% endblock %} + + {{ SITENAME }}{% block title %}{% endblock %} + + {% if GOOGLE_ADSENSE and GOOGLE_ADSENSE.page_level_ads %} + + + {% endif %} + + {% include "partial/gtm.html" %} + {% include "partial/clarity.html" %} + + + {% include "partial/gtm_noscript.html" %} + + {% include "partial/sidebar.html" %} + +
+ {% if GOOGLE_ADSENSE and GOOGLE_ADSENSE.ads.main_menu %} + + + + {% endif %} + + {% include "partial/nav.html" %} + + {% block content %} + {% endblock %} + + {% include "partial/footer.html" %} +
+ + {% include "partial/jsonld.html" %} + {% include "partial/guages.html" %} + {% include "partial/addthis.html" %} + {% include "partial/matomo.html" %} + {% include 'partial/github.html' %} + {% include 'partial/stork.html' %} + + {% block additional_js %}{% endblock %} + + + +