initial commit
This commit is contained in:
15
_javascript/modules/components/img-popup.js
Normal file
15
_javascript/modules/components/img-popup.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* 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}` });
|
||||
}
|
||||
Reference in New Issue
Block a user