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

37 lines
1.2 KiB
HTML

{{- $page := .page -}}
{{- $isMain := not .subitem -}}
{{ with $page }}
<header>
{{- if $isMain }}
<h1>{{ .Title }}</h1>
{{- else }}
<a href="{{ .Permalink }}"><h2>{{ .Title }}</h2></a>
{{- end }}
{{- with .Params.subtitle }}
<span class="subtitle">{{ . }}</span>
{{- end }}
<div class="infos">
<span class="li-space"><i class="fa-solid fa-calendar-day"></i> {{ .Date.Format "2006-01-02 15:04" }}</span>
{{- with .Params.location }}
<span class="li-space"><i class="fa-solid fa-location-dot"></i> {{ . }}</span>
{{- end }}
{{- 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 }}
<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 }}
</div>
</header>
{{- end }}