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

39 lines
1.2 KiB
HTML
Raw Normal View History

2020-07-14 16:47:54 -05:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
2020-07-14 17:52:42 -05:00
{{ block "head-begin" . }}{{ end }}
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
2020-07-14 16:47:54 -05:00
<link rel="shortcut icon" href="/icon.png" />
<link rel="stylesheet" href="/styles.css" />
{{ block "head-end" . }}{{ end }}
</head>
<body>
2020-07-14 17:52:42 -05:00
{{ block "body-begin" . }}{{ end }}
2020-07-14 16:47:54 -05:00
<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>
2020-07-14 17:52:42 -05:00
{{ block "main" . }}{{ .Content }}{{ end }}
2020-07-14 16:47:54 -05:00
</main>
{{ block "body-end" . }}
<footer style="padding-bottom: 5em">
</footer>
{{ end }}
2020-07-14 16:47:54 -05:00
</body>
</html>