This repository has been archived on 2025-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
coryd.dev-eleventy/src/_includes/base.liquid
2023-03-13 15:32:52 -07:00

46 lines
2.2 KiB
Text

<!doctype html>
<html lang="en">
<head>
<title>{{ title }} • {{site.title}}</title>
<meta charset="utf-8">
<meta name='viewport' content='width=device-width'>
<meta property="og:title" content="{{ title }}" />
<meta property="description" content="{% if excerpt %}{{ excerpt}}{% else %}{{ site.description }}{% endif %}" />
<meta property="og:description" content="{% if excerpt %}{{ excerpt}}{% else %}{{ site.description }}{% endif %}" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://coryd.dev{{ page.url }}" />
<meta property="og:image" content="{{ post | getFirstAttachment }}">
<meta name="theme-color" content="#bd93f9"/>
<link rel="icon" type="image/x-icon" href="/assets/img/favicon/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/img/favicon/favicon-32x32.png">
<link rel="apple-touch-icon" href="/assets/img/favicon/apple-touch-icon.png">
<link href="/assets/styles/tailwind.css?v={% version %}" rel="stylesheet" />
<link href="/assets/styles/prism.css?v={% version %}" rel="stylesheet" />
<link href="/assets/styles/index.css?v={% version %}" rel="stylesheet" />
<script src="https://breezy-restored.coryd.dev/script.js" data-site="RHNGSUXO" defer></script>
<link rel="webmention" href="https://webmention.io/coryd.dev/webmention" />
<link rel="pingback" href="https://webmention.io/coryd.dev/xmlrpc" />
<script>
const isDarkMode = () => localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches);
if (isDarkMode()) {
document.documentElement.classList.add('dark')
} else {
document.documentElement.classList.remove('dark')
}
</script>
</head>
<body class="dark:text-white dark:bg-gray-900 font-sans text-gray-800">
{{ content }}
<script>
document.getElementById("toggleDarkMode").addEventListener("click", function() {
if (isDarkMode()) {
localStorage.theme = 'light'
document.documentElement.classList.remove('dark')
} else {
localStorage.theme = 'dark'
document.documentElement.classList.add('dark')
}
});
</script>
</body>
</html>