ccchh-website/themes/ccchh/layouts/partials/blog-header.html

43 lines
1.5 KiB
HTML
Raw Permalink Normal View History

{{- $page := .page -}}
2023-10-08 17:38:54 +02:00
{{- $level := (.level | default 1) -}}
{{- $headingLink := (.headingLink | default false) -}}
{{- $showTags := not (.reduced | default false) -}}
{{- $showAuthors := not (.reduced | default false) -}}
{{ with $page }}
<header>
2023-10-08 17:38:54 +02:00
{{- if $headingLink }}<a href="{{ .Permalink }}">{{ end }}
<h{{ $level }}>{{ .Title }}</h{{ $level }}>
{{- if $headingLink }}</a>{{ end }}
{{- with .Params.subtitle }}
<span class="subtitle">{{ . }}</span>
{{- end }}
<div class="infos">
2023-10-08 17:38:54 +02:00
<span class="li-space"><i class="fa-solid fa-calendar-day"></i> {{ .Date | time.Format "Mon, 2006-01-02 15:04" }}</span>
{{- with .Params.location }}
<span class="li-space"><i class="fa-solid fa-location-dot"></i> {{ . }}</span>
{{- end }}
2023-10-08 17:38:54 +02:00
{{- if $showTags }}
{{- with .Page.GetTerms "tags" }}
<span class="li-space"><i class="fa-solid fa-tag"></i>
{{- range . }}
<span class="li-comma"><a href="{{ .Permalink }}">{{ .Title }}</a></span>
{{- end }}
</span>
{{- end }}
2023-10-08 17:38:54 +02:00
{{- end }}
{{- if $showAuthors }}
<br>
{{- with .Page.GetTerms "authors" }}
<span class="li-space"><i class="fa-regular fa-user"></i>
{{- range . }}
<span class="li-comma"><a href="{{ .Permalink }}">{{ .Title }}</a></span>
{{- end }}
</span>
{{- end }}
2023-10-08 17:38:54 +02:00
{{- end }}
</div>
</header>
2023-10-27 00:08:07 +02:00
{{- end }}