| 1 | {{define "layout"}}<!doctype html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 6 | <title>{{.Title}}</title> |
| 7 | <style>{{.Style}}</style> |
| 8 | </head> |
| 9 | <body> |
| 10 | <div class="page"> |
| 11 | {{- if .Nav}} |
| 12 | <nav class="site" aria-label="Pages"> |
| 13 | {{- range .Nav}}<a href="{{.URL}}">{{.Text}}</a>{{end}} |
| 14 | {{- with .Fresh}}<span class="fresh">Collected {{.Collected}}. Policy last checked {{.Checked}}, {{.Age}}{{if .Stale}} <span class="chip stale">stale</span>{{end}}</span>{{end}} |
| 15 | </nav> |
| 16 | {{- end}} |
| 17 | {{template "content" .Content}} |
| 18 | </div> |
| 19 | {{- with .Script}} |
| 20 | <script>{{.}}</script> |
| 21 | {{- end}} |
| 22 | </body> |
| 23 | </html> |
| 24 | {{end}} |
| 25 | |
| 26 | {{define "glyph"}}<i class="k {{glyph .}}" role="img" aria-label="{{label .}}" title="{{label .}}"></i>{{end}} |
| 27 | |
| 28 | {{define "source-head"}} |
| 29 | <header class="knot-head"> |
| 30 | <div class="meta"> |
| 31 | <span class="eyebrow">Source</span><span class="mono">{{.Short}}</span> |
| 32 | {{- if .AtTip}}<span class="chip">main's published tip</span>{{else}}<a href="{{.TipURL}}">main's published tip</a>{{end}} |
| 33 | <a href="{{.LogURL}}">history</a> |
| 34 | </div> |
| 35 | <nav class="crumbs" aria-label="Path"> |
| 36 | {{- range $i, $c := .Crumbs}}{{if $i}}<span class="muted">/</span>{{end}}{{if .URL}}<a href="{{.URL}}">{{.Text}}</a>{{else}}<span>{{.Text}}</span>{{end}}{{end -}} |
| 37 | </nav> |
| 38 | </header> |
| 39 | {{end}} |