146 lines
6.5 KiB
HTML
146 lines
6.5 KiB
HTML
<head>
|
|
<!-- {{ now() | date(format='%F %a %R') }} -->
|
|
<meta charset="UTF-8" />
|
|
<meta name="description" content="{{ config.description }}" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<meta name="theme-color" content="{{ config.extra.primary_color | default(value='#9a9996' | safe) | safe }}" />
|
|
{%- if config.extra.primary_color_dark %}
|
|
<meta name="theme-color" content="{{ config.extra.primary_color_dark | safe }}" media="(prefers-color-scheme:dark)" />
|
|
{%- endif %}
|
|
<title>{% include "partials/title.html" %}</title>
|
|
<link rel="canonical" href="{{ current_url | default(value='/') | safe }}" />
|
|
|
|
{%- if config.extra.katex %}
|
|
<link rel="stylesheet" href="{{ get_url(path="katex.css") }}">
|
|
<script defer src="{{ get_url(path="katex.js")}}"></script>
|
|
<script defer src="{{ get_url(path="auto-render.js") }}"></script>
|
|
<script>
|
|
document.addEventListener("DOMContentLoaded", function() {
|
|
renderMathInElement(document.body, {
|
|
delimiters: [
|
|
{left: "$$", right: "$$", display: true},
|
|
{left: "$", right: "$", display: false},
|
|
]
|
|
});
|
|
});
|
|
</script>
|
|
{%- endif %}
|
|
|
|
{%- if config.markdown.highlight_code and config.markdown.highlight_theme == "css" %}
|
|
{%- if config.markdown.highlight_themes_css | length > 0 %}
|
|
<link type="text/css" rel="stylesheet" href="{{ get_url(path='syntax-theme-light.css') }}" media="(prefers-color-scheme: light)" />
|
|
<link type="text/css" rel="stylesheet" href="{{ get_url(path='syntax-theme-dark.css') }}" media="(prefers-color-scheme: dark)" />
|
|
{%- else %}
|
|
<link type="text/css" rel="stylesheet" href="{{ get_url(path='syntax-theme.css') }}" />
|
|
{%- endif %}
|
|
{%- endif %}
|
|
|
|
{%- if config.extra.comments %}
|
|
<link rel="me" href="https://{{ config.extra.comments.host }}/@{{ config.extra.comments.user }}" />
|
|
{%- endif %}
|
|
|
|
<link rel="icon" type="image/png" href="{{ get_url(path='favicon.png') }}" />
|
|
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="{{ get_url(path='apple-touch-icon.png') }}" />
|
|
|
|
{%- if config.extra.emoji_favicon %}
|
|
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext x='-.07em' y='.89em' font-size='90'%3E{{ config.extra.emoji_favicon | truncate(length=1, end='') }}%3C/text%3E%3C/svg%3E">
|
|
{%- endif %}
|
|
|
|
{%- if config.generate_feeds and config.feed_filenames %}
|
|
{%- for feed in config.feed_filenames %}
|
|
<link rel="alternate" type={% if feed == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{{ config.title }}" href="{{ get_url(path=feed) | safe }}" />
|
|
{%- endfor %}
|
|
{%- elif config.generate_feeds and config.feed_filenames | length > 0 %}
|
|
<link rel="alternate" type={% if config.feed_filenames[0] == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{{ config.title }}" href="{{ get_url(path=config.feed_filenames[0]) | safe }}" />
|
|
{%- endif %}
|
|
|
|
<style type="text/css">
|
|
:root {
|
|
--primary-color: {{ config.extra.primary_color | default(value="#6f8396" | safe) | safe }};
|
|
--primary-color-alpha: {{ config.extra.primary_color_alpha | default(value="rgb(111 131 150 / 0.2)" | safe) | safe }};
|
|
--contrast-color: {% if config.extra.fix_contrast %}rgb(0 0 0 / 0.8){% else %}#fff{% endif %};
|
|
}
|
|
|
|
{%- if config.extra.primary_color_dark %}
|
|
[data-theme="dark"] {
|
|
--primary-color: {{ config.extra.primary_color_dark | safe }};
|
|
--primary-color-alpha: {{ config.extra.primary_color_dark_alpha | safe }};
|
|
--contrast-color: {% if config.extra.fix_contrast_dark %}rgb(0 0 0 / 0.8){% else %}#fff{% endif %};
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
:root:not([data-theme="light"]) {
|
|
--primary-color: {{ config.extra.primary_color_dark | safe }};
|
|
--primary-color-alpha: {{ config.extra.primary_color_dark_alpha | safe }};
|
|
--contrast-color: {% if config.extra.fix_contrast_dark %}rgb(0 0 0 / 0.8){% else %}#fff{% endif %};
|
|
}
|
|
}
|
|
{%- endif %}
|
|
</style>
|
|
|
|
{%- set stylesheets = [ "style.css" ] %}
|
|
|
|
{%- if config.extra.stylesheets %}
|
|
{%- set stylesheets = stylesheets | concat(with=config.extra.stylesheets) %}
|
|
{%- endif %}
|
|
|
|
{%- if page.extra.stylesheets %}
|
|
{%- set stylesheets = stylesheets | concat(with=page.extra.stylesheets) %}
|
|
{%- elif section.extra.stylesheets %}
|
|
{%- set stylesheets = stylesheets | concat(with=section.extra.stylesheets) %}
|
|
{%- endif %}
|
|
|
|
{%- for stylesheet in stylesheets %}
|
|
<link type="text/css" rel="stylesheet" href="{{ get_url(path=stylesheet) | safe }}" />
|
|
{%- endfor %}
|
|
|
|
{%- if config.extra.goatcounter %}
|
|
<script type="text/javascript" data-goatcounter="https://{{ config.extra.goatcounter.user }}.{{ config.extra.goatcounter.host | default(value='goatcounter.com') }}/count" async src="//gc.zgo.at/count.js"></script>
|
|
<noscript>
|
|
<img src="https://{{ config.extra.goatcounter.user }}.{{ config.extra.goatcounter.host | default(value='goatcounter.com') }}/count?p={{ current_path | default(value='/') | safe }}" />
|
|
</noscript>
|
|
{%- endif %}
|
|
|
|
{%- if config.extra.show_copy_button %}
|
|
{%- include "partials/copy_button.html" %}
|
|
{%- endif %}
|
|
|
|
{%- set scripts = [] %}
|
|
|
|
{%- if config.build_search_index %}
|
|
{%- include "partials/search.html" %}
|
|
{%- set scripts = scripts | concat(with=["elasticlunr.min.js"]) %}
|
|
{%- endif %}
|
|
|
|
{%- if config.extra.nav.show_theme_switcher %}
|
|
{%- set scripts = scripts | concat(with=["theme-switcher.js"]) %}
|
|
{%- endif %}
|
|
|
|
{%- if config.show_theme_switcher or config.languages | length > 0 %}
|
|
{%- set scripts = scripts | concat(with=["details.js"]) %}
|
|
{%- endif %}
|
|
|
|
{%- if config.extra.scripts %}
|
|
{%- set scripts = scripts | concat(with=config.extra.scripts) %}
|
|
{%- endif %}
|
|
|
|
{%- if page.extra.scripts %}
|
|
{%- set scripts = scripts | concat(with=page.extra.scripts) %}
|
|
{%- elif section.extra.scripts %}
|
|
{%- set scripts = scripts | concat(with=section.extra.scripts) %}
|
|
{%- endif %}
|
|
|
|
{%- if scripts | length > 0 %}
|
|
{%- for script in scripts %}
|
|
<script type="text/javascript" src="{{ get_url(path=script) | safe }}"></script>
|
|
{%- endfor %}
|
|
{%- endif %}
|
|
|
|
<meta property="og:site_name" content="{{ config.title }}" />
|
|
<meta property="og:title" content="{% include 'partials/title.html' %}" />
|
|
<meta property="og:url" content="{{ current_url | default(value='/') | safe }}" />
|
|
<meta property="og:description" content="{% include 'partials/description.html' %}" />
|
|
<meta property="og:image" content="{% include 'partials/card.html' %}" />
|
|
<meta property="og:locale" content="{{ macros_translate::translate(key='date_locale', default='en_US', language_strings=language_strings) }}" />
|
|
</head>
|