43 lines
1.3 KiB
HTML
43 lines
1.3 KiB
HTML
{{- /*
|
|
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>
|