From: kengrimes Date: Sun, 8 Apr 2018 21:41:59 +0000 (-0700) Subject: major refactor, card pagination beta testing X-Git-Url: https://www.kengrimes.com/gitweb/?p=kengrimes.com%2Ftheme.git;a=commitdiff_plain;h=3bb959dc9aa6955c1d67f45d811a1af7496f3d80 major refactor, card pagination beta testing --- diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 1f102a4..3f7a35d 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -2,8 +2,8 @@ {{ .Site.Title }}{{ if .Page.Title }} :: {{ .Page.Title }}{{ end }} - - + + {{ .Hugo.Generator }} @@ -11,12 +11,12 @@
{{- $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 }} + {{- $sc := cond (or (not $sp.Params.caption)) (cond (not .Site.Home.Params.caption) .Site.Title .Site.Home.Params.caption) $sp.Params.caption }} + {{- $ph := cond (or (not .Params.header) (not (fileExists (printf "static/%s" .Params.header)))) $sh .Params.header }}
- {{ $caption := cond (not .Page.Params.caption) (cond (not $sp.Params.caption) .Site.Title $sp.Params.caption) .Page.Params.caption }} + {{ $caption := cond (not .Params.caption) $sc .Params.caption }} {{- if (eq (printf "%T" $caption) "string") }} {{- $caption -}} {{- else }} @@ -33,11 +33,11 @@