redo css, adaptive scaling

This commit is contained in:
2022-01-25 15:04:00 +01:00
parent 3335f5958e
commit 516287ee85
4 changed files with 75 additions and 58 deletions

View File

@@ -1,11 +1,6 @@
// #region Modal
var modal = document.getElementById('modal');
var modalClose = document.getElementById('modal-close');
modalClose.addEventListener('click', function() {
modal.style.display = "none";
});
// global handler
document.addEventListener('click', function (e) {
if (e.target.className.indexOf('modal-target') !== -1) {
@@ -15,6 +10,8 @@ document.addEventListener('click', function (e) {
modal.style.display = "block";
modalImg.src = img.src;
captionText.innerHTML = img.alt;
} else if (modal.style.display != "none") {
modal.style.display = "none";
}
});
// #endregion