This repository has been archived on 2026-05-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blowfish/layouts/shortcodes/gallery.html
T
MaikelChan 83eae55276 Gallery fixes.
- Fixed having multiple galleries in the same page with the same ID, which would cause the galleries after the first one not behaving correctly.
- Make sure that all images have finished loading before calling Packery, fixing some image overlapping problems.
2023-05-23 20:20:07 +02:00

15 lines
260 B
HTML

{{ $id := delimit (slice "gallery" .Ordinal) "-" }}
<div id="{{ $id }}">
{{ .Inner }}
</div>
<script>
$(window).on("load", function () {
$('#{{ $id }}').packery({
percentPosition: true,
gutter: 5,
resize: true
});
})
</script>