Home: Fix event annoucement summary

This commit is contained in:
jtbx 2023-10-08 17:38:54 +02:00
commit f0a4d81451
6 changed files with 40 additions and 26 deletions

View file

@ -1,22 +1,24 @@
{{- $page := .page -}}
{{- $isMain := not .subitem -}}
{{- $level := (.level | default 1) -}}
{{- $headingLink := (.headingLink | default false) -}}
{{- $showTags := not (.reduced | default false) -}}
{{- $showAuthors := not (.reduced | default false) -}}
{{ with $page }}
<header>
{{- if $isMain }}
<h1>{{ .Title }}</h1>
{{- else }}
<a href="{{ .Permalink }}"><h2>{{ .Title }}</h2></a>
{{- end }}
{{- 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">
<span class="li-space"><i class="fa-solid fa-calendar-day"></i> {{ .Date.Format "2006-01-02 15:04" }}</span>
<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 }}
{{- if $showTags }}
{{- with .Page.GetTerms "tags" }}
<span class="li-space"><i class="fa-solid fa-tag"></i>
{{- range . }}
@ -24,6 +26,8 @@
{{- end }}
</span>
{{- end }}
{{- end }}
{{- if $showAuthors }}
<br>
{{- with .Page.GetTerms "authors" }}
<span class="li-space"><i class="fa-regular fa-user"></i>
@ -32,6 +36,7 @@
{{- end }}
</span>
{{- end }}
{{- end }}
</div>
</header>
{{- end }}