diff options
| author | Eltrac <eltrac233@gmail.com> | 2024-11-27 23:30:31 +0800 |
|---|---|---|
| committer | Eltrac <eltrac233@gmail.com> | 2024-11-27 23:30:31 +0800 |
| commit | ec185b944a5363dea702ae973062cfaa217160cd (patch) | |
| tree | 0cdb31831e19ad70134ef032f0c107f37ddef585 | |
| parent | 9e14c93ae3ec292eb5312576be379b7d20fc849f (diff) | |
fix: unable to load fancybox when multiple images exist
| -rw-r--r-- | themes/yinyang/layouts/_default/single.html | 5 | ||||
| -rw-r--r-- | themes/yinyang/layouts/shortcodes/img.html | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/themes/yinyang/layouts/_default/single.html b/themes/yinyang/layouts/_default/single.html index dabb5b5e..4a4d4037 100644 --- a/themes/yinyang/layouts/_default/single.html +++ b/themes/yinyang/layouts/_default/single.html @@ -89,6 +89,11 @@ </script> </div> {{ end }} + + <!-- use fancybox --> + <script> + Fancybox.bind("[data-fancybox]"); + </script> {{ partial "footer.html" . }} </div> diff --git a/themes/yinyang/layouts/shortcodes/img.html b/themes/yinyang/layouts/shortcodes/img.html index 9c64a5c1..4fd1f739 100644 --- a/themes/yinyang/layouts/shortcodes/img.html +++ b/themes/yinyang/layouts/shortcodes/img.html @@ -17,9 +17,4 @@ </figcaption> {{ end }} </figure> -<script> - Fancybox.bind("[data-fancybox]", { - // Your custom options -}); -</script> <!-- image -->
\ No newline at end of file |
