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

40 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ block "head-begin" . }}{{ end }}
<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 defer src="//a.lyte.dev/matomo.js"></script>
{{ block "head-end" . }}{{ end }}
</head>
<body>
{{ block "body-begin" . }}{{ end }}
<header>
<section>
<a href="/"><img src="/icon.png" /></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>
</header>
<main>
{{ block "main" . }}{{ .Content }}{{ end }}
</main>
{{ block "body-end" . }}
<footer style="padding-bottom: 5em">
</footer>
{{ end }}
</body>
</html>