All checks were successful
Deploy Theme / deploy (push) Successful in 14s
63 lines
2.2 KiB
Handlebars
63 lines
2.2 KiB
Handlebars
<!DOCTYPE html>
|
|
<html lang="{{@site.lang}}"
|
|
x-data="{
|
|
theme: localStorage.getItem('theme') || (window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark'),
|
|
mobileMenuOpen: false,
|
|
init() {
|
|
$watch('theme', val => {
|
|
localStorage.setItem('theme', val);
|
|
document.documentElement.setAttribute('data-theme', val);
|
|
});
|
|
document.documentElement.setAttribute('data-theme', this.theme);
|
|
document.documentElement.classList.remove('hidden');
|
|
|
|
// Close mobile menu on navigation
|
|
document.addEventListener('htmx:beforeRequest', () => {
|
|
this.mobileMenuOpen = false;
|
|
});
|
|
}
|
|
}"
|
|
:data-theme="theme"
|
|
class="hidden">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{{meta_title}}{{#is "index"}} — {{@site.title}}{{else}} — {{@site.title}}{{/is}}</title>
|
|
<link rel="stylesheet" href="{{asset "built/screen.css"}}">
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&display=swap" rel="stylesheet">
|
|
|
|
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
|
<script src="https://unpkg.com/htmx.org@2.0.0"></script>
|
|
|
|
{{ghost_head}}
|
|
</head>
|
|
<body
|
|
class="{{body_class}} font-sans antialiased"
|
|
hx-boost="true"
|
|
hx-target="#viewport"
|
|
hx-select="#viewport"
|
|
>
|
|
|
|
{{!--
|
|
This container is the target for HTMX swaps.
|
|
Moving everything inside ensures navigation highlights and states update on every click.
|
|
--}}
|
|
<div id="viewport" class="min-h-screen flex flex-col">
|
|
{{> mobile-menu}}
|
|
{{> header}}
|
|
|
|
<main class="flex-grow">
|
|
{{{body}}}
|
|
</main>
|
|
|
|
{{> footer}}
|
|
</div>
|
|
|
|
{{ghost_foot}}
|
|
<script src="{{asset "js/ghost-config.js"}}"></script>
|
|
<script src="{{asset "js/main.js"}}"></script>
|
|
</body>
|
|
</html>
|