diff options
author | Thibaud Lepretre <thibaud.lepretre@gmail.com> | 2021-08-15 17:45:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-15 17:45:58 +0300 |
commit | 8223447a05f53c1e7602e65957d5b4ab12567e76 (patch) | |
tree | 7d46a0514e5e2e9ce62a1d7c0f04bfdf57726323 | |
parent | 37550aa165eec033e34f2e0f89cb0720d72a4c34 (diff) | |
parent | 46115c001948865a6d1eac9fce6df72e0dd0db5b (diff) |
Merge pull request #491 from kakawait/fix-fancybox-3-data-model
Fix reg from update to Fancybox 3.x.x
-rw-r--r-- | layouts/partials/post/gallery.html | 2 | ||||
-rw-r--r-- | layouts/shortcodes/image.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/post/gallery.html b/layouts/partials/post/gallery.html index 8ec52e5..220ede6 100644 --- a/layouts/partials/post/gallery.html +++ b/layouts/partials/post/gallery.html @@ -13,7 +13,7 @@ {{ $imageLength := len $image }} <div class="photo-box"> <a class="photo-box-inner fancybox" - data-fancybox-group="gallery-{{ $.File.UniqueID }}" + data-fancybox="gallery-{{ $.File.UniqueID }}" data-caption="{{ if gt $imageLength 2 }}{{ index $image 2 }}{{ else }}{{ index $image 1 }}{{ end }}" title="{{ if gt $imageLength 2 }}{{ index $image 2 }}{{ else }}{{ index $image 1 }}{{ end }}" href="{{ index $image 0 }}" diff --git a/layouts/shortcodes/image.html b/layouts/shortcodes/image.html index d02e51b..2e92509 100644 --- a/layouts/shortcodes/image.html +++ b/layouts/shortcodes/image.html @@ -21,7 +21,7 @@ {{ end }} <div class="figure {{ delimit ($.Scratch.Get "i-classes") " " }}" {{ with (.Get "thumbnailWidth") }}style="width:{{ . }};"{{ end }}> {{ if eq ($.Scratch.Get "i-fancybox") 1 }} - <a class="fancybox" href="{{ .Get "src" }}"{{ with (.Get "title") }} title="{{ . }}"{{ end }} data-fancybox-group="{{ with (.Get "group") }}{{ . }}{{ end }}"> + <a class="fancybox" href="{{ .Get "src" }}"{{ with (.Get "title") }} title="{{ . }}"{{ end }} data-fancybox="{{ with (.Get "group") }}{{ . }}{{ end }}"> {{ end }} <img class="fig-img" src="{{ with (.Get "thumbnail") }}{{ . }}{{ else }}{{ .Get "src" }}{{ end }}" {{ if or (.Get "thumbnail-width") (.Get "thumbnail-height") }}style="{{ with (.Get "thumbnail-width") }}width: {{ . }};{{ end }}{{ with (.Get "thumbnail-height") }}height: {{ . }};{{ end }}"{{ end }}{{ with (.Get "title") }} alt="{{ . }}"{{ end }}> {{ if eq ($.Scratch.Get "i-fancybox") 1 }} |