import * as basicLightbox from 'basiclightbox'

let images = document.querySelectorAll("img, .clickSpan");
for(let i = 0; i < images.length; i++){
    let element = images[i];
    if(!(element.getAttribute("data-noPreview") === "true")) {
        element.onclick = () => {
            const instance = basicLightbox.create(`
            <img src="${element.getAttribute("src")}">
            `);
            instance.show();
        }
    }
}