diff --git a/public/assets/css/style.css b/public/assets/css/style.css
index ca24169..70cbfbe 100644
--- a/public/assets/css/style.css
+++ b/public/assets/css/style.css
@@ -52,6 +52,18 @@
min-height: 75vh;
}
+.fullscreen {
+ cursor: pointer;
+ max-width: 100%;
+ max-height: 100%;
+}
+
+#myModalImg {
+ max-width: 95vw;
+ max-height: 90vh;
+ margin: auto;
+ display: block;
+}
.bd-placeholder-img {
font-size: 1.125rem;
diff --git a/public/assets/js/script.js b/public/assets/js/script.js
index 7b55772..2197a94 100644
--- a/public/assets/js/script.js
+++ b/public/assets/js/script.js
@@ -9,15 +9,38 @@ function hidePage() {
document.getElementById("body").style.display = "none";
}
+
+function showFullscreenImage(element) {
+ imageSrc = element.getAttribute('src');
+ imageAlt = element.getAttribute('alt');
+
+ myModalImg = document.getElementById('myModalImg');
+ myModalImg.setAttribute('src', imageSrc);
+
+ myModalHeader = document.getElementById('myModalHeader');
+ myModalHeader.innerText = imageAlt;
+
+ const myModal = new bootstrap.Modal(document.getElementById('myModal'), {})
+ myModal.show();
+}
+
+
let showPage_var;
function ready() {
showPage_var = setTimeout(showPage, 10);
+
+ // let fullscreenImages = document.getElementsByClassName("fullscreen");
+ //
+ // Array.from(fullscreenImages).forEach(function(fullscreenImage) {
+ // fullscreenImage.addEventListener('click', showFullscreenImage);
+ // });
}
document.addEventListener("DOMContentLoaded", ready);
+
// Загрузка HTML из файла при загрузке URL
async function bodyFetch(url) {
if (!url) {
@@ -69,7 +92,7 @@ default:
// Загрузка HTML из файла при ПЕРЕХОДЕ ПО ССЫЛКЕ
let elements = document.getElementsByClassName("menu");
-let myFunction = async function(evt) {
+let fetchPage = async function(evt) {
evt.preventDefault();
const controller = new AbortController();
@@ -124,7 +147,7 @@ let myFunction = async function(evt) {
};
Array.from(elements).forEach(function(element) {
-element.addEventListener('click', myFunction);
+ element.addEventListener('click', fetchPage);
});
diff --git a/public/index.html b/public/index.html
index 82d962f..de1c513 100644
--- a/public/index.html
+++ b/public/index.html
@@ -24,13 +24,9 @@
-
+
-
+
@@ -203,6 +199,7 @@
-->
+