site.lyte.dev/layouts/_default/baseof.html

47 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
<link rel="shortcut icon" href="/icon.png" />
<link rel="stylesheet" href="/styles.css" />
<script defer src="/global.js"></script>
<script async defer data-domain="lyte.dev" src="https://a.lyte.dev/js/plausible.js"></script>
<script defer src="//instant.page/5.1.0" type="module" integrity="sha384-by67kQnR+pyfy8yWP4kPO12fHKRLHZPfEsiSXR8u2IKcTdxD805MGUXBzVPnkLHw"></script>
</head>
<body>
<header>
<a href="#start-of-content" class="hidden-in-browsers js-disabled-only">Skip to Content</a>
<section>
<a href="/" id="logo">
{{ partial "logo.svg.html" . }}
</a>
<a href="/">
<h1>lyte.dev</h1>
</a>
</section>
<section>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
{{ $active := or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}
{{ $active = or $active (eq .Name $currentPage.Title) }}
{{ $active = or $active (and (eq .Name "Blog") (eq $currentPage.Section "post")) }}
{{ $active = or $active (and (eq .Name "Tags") (eq $currentPage.Section "tags")) }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</section>
<section style="position:absolute;height:100%;right:0">
<button class="no-bg theme-toggler js-only centerize">
{{ partial "theme-toggle.html" . }}
</button>
<button class="no-bg align-toggler js-only hidden-on-mobile centerize">
{{ partial "align-toggle.html" . }}
</button>
</section>
</header>
<main>{{ block "main" . }}{{ .Content }}{{ end }}</main>
<footer style="padding-bottom: 5em"></footer>
</body>
</html>