{{- define "partials/page/title.html" -}} {{- "" | safeHTML }} {{- $subtitle := .Params.Subtitle | default .Description }} {{- $isPost := eq (lower .Params.type) (or "post" "articles") }} {{- if $subtitle }}

{{ .Title }}

{{ $subtitle }}

{{- else }}

{{ .Title }}

{{- end }} {{- end }} {{- define "partials/page/timestamp.html" -}} {{- "" | safeHTML }} {{- $dateMachine := "2006-01-02T15:04:05-07:00" }} {{- $minVersion := index ( split hugo.Version "." ) 1 }} {{- $datePublished := cond (lt $minVersion 87) (.PublishDate.Format ( i18n "date_long" )) (.PublishDate | time.Format ":date_long") }} {{- $dateModified := cond (lt $minVersion 87) (.Lastmod.Format ( i18n "date_long" )) (.Lastmod | time.Format ":date_long") }} {{- $dateOnly := "2006-01-02" }} {{- $hasMod := ne (.PublishDate.Format $dateOnly) (.Lastmod.Format $dateOnly) }}
{{- if $hasMod }} {{- end }}
{{- end }} {{- define "partials/page/cover.html" -}} {{- "" | safeHTML }} {{- $page := .page }} {{- $src := or .page.Params.cover .page.Params.image }} {{- with .page.Resources.GetMatch "cover.*" }} {{- $src = .Permalink }} {{- end }} {{- return $src }} {{- end }} {{- define "partials/flowlines.html" -}} {{ "" | safeHTML }} {{- $flowlinesCount := site.Params.Feed.FlowlinesLimit | default 42 }} {{- $flowlinesDir := "https://raw.githubusercontent.com/foxihd/hugo-et-hd/master/static/svg/flowlines/" }} {{- $src := printf "%s%d.svg" $flowlinesDir (index (seq $flowlinesCount | shuffle) 1) }} {{- return $src }} {{- end }} {{- define "partials/page/audio.html" -}} {{- "" | safeHTML }} {{- $audioFormats := dict "aac" "audio/aac" "flac" "audio/flac" "mp3" "audio/mpeg" "oga" "audio/ogg" "ogg" "audio/ogg" "opus" "audio/opus" "wav" "audio/wav" "weba" "audio/webm" "webm" "audio/webm" }} {{- $audioFiles := dict }} {{- range $format, $type := $audioFormats }} {{- $file := $.Resources.GetMatch (printf "audio.%s" $format) }} {{- if $file }} {{- $audioFiles = merge $audioFiles (dict $format $file) }} {{- end }} {{- end }} {{- $audio := .Params.Audio }} {{- if or $audio $audioFiles }} {{- end }} {{- end }} {{- define "partials/post/tagged.html" -}} {{- with .Params.tags }}
{{ printf "%s:" (i18n "tags" (len . ))}}  {{ $class := cond (eq (len .) 1) "inline" "delimiter" }} {{ partial "terms.html" (dict "taxonomy" "tags" "class" $class "page" $) }}
{{- end }} {{- end }} {{- define "partials/post/colophon.html" -}} {{ "" | safeHTML }} {{- end }} {{- define "partials/post/history.html" -}} {{- "" | safeHTML }} {{- $dateMachine := "2006-01-02T15:04:05-07:00" }} {{- $minVersion := index ( split hugo.Version "." ) 1 }} {{- $datePublished := cond (lt $minVersion 87) (.PublishDate.Format ( i18n "date_long" )) (.PublishDate | time.Format ":date_long") }} {{- $dateModified := cond (lt $minVersion 87) (.Lastmod.Format ( i18n "date_long" )) (.Lastmod | time.Format ":date_long") }} {{- $dateOnly := "2006-01-02" }} {{- $hasMod := ne (.PublishDate.Format $dateOnly) (.Lastmod.Format $dateOnly) }} {{- if or .Params.History $hasMod }} {{- $author := .Params.author | default site.Params.Author.Name }}
{{ i18n "redactionHistory" }}
    {{- if .Params.History }} {{- range sort .Params.History "date" "asc" }}
  1. {{- $writtenAuthor := .author | default $author }} {{- with $writtenAuthor }}
    {{ . }}
    {{- end }} {{- with .editor }}
    {{ . }}
    {{- end }} {{- with .reviewer }}
    {{ . }}
    {{- end }} {{- with .note }}
    {{ . }}
    {{- end }}
  2. {{- end }} {{- else }}
  3. {{ printf "(%s)" (i18n "published") }}
  4. {{ printf "(%s)" (i18n "modified") }}
  5. {{- end }}

{{ i18n "redactionNotes" }}

{{- end }} {{- end }} {{- define "partials/post/contribute.html" -}} {{- if index site.Menus "contrib" }}
{{ i18n "contribAskReader" }}
{{ i18n "contribAskReaderResponse" }} {{- with .Params.Coffee }} {{ i18n "contribCoffeeStat" }} {{ printf "%d %s" . (i18n "cup" . | lower) }} {{ i18n "contribCoffeeStatPost" }} {{- end }} {{ i18n "contribAskReaderToContribute" }} {{ partial "menu.html" (dict "menuID" "contrib" "open" "open" "page" .)}}
{{- end }} {{- end }} {{- define "partials/post/related.html" -}} {{- "" | safeHTML }} {{- $related := site.RegularPages.Related . | first 5 }} {{- $series := .GetTerms "series" }} {{- if or $related $series }} {{- end }} {{- end }}