fe7afa379f
Also replaced `magnific-popup` with `GLightbox`
15 lines
279 B
JavaScript
15 lines
279 B
JavaScript
/**
|
|
* Set up image popup
|
|
*
|
|
* Dependencies: https://github.com/biati-digital/glightbox
|
|
*/
|
|
|
|
const IMG_CLASS = 'popup';
|
|
|
|
export function imgPopup() {
|
|
if (document.getElementsByClassName(IMG_CLASS).length === 0) {
|
|
return;
|
|
}
|
|
|
|
GLightbox({ selector: `.${IMG_CLASS}` });
|
|
}
|