Initial Commit
[ancientarts.git] / hugo / oldnav.html
1 <nav>
2 <div>
3 {{- $pg := . }}
4 {{- range .Site.Menus.main }}
5 <a href="{{ absURL .URL }}">
6 <summary>{{ .Title }}</summary>
7 <svg{{- if or ($pg.InSection .Page) (eq .Page $pg) }} class="selected"{{ end }}>
8 <use xlink:href="{{ relURL `/img/nav.svg` | safeHTML }}#{{ .Title }}"/>
9 </svg>
10 </a>
11 {{- end }}
12 </div>
13 <footer>
14 {{ cond (not $sp.Params.menu.main.title) $sp.Title $sp.Params.menu.main.title }}
15 </footer>
16 </nav>
17
18 <header>
19 {{- $sp := .Site.GetPage "section" .Section }}
20 {{- $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 }}
21 {{- $ph := cond (or (not .Params.header) (not (fileExists (printf "static/%s" .Params.header)))) $sh .Params.header }}
22 <img src="{{ $ph }}">
23 <div>
24 <p>
25 {{- if not .Page.Description }}
26 {{ .Page.Title }}
27 {{- else }}
28 {{ replaceRE "\n\n" "<br>\n" .Page.Description | safeHTML }}
29 {{- end }}
30 </p>
31 </div>
32 </header>