Fix photo template

This commit is contained in:
Fundor333
2025-05-05 11:19:48 +02:00
parent c4a41e04a0
commit b50202ceac
30 changed files with 30 additions and 8 deletions

View File

@@ -21,16 +21,23 @@
{{ partial "toc.html" .}}
<div class="page-content e-content">
{{ with .Resources.ByType "image" }}
<div class="grid grid-cols-1 place-items-center ">
{{ range . }}
{{ $image := .Fit "1024x1024" }}
<figure class="figure grid grid-cols-1 place-items-center hmedia">
<img loading="lazy" class="u-photo u-featured rounded-lg shadow-2xl" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ $.Description }}">
<figcaption class="figure-caption">{{ $.Description }}</figcaption>
</figure>
{{ $image := . }}
{{ if $image }}
<div class="container-fluid text-justify">
{{ $resource := imageConfig (add "/content/" $image.RelPermalink) }}
<div class="flex flex-col items-stretch">
<figure class="figure hmedia">
<img loading="lazy" class="u-photo rounded-lg figure-img img-fluid" src="{{ $image.Permalink }}"alt="{{ $.Description }}">
{{if .Params.feature_link}}
<figcaption class="figure-caption">{{ $.Description }}</figcaption>
</figure>
<a class="self-center" href="{{ .Params.feature_link}}">{{.Params.feature_text}}</a>
{{end}}
</div>
{{end}}
{{ with .Exif }}
<table>
@@ -145,7 +152,6 @@
</div>
</div>
</article>
{{ partial "series.html" . }}