🐛 fixed gallery loading packery problem

This commit is contained in:
Nuno Coração 2023-03-10 14:40:12 +00:00
parent 5d8c456ba7
commit 482204a0ba
2 changed files with 8 additions and 12 deletions

View file

@ -6,15 +6,11 @@
</div> </div>
<script> <script>
$(document).ready(function () {
document.addEventListener("DOMContentLoaded", function () { $('#{{ $id }}').packery({
setTimeout(() => { percentPosition: true,
var elem = document.querySelector('#{{ $id }}'); gutter: 5,
var pckry = new Packery(elem, { resize: true
percentPosition: true, });
gutter: 5, })
resize: true
});
}, 50)
});
</script> </script>

View file

@ -1,6 +1,6 @@
{ {
"name": "hugo-blowfish-theme", "name": "hugo-blowfish-theme",
"version": "2.30.0", "version": "2.31.0",
"description": "Blowfish theme for Hugo", "description": "Blowfish theme for Hugo",
"scripts": { "scripts": {
"fullinstall": "npm run preinstall && npm install && npm run postinstall", "fullinstall": "npm run preinstall && npm install && npm run postinstall",