blowfish/layouts/shortcodes/gallery.html
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
No EOL
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>