20
assets/js/main.js
Normal file
20
assets/js/main.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import PhotoSwipeLightbox from "photoswipe/lightbox";
|
||||
import Masonry from "masonry-layout";
|
||||
|
||||
new PhotoSwipeLightbox({
|
||||
gallery: ".lightbox",
|
||||
children: "a",
|
||||
showAnimationDuration: 300,
|
||||
hideAnimationDuration: 300,
|
||||
initialZoomLevel: "fit",
|
||||
pswpModule: () => import("photoswipe"),
|
||||
}).init();
|
||||
|
||||
const masonryContainers = document.querySelectorAll(".masonry");
|
||||
masonryContainers.forEach((container) => {
|
||||
new Masonry(container, {
|
||||
itemSelector: ".grid-item",
|
||||
columnWidth: ".grid-sizer",
|
||||
percentPosition: true,
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user