CHANGE image handling, ADD partials to reuse structure, REFACTOR

This commit is contained in:
Hoernschen 2025-04-17 16:22:33 +02:00
parent 1265491dee
commit 01dcf04b8a
Signed by: hoernschen
GPG key ID: 37591FAF4E6D3462
36 changed files with 1181 additions and 864 deletions

View file

@ -10,18 +10,15 @@
{{end}}
<div id="{{ $id }}" class="section {{if eq $odd 0}} section-even {{end}}">
<div class="section-content team">
<div class="title">
<h1 class="content-title">{{ $team.title }}</h1>
<div class="divider"></div>
</div>
<div class="team-list">
{{ partial "components/title.html" $team.title }}
<div class="list">
{{- range first 4 ((where $pages "Params.leaveDate" "==" nil).ByParam "startDate") }}
<a href="{{.Permalink}}">
<div class="teammember">
<div class="member">
{{ if .Params.image }}
<img class="avatar" src="{{ .Params.image }}" alt="{{ .Params.name }} Avatar">
{{- partial "components/image.html" (dict "style" "avatar" "url" .Params.image "alt" .Params.name) -}}
{{ else }}
<img class="avatar" src="{{ $defaultimage }}" alt="Default Avatar">
{{- partial "components/image.html" (dict "style" "avatar" "url" $defaultimage "alt" "Placeholder") -}}
{{ end }}
<h1 class="teammember-title">{{ .Params.name }}</h1>
{{- range .Params.jobs }}
@ -30,17 +27,18 @@
<div class="social-media">
<span>
{{- range .Params.social}}
<a href="{{ .url }}"><i class="icon-{{ .type }}"></i></a>
{{ partial "components/icon.html" . }}
{{- end}}
{{if .Params.mail}}
<a href="mailto:{{ .Params.mail }}"><i class="icon-at"></i></a>
{{end}}
{{ if .Params.mail }}
{{ $mailto := "mailto:{{ .Params.mail }}" }}
{{ partial "components/icon.html" (dict "type" "at" "url" $mailto) }}
{{ end }}
</span>
</div>
</div>
</a>
{{- end }}
</div>
<div class="more-button"><a href="{{ $team.id }}"> {{ $team.moretext }} </a></div>
{{ partial "components/button.html" (dict "type" "text block" "url" $team.id "text" ($team.more | default "More")) }}
</div>
</div>
</div>