mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-22 22:45:42 -06:00
83eae55276
- 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.
15 lines
No EOL
260 B
HTML
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> |