X-Git-Url: https://www.kengrimes.com/gitweb/?p=kengrimes.com%2Ftheme.git;a=blobdiff_plain;f=layouts%2F_default%2Fbaseof.html;h=545589101371e8ed6b7d2d647d62556cc99a1ad6;hp=9837ab5ecdb699dcf0f5df9d6c4d010e0e0d5513;hb=ba9d7f74882189d1277f52e417ac3681ac5f65e7;hpb=9616177a3e34be4c1f1940de481e6d563a8e2ffa diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 9837ab5..5455891 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -10,44 +10,42 @@
-
- {{- $ph := .Page.Resources.GetMatch "header.png" -}} - {{- if $ph }} - + {{- $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 }} + +
+ {{ $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 -}} +
+ {{ . }} + {{- end -}} + {{- end -}} {{- end }} -
- +
+
{{ block "main" . }}{{ end }}