primo fix foldergallery
This commit is contained in:
parent
317e129f67
commit
663d6e80e8
@ -28,19 +28,16 @@
|
|||||||
<link rel="stylesheet" href="/js/jquery.fancybox.3.5.7.min.css" />
|
<link rel="stylesheet" href="/js/jquery.fancybox.3.5.7.min.css" />
|
||||||
|
|
||||||
<div class="gallery">
|
<div class="gallery">
|
||||||
{{ $path := print "content/gallery/" (.Get "src") }}
|
{{- range (.Page.Resources.ByType "image") -}}
|
||||||
{{ $url := print (.Get "src") }}
|
{{- $big := .Resize "x1600 webp q85" -}}
|
||||||
{{ range (readDir $path) }}
|
{{- $mid := .Resize "x1080 webp q80" -}}
|
||||||
{{/* don't try to display .DS_Store or directories */}}
|
{{- $sml := .Resize "x480 webp q70" -}}
|
||||||
{{ if and (ne .Name ".DS_Store") (not .IsDir) }}
|
{{- $thumb := .Resize "x200 webp q50" -}}
|
||||||
{{ $src := print "/it/gallery" "/" $url "/" .Name }}
|
<a data-fancybox="gallery" data-type="image"
|
||||||
{{/*
|
data-caption="{{ .Title }}"
|
||||||
troubleshoot the $src variable as needed
|
data-srcset="{{ $big.RelPermalink }} {{ $big.Width }}w, {{ $mid.RelPermalink }} {{ $mid.Width }}w, {{ $sml.RelPermalink }} {{ $sml.Width }}w"
|
||||||
<!-- <p>{{ $src }}</p> -->
|
href="{{ $big.RelPermalink }}">
|
||||||
*/}}
|
<img src="{{ $thumb.RelPermalink }}" alt="">
|
||||||
<a data-fancybox="gallery" data-caption="{{ .Name }}" href="{{ $src }}">
|
</a>
|
||||||
<img src="{{ $src }}"> <br/>
|
{{- end -}}
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
</div>
|
Loading…
x
Reference in New Issue
Block a user