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,
|
||||
});
|
||||
});
|
@@ -1,10 +0,0 @@
|
||||
import PhotoSwipeLightbox from "js/photoswipe/photoswipe-lightbox.esm.js";
|
||||
|
||||
new PhotoSwipeLightbox({
|
||||
gallery: ".gallery",
|
||||
children: "a",
|
||||
showAnimationDuration: 300,
|
||||
hideAnimationDuration: 300,
|
||||
initialZoomLevel: "fit",
|
||||
pswpModule: () => import("js/photoswipe/photoswipe.esm.js"),
|
||||
}).init();
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user