Omphaloskepsis-2/layouts/partials/single/main-header.html

44 lines
1.3 KiB
HTML
Raw Permalink Normal View History

{{- /*
Displays the header information for an item.
@params pc Page context
@params sc Site context
*/
-}}
<!-- Validation -->
{{- if ( not ( isset . "sc" ) ) -}}
{{- errorf "No site context received" -}}
{{- end -}}
{{- if ( not ( isset . "pc" ) ) -}}
{{- errorf "No page context received (%q)" .sc.Page.File.Dir -}}
{{- end -}}
<!-- Rendering -->
<header class="site-content__header">
{{ if .pc.Params.series }}
{{ partial "single/main-header/series.html" ( dict "series" ( .pc.GetTerms "series" ) ) }}
{{ end }}
{{ partial "single/main-header/item-tile.html" ( dict "pc" .pc "sc" .sc ) }}
{{ partial "single/main-header/word-count.html" ( dict "wordCount" .pc.FuzzyWordCount ) }}
{{ partial "single/main-header/dates.html" ( dict "publishDate" .pc.PublishDate "lastmodDate" .pc.Lastmod ) }}
{{ partial "single/main-header/authors.html" ( dict "authors" .pc.Params.authors "site_author" .sc.Site.Params.Author ) }}
{{ partial "single/main-header/warnings.html" ( dict "pc" .pc ) }}
{{ with .pc.Params.notes }}
{{ partial "single/main-header/notes.html" ( dict "notes" . "sc" $.sc ) }}
{{ end }}
{{ partial "single/main-header/toc.html" ( dict "toc" .pc.TableOfContents "fileDir" .sc.Page.File.Dir "appendices" .pc.Params.appendices ) }}
</header>