<html>
<head>
<title>{{ .Site.Title }}{{ if .Page.Title }} :: {{ .Page.Title }}{{ end }}</title>
- <link rel="stylesheet" href="{{relURL `/css/main.css`}}">
- <script src="{{relURL `/js/main.js`}}"></script>
+ <link rel="stylesheet" href="/css/speedy.css">
+ <script src="/js/speedy.js"></script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
+ {{- partialCached "meta.html" . -}}
{{ .Hugo.Generator }}
</head>
<body>
<header>
{{- $sp := .Site.GetPage "section" .Section }}
- {{- $ph := .Page.Resources.GetMatch "header.png" -}}
- {{- $ph := cond (not $ph) ($sp.Resources.GetMatch "header.png") $ph }}
- {{- $ph := cond (not $ph) (relURL "/img/speedy.png") $ph.RelPermalink }}
+ {{- $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 }}
+ {{- $ph := cond (or (not .Params.header) (not (fileExists (printf "static/%s" .Params.header)))) $sh .Params.header }}
<img src="{{ $ph }}">
<div>
- {{ $caption := cond (not .Page.Params.caption) (cond (not $sp.Title) .Site.Title $sp.Title) .Page.Params.Caption }}
- {{- if (eq (printf "%T" $caption) "string") }}
- {{- .Page.Params.caption -}}
- {{- else }}
- {{- index .Page.Params.caption 0 }}
- {{- if (gt (len .Page.Params.caption) 1) }}
- {{- range after 1 .Page.Params.caption -}}
- <br>
- {{ . }}
- {{- end -}}
- {{- end -}}
- {{- end }}
+ <p>
+ {{- if not .Page.Description }}
+ {{ .Page.Title }}
+ {{- else }}
+ {{ replaceRE "\n\n" "<br>\n" .Page.Description | safeHTML }}
+ {{- end }}
+ </p>
</div>
</header>
<nav>
<div>
{{- $pg := . }}
- {{- range union (where .Site.Menus.main "Weight" 0).Reverse (where .Site.Menus.main "Weight" "!=" 0) }}
- <a href="{{ .URL }}">
- <summary>{{ .Name }}</summary>
- <svg{{- if or ($pg.InSection .Page) (eq .Page $sp) }} class="selected"{{ end }}>
- <use xlink:href="{{ relURL `/img/nav.svg` }}#{{ .Name }}"/>
+ {{- range .Site.Menus.main }}
+ <a href="{{ absURL .URL }}">
+ <summary>{{ .Title }}</summary>
+ <svg{{- if or ($pg.InSection .Page) (eq .Page $pg) }} class="selected"{{ end }}>
+ <use xlink:href="{{ relURL `/img/nav.svg` | safeHTML }}#{{ .Title }}"/>
</svg>
</a>
{{- end }}
</div>
<footer>
- {{ cond (not .Page.Title) .Page.Name .Page.Title }}
+ {{ cond (not $sp.Params.menu.main.title) $sp.Title $sp.Params.menu.main.title }}
</footer>
</nav>
- <main>
+ <article>
{{ block "main" . }}{{ end }}
- </main>
+ </article>
<footer>
<p>©{{ .Site.Copyright }}</p>
</footer>