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,18 +1,15 @@
{{ define "main" }}
{{ with .Params.image }}
{{ if .url }}
<img class="coverimage" src="{{ .url }}" alt="{{ .alt }}" />
{{ else }}
<img class="coverimage" src="{{ . }}" />
{{ end }}
{{ with .Params.image }}
{{ if .url }}
{{- partial "components/image.html" (dict "style" "coverimage" "url" .url "alt" .alt) -}}
{{ else }}
{{- partial "components/image.html" (dict "style" "coverimage" "url" . "alt" "Cover") -}}
{{ end }}
<div class="content">
{{ with .Title }}
<div class="title">
<h1 class="content-title">{{ . }}</h1>
<div class="divider"></div>
</div>
{{ end }}
{{ .Content }}
</div>
{{ end }}
<div class="content">
{{ with .Title }}
{{ partial "components/title.html" . }}
{{ end }}
{{ .Content }}
</div>
{{ end }}