website/layouts/partials/photos.html

35 lines
955 B
HTML
Raw Normal View History

2024-05-11 11:59:48 +02:00
{{ $photos := (resources.Match "posts/*")}} {{/*resources.ByType "image" */}}
<div class="transition-parent photos-list">
{{ if (or (eq $photos nil) (eq (len $photos) 0))}}
<div
class="transition-child section-error-container"
style="height: 100%;">
<div class="section-error-content">
<i class="fa fas fa-times-circle"></i>
{{ .Site.Params.photos.empty }}
</div>
</div>
{{ else }}
<div
class="photos-list-photos">
{{ range $photos }}
<a
style="background-image:url({{ .RelPermalink }});"
title="{{ .Name }}"
class="photos-list-item"
href="{{ .RelPermalink }}"
target="_blank"
>
</a>
{{ end }}
</div>
{{ end }}
<no-ssr>
<vue-gallery-slideshow
:images="photosSlideShow"
:index="index"
@close="index = null"
></vue-gallery-slideshow>
</no-ssr>
</div>