Switch all pics to webp, + stuphs
This commit is contained in:
@ -99,7 +99,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
document.querySelectorAll('.photo').forEach(photoEl => {
|
||||
photoEl.addEventListener('click', () => {
|
||||
console.log('Photo clicked');
|
||||
photoEl.classList.toggle('full');
|
||||
// get next photo-full element inside the parent div
|
||||
let fullPhoto = photoEl.parentElement.querySelector('.photo-full');
|
||||
if (!fullPhoto) return;
|
||||
fullPhoto.style.display = 'block';
|
||||
fullPhoto.addEventListener('click', () => {
|
||||
fullPhoto.style.display = 'none';
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user