From 99fb07d088ba26375a3b80ae6072c14f00fd5ce2 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Sun, 29 Dec 2024 17:45:40 -0700 Subject: [PATCH] fix: preload fonts requires copying the partials header from the template directory for now --- sass/fira.scss | 3 - templates/partials/header.html | 175 +++++++++++++++++++++++++++++++++ 2 files changed, 175 insertions(+), 3 deletions(-) create mode 100644 templates/partials/header.html diff --git a/sass/fira.scss b/sass/fira.scss index 6afcf7c..9b4e85f 100644 --- a/sass/fira.scss +++ b/sass/fira.scss @@ -1,6 +1,3 @@ -@import url('https://cdn.jsdelivr.net/npm/@xz/fonts@1/serve/fira-sans.min.css'); -@import url('https://cdn.jsdelivr.net/npm/@xz/fonts@1/serve/fira-mono.min.css'); - :root { --text-font: 'Fira Sans', sans-serif; --code-font: 'Fira Mono', monospace; diff --git a/templates/partials/header.html b/templates/partials/header.html new file mode 100644 index 0000000..b7fc88b --- /dev/null +++ b/templates/partials/header.html @@ -0,0 +1,175 @@ +{% import "macros/macros.html" as post_macros %} + + + + + + + + {% if page.extra.meta %} + + {% for data in page.extra.meta %} + + {% endfor %} + {% endif %} + + {# Site title #} + {% set current_path = current_path | default(value="/") %} + {% if current_path == "/" %} + + {{ config.title | default(value="Home") }} + + {% if not page_has_og_title %} + + {% endif %} + + {% else %} + + {% if page.title %} {{ page.title }} + {% elif section.title %} {{ section.title }} + {% elif config.title %} {{ config.title }} + {% else %} Post {% endif %} + + + {% if not page_has_og_title %} + + {% endif %} + {% endif %} + + {% if not page_has_og_description %} + {% if page.description %} + + {% elif config.description %} + + {% endif %} + {% endif %} + + {% if not page_has_description %} + {% if page.description %} + + {% elif config.description %} + + {% endif %} + {% endif %} + + {# Favicon #} + {% if config.extra.favicon %} + + {% endif %} + + {# Font from cdn or disk #} + {% if config.extra.use_cdn | default(value=false) %} + + + {% else %} + + {% endif %} + + {# Analytics #} + {% if config.extra.analytics.enabled %} + {% if config.extra.analytics.umami.website_id %} + {% set website_id = config.extra.analytics.umami.website_id %} + {% set host_url = config.extra.analytics.umami.host_url | default(value="https://api-gateway.umami.dev/") %} + + + {% endif %} + + {% if config.extra.analytics.goatcounter.user %} + {% set user = config.extra.analytics.goatcounter.user %} + {% set host = config.extra.analytics.goatcounter.host | default(value="goatcounter.com") %} + + + + {% endif %} + {% endif %} + + {# Fancy Codeblock #} + {% if config.extra.fancy_code %} + + {% endif %} + + {# Table of contents #} + {% if config.extra.toc | default(value=false) %} + + {% endif %} + + {# Dynamic Note #} + {% if config.extra.dynamic_note | default(value=false) %} + + {% endif %} + + {% if config.extra.mathjax | default(value=false) %} + {% if config.extra.mathjax_dollar_inline_enable | default(value=false) %} + + {% endif %} + + {% endif %} + + {# RSS #} + + + + {% set theme = config.extra.theme | default(value="toggle") %} + {% if theme == "dark" %} + + {% elif theme == "light" %} + + {% elif theme == "auto" %} + + + {% elif theme == "toggle" %} + + + {% endif %} + + + + {% if theme == "dark" %} + + {% elif theme == "light" %} + + {% elif theme == "auto" %} + + {% else %} + + {% endif %} + + + + + {% if config.extra.stylesheets %} + {% for stylesheet in config.extra.stylesheets %} + + {% endfor %} + {% endif %} +