🐛 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>
<script>
document.addEventListener("DOMContentLoaded", function () {
setTimeout(() => {
var elem = document.querySelector('#{{ $id }}');
var pckry = new Packery(elem, {
percentPosition: true,
gutter: 5,
resize: true
});
}, 50)
});
$(document).ready(function () {
$('#{{ $id }}').packery({
percentPosition: true,
gutter: 5,
resize: true
});
})
</script>

View file

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