68 lines
2.4 KiB
Plaintext

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://use.typekit.net/" crossorigin>
<link rel="dns-prefetch" href="https://use.typekit.net/">
<link rel="preconnect" href="https://p.typekit.net/" crossorigin>
<link rel="dns-prefetch" href="https://p.typekit.net/">
{# Use title with path, or append a space to the page title to avoid collpasing with the meta title #}
{% set pageTitle = titleWithPath or title + ' ' or '' %}
{% set preview = excerpt or renderData.description or description or metadata.description %}
<title>{{ pageTitle + metadata.title }}</title>
<meta
name="twitter:description"
content="{% metaDescriptionWithFlag preview, flag %}"
>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="{{ pageTitle }}"/>
<meta
name="og:description"
content="{% metaDescriptionWithFlag preview, flag %}"
>
<meta name="og:title" content="{{ pageTitle }}"/>
<meta
name="description"
content="{% metaDescriptionWithFlag preview, flag %}"
>
<link rel="stylesheet" href="https://use.typekit.net/qlo3dpu.css">
<link rel="stylesheet" href="{{ '/assets/css/base.css' | url }}">
<link rel="alternate" type="application/atom+xml" href="{{ metadata.feedPermalink | absoluteUrl(metadata.url) }}">
{% block pageStyles %}
{% endblock pageStyles %}
</head>
<body>
<script>
/**
* @type String
*/
let userThemeSetting = localStorage.getItem('sdUserTheme');
if (userThemeSetting) {
document.documentElement.setAttribute(
'data-user-theme',
userThemeSetting
);
}
window.setUserPreference = function setUserPreference(value) {
localStorage.setItem('sdUserTheme', value);
document.documentElement.setAttribute('data-user-theme', value);
}
window.unsetUserPreference = function unsetUserPreference() {
localStorage.removeItem('sdUserTheme');
document.documentElement.removeAttribute('data-user-theme');
}
</script>
{% block content %}{% endblock content %}
{% include 'components/base/site-footer.njk' %}
{% block pageScript %}
{% endblock pageScript %}
</body>
<script defer src="/js/theme-switcher.js"></script>
</html>