ready?
This commit is contained in:
parent
ac2c530405
commit
b71cbb37ef
2 changed files with 35 additions and 2 deletions
|
@ -84,7 +84,7 @@
|
||||||
<i class="fa fas fa-newspaper"></i>
|
<i class="fa fas fa-newspaper"></i>
|
||||||
{{ .Site.Params.photos.last | safeHTML }}
|
{{ .Site.Params.photos.last | safeHTML }}
|
||||||
</h2>
|
</h2>
|
||||||
<photos limit="4" />
|
{{ partial "photos.html" (dict "limit" 4) }}
|
||||||
<div class="index-more-section">
|
<div class="index-more-section">
|
||||||
<a
|
<a
|
||||||
href="{{ relLangURL "/photos" }}"
|
href="{{ relLangURL "/photos" }}"
|
||||||
|
@ -108,6 +108,5 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
Index
|
|
||||||
</main>
|
</main>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
34
layouts/partials/photos.html
Normal file
34
layouts/partials/photos.html
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{{ $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>
|
Loading…
Add table
Add a link
Reference in a new issue