2021-06-20 22:19:09 +02:00
|
|
|
{{ $baseURL := .Page.RelPermalink }}
|
|
|
|
{{ $resources := .Page.Resources }}
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-02-02 17:38:21 +01:00
|
|
|
|
|
|
|
{{ $images := split (trim .Inner "\n") "!" }}
|
|
|
|
{{ $patternTitle := "\\[([^]]*)\\]\\(.*\\)" }}
|
|
|
|
{{ $patternPath := "\\[.*\\]\\(([^)]*)\\)" }}
|
|
|
|
|
2021-06-20 22:19:09 +02:00
|
|
|
<div class="masonry" itemscope itemtype="http://schema.org/ImageGallery">
|
|
|
|
|
2022-02-02 17:38:21 +01:00
|
|
|
{{ range $images }}
|
|
|
|
{{ with . }}
|
|
|
|
{{ $title := replaceRE $patternTitle "$1" . }}
|
|
|
|
{{ $path := trim (replaceRE $patternPath "$1" .) " \n" }}
|
|
|
|
<figure itemscope class="brick" itemtype="http://schema.org/ImageObject">
|
2021-06-20 22:19:09 +02:00
|
|
|
{{ $image := $resources.GetMatch (printf "*%s*" $path) }}
|
|
|
|
{{ $orientation := 1 }}
|
|
|
|
{{ with $image }}{{ with .Exif }}{{ $orientation = .Tags.Orientation }}{{ end }}{{ end }}
|
|
|
|
{{ if eq $orientation 8 }}
|
2024-02-19 12:24:12 +01:00
|
|
|
{{ $image = $image.Resize "600x r90" }}
|
2021-06-20 22:19:09 +02:00
|
|
|
{{ else if eq $orientation 6 }}
|
2024-02-19 12:24:12 +01:00
|
|
|
{{ $image = $image.Resize "600x r270" }}
|
2021-06-20 22:19:09 +02:00
|
|
|
{{ end }}
|
2024-02-19 12:24:12 +01:00
|
|
|
{{ $resized := $image.Resize "600x q100 webp" }}
|
2022-02-02 17:38:21 +01:00
|
|
|
<img src="{{ $resized.RelPermalink }}" alt="{{ $title }}" title="{{ $title }}" loading="lazy">
|
2021-06-20 22:19:09 +02:00
|
|
|
</figure>
|
|
|
|
{{ end }}
|
2022-02-02 17:38:21 +01:00
|
|
|
{{ end }}
|
2021-06-20 22:19:09 +02:00
|
|
|
</div>
|
|
|
|
<div class="container">
|
|
|
|
<div class="container news md">
|