🐛 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(() => {
var elem = document.querySelector('#{{ $id }}');
var pckry = new Packery(elem, {
percentPosition: true, percentPosition: true,
gutter: 5, gutter: 5,
resize: true 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",