json feeds and favicon support
[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 {{- partialCached "meta.html" . -}}
10 {{ .Hugo.Generator }}
11 </head>
12 <body>
13 <header>
14 {{- $sp := .Site.GetPage "section" .Section }}
15 {{- $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 }}
16 {{- $ph := cond (or (not .Params.header) (not (fileExists (printf "static/%s" .Params.header)))) $sh .Params.header }}
17 <img src="{{ $ph }}">
18 <div>
19 <p>
20 {{- if not .Page.Description }}
21 {{ .Page.Title }}
22 {{- else }}
23 {{ replaceRE "\n\n" "<br>\n" .Page.Description | safeHTML }}
24 {{- end }}
25 </p>
26 </div>
27 </header>
28 <nav>
29 <div>
30 {{- $pg := . }}
31 {{- range .Site.Menus.main }}
32 <a href="{{ absURL .URL }}">
33 <summary>{{ .Title }}</summary>
34 <svg{{- if or ($pg.InSection .Page) (eq .Page $pg) }} class="selected"{{ end }}>
35 <use xlink:href="{{ relURL `/img/nav.svg` | safeHTML }}#{{ .Title }}"/>
36 </svg>
37 </a>
38 {{- end }}
39 </div>
40 <footer>
41 {{ cond (not $sp.Params.menu.main.title) $sp.Title $sp.Params.menu.main.title }}
42 </footer>
43 </nav>
44 <article>
45 {{ block "main" . }}{{ end }}
46 </article>
47 <footer>
48 <p>&copy;{{ .Site.Copyright }}</p>
49 </footer>
50 </body>
51 </html>