ddfb8b0d8cf422a8308bbbc572db35233ae48c14
[kengrimes.com/theme.git] / layouts / _default / baseof.html
1 <!doctype html>
2 <html>
3 <head>
4 <title>{{ .Site.Title }}{{ if .Page.Title }} :: {{ .Page.Title }}{{ end }}</title>
5 <link rel="stylesheet" href="/css/speedy.css">
6 <script src="/js/speedy.js"></script>
7 <meta charset="utf-8" />
8 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
9 {{ .Hugo.Generator }}
10 </head>
11 <body>
12 <header>
13 {{- $sp := .Site.GetPage "section" .Section }}
14 {{- $sh := cond (or (not $sp.Params.header) (not (fileExists (printf "static/%s" $sp.Params.header)))) (cond (or (not .Site.Home.Params.header) (not (fileExists (printf "static/%s" .Site.Home.Params.header)))) "/img/speedy.png" .Site.Home.Params.header) $sp.Params.header }}
15 {{- $ph := cond (or (not .Params.header) (not (fileExists (printf "static/%s" .Params.header)))) $sh .Params.header }}
16 <img src="{{ $ph }}">
17 <div>
18 <p>
19 {{- if not .Page.Description }}
20 {{ .Page.Title }}
21 {{- else }}
22 {{ replaceRE "\n\n" "<br>\n" .Page.Description | safeHTML }}
23 {{- end }}
24 </p>
25 </div>
26 </header>
27 <nav>
28 <div>
29 {{- $pg := . }}
30 {{- range .Site.Menus.main }}
31 <a href="{{ absURL .URL }}">
32 <summary>{{ .Title }}</summary>
33 <svg{{- if or ($pg.InSection .Page) (eq .Page $pg) }} class="selected"{{ end }}>
34 <use xlink:href="{{ relURL `/img/nav.svg` | safeHTML }}#{{ .Title }}"/>
35 </svg>
36 </a>
37 {{- end }}
38 </div>
39 <footer>
40 {{ cond (not $sp.Params.menu.main.title) $sp.Title $sp.Params.menu.main.title }}
41 </footer>
42 </nav>
43 <article>
44 {{ block "main" . }}{{ end }}
45 </article>
46 <footer>
47 <p>&copy;{{ .Site.Copyright }}</p>
48 </footer>
49 </body>
50 </html>