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

@ -1,10 +1,7 @@
{{ define "main" }}
<div class="content">
<article>
<div class="title">
<h1 class="content-title">{{ .Title }}</h1>
<div class="divider"></div>
</div>
{{ partial "components/title.html" .Title }}
{{.Content}}
</article>
<div class="team-list">
@ -12,9 +9,9 @@
<a href="{{.Permalink}}">
<div class="teammember">
{{ 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="{{ $.Site.Params.defaultimage }}" alt="Default Avatar">
{{- partial "components/image.html" (dict "style" "avatar" "url" $.Site.Params.defaultimage "alt" "Placeholder") -}}
{{ end }}
<h1 class="teammember-title">{{ .Params.name }}</h1>
{{- range .Params.jobs }}
@ -23,10 +20,10 @@
<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>
{{ partial "components/icon.html" (dict "type" "at" "url" "mailto:{{ .Params.mail }}") }}
{{end}}
</span>
</div>
@ -35,4 +32,4 @@
{{ end }}
</div>
</div>
{{ end }}
{{ end }}