FIX display of content and image of posts in list and single, FIX team list display

This commit is contained in:
Hoernschen 2025-08-11 21:48:18 +02:00
parent e21c1e2182
commit 58274050ef
Signed by: hoernschen
GPG key ID: 37591FAF4E6D3462
8 changed files with 100 additions and 89 deletions

View file

@ -1,35 +1,35 @@
{{ define "main" }}
<div class="team content">
<article>
{{ partial "components/title.html" .Title }}
{{.Content}}
</article>
<div class="list">
{{ range (where .Pages "Params.leaveDate" "==" nil).ByParam "startDate" }}
<a href="{{.Permalink}}">
<div class="member">
{{ if .Params.image }}
{{- partial "components/image.html" (dict "style" "avatar" "url" .Params.image "alt" .Params.name) -}}
{{ else }}
{{- partial "components/image.html" (dict "style" "avatar" "url" $.Site.Params.defaultimage "alt" "Placeholder") -}}
{{ end }}
<h1 class="title">{{ .Params.name }}</h1>
{{- range .Params.jobs }}
<p>{{ . }}</p>
{{- end }}
<div class="social-media">
<span>
{{- range .Params.social}}
{{ partial "components/icon.html" . }}
{{- end}}
{{if .Params.mail}}
{{ partial "components/icon.html" (dict "type" "at" "url" "mailto:{{ .Params.mail }}") }}
{{end}}
</span>
</div>
</div>
</a>
<article>
{{ partial "components/title.html" .Title }}
{{.Content}}
</article>
<div class="list">
{{ range (where .Pages "Params.leaveDate" "==" nil).ByParam "startDate" }}
<div class="member">
<a href="{{.Permalink}}">
{{ if .Params.image }}
{{- partial "components/image.html" (dict "style" "avatar" "url" .Params.image "alt" .Params.name) -}}
{{ else }}
{{- partial "components/image.html" (dict "style" "avatar" "url" $.Site.Params.defaultimage "alt" "Placeholder") -}}
{{ end }}
<h1 class="title">{{ .Params.name }}</h1>
{{- range .Params.jobs }}
<p>{{ . }}</p>
{{- end }}
</a>
<div class="social-media">
<span>
{{- range .Params.social }}
{{ partial "components/icon.html" . }}
{{- end }}
{{if .Params.mail}}
{{ partial "components/icon.html" (dict "type" "at" "url" (printf "mailto:%s" .Params.mail) ) }}
{{end}}
</span>
</div>
</div>
{{ end }}
</div>
</div>
{{ end }}