mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-22 14:35:43 -06:00
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.
This commit is contained in:
parent
3c0d54c41d
commit
83eae55276
1 changed files with 2 additions and 3 deletions
|
@ -1,12 +1,11 @@
|
|||
{{ $time := now.UnixNano }}
|
||||
{{ $id := delimit (slice "gallery" .Ordinal $time) "-" }}
|
||||
{{ $id := delimit (slice "gallery" .Ordinal) "-" }}
|
||||
|
||||
<div id="{{ $id }}">
|
||||
{{ .Inner }}
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$(window).on("load", function () {
|
||||
$('#{{ $id }}').packery({
|
||||
percentPosition: true,
|
||||
gutter: 5,
|
||||
|
|
Loading…
Reference in a new issue