diff --git a/layouts/partials/paige/page-header.html b/layouts/partials/paige/page-header.html index 46d90247..3cb19abc 100644 --- a/layouts/partials/paige/page-header.html +++ b/layouts/partials/paige/page-header.html @@ -1,5 +1,6 @@ {{ $page := . }} +{{ $alert := $page.Param "paige.alert" }} {{ $authors := partial "paige/authors.html" $page }} {{ $categories := $page.GetTerms "categories" }} {{ $date := and $page.IsPage $page.PublishDate }} @@ -8,80 +9,83 @@ {{ $link := $page.Params.link }} {{ $readingtime := $page.ReadingTime }} {{ $series := $page.GetTerms "series" }} +{{ $table := and $page.Content (ne $page.TableOfContents ``) }} {{ $tags := $page.GetTerms "tags" }} {{ $textkeywords := eq ($page.Param "paige.keyword_style" | default "text") "text" }} {{ $title := $page.Title | markdownify }} {{ $keywords := sort (append $categories $tags) "Title" }} -
- {{ with $title }} -

{{ if $link }}{{ . }}{{ else }}{{ . }}{{ end }}

- {{ end }} +{{ if or $authors $date $description $keywords $readingtime $series $table $title }} +
+ {{ with $title }} +

{{ if $link }}{{ . }}{{ else }}{{ . }}{{ end }}

+ {{ end }} - {{ with $description }} -

{{ . }}

- {{ end }} + {{ with $description }} +

{{ . }}

+ {{ end }} - {{ if or $authors $date $keywords $readingtime $series }} -
- {{ with $keywords }} -

- {{ range $i, $term := . -}} - {{- if $textkeywords -}} - {{- if gt $i 0 }} · {{ end -}} + {{ if or $authors $date $keywords $readingtime $series }} +

+ {{ with $keywords }} +

+ {{ range $i, $term := . -}} + {{- if $textkeywords -}} + {{- if gt $i 0 }} · {{ end -}} - {{ .Title }} - {{- else -}} - {{- if gt $i 0 }} {{ end -}} + {{ .Title }} + {{- else -}} + {{- if gt $i 0 }} {{ end -}} - {{ .Title }} - {{- end -}} - {{- end }} -

- {{ end }} + {{ .Title }} + {{- end -}} + {{- end }} +

+ {{ end }} - {{ with $series }} -

- {{ range $i, $series := . -}} - {{- if gt $i 0 }} · {{ end -}} + {{ with $series }} +

+ {{ range $i, $series := . -}} + {{- if gt $i 0 }} · {{ end -}} - {{ .Title }} - {{- end }} -

- {{ end }} + {{ .Title }} + {{- end }} +

+ {{ end }} - {{ with $authors }} -

- {{ range $i, $author := . -}} - {{- if gt $i 0 }} · {{ end -}} + {{ with $authors }} +

+ {{ range $i, $author := . -}} + {{- if gt $i 0 }} · {{ end -}} - {{ .Title }} - {{- end }} -

- {{ end }} + {{ .Title }} + {{- end }} +

+ {{ end }} - {{ with $date }} -

- -

- {{ end }} + {{ with $date }} +

+ +

+ {{ end }} - {{ with $readingtime }} -

{{ . }} {{ i18n "paige_minutes" . }}

- {{ end }} -
- {{ end }} + {{ with $readingtime }} +

{{ . }} {{ i18n "paige_minutes" . }}

+ {{ end }} +
+ {{ end }} - {{ with $page.Param "paige.alert" }} - - {{ end }} + {{ with $alert }} + + {{ end }} - {{ if and $page.Content (ne $page.TableOfContents ``) }} -
-
- {{ $page.TableOfContents }} + {{ if $table }} +
+
+ {{ $page.TableOfContents }} +
-
- {{ end }} -
+ {{ end }} +
+{{ end }}