From ca58f51714e7a1e4740d24e4bf48dcb2aa240a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= <145160988+lyubdim@users.noreply.github.com> Date: Tue, 8 Apr 2025 18:03:17 +0500 Subject: [PATCH 1/4] task 1 --- index.html | 3 ++- styles.css | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 846cf93..e658258 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,8 @@ - + + \ No newline at end of file diff --git a/styles.css b/styles.css index e69de29..2fbd6ca 100644 --- a/styles.css +++ b/styles.css @@ -0,0 +1,5 @@ +#logo1, #logo2 { + width: 100px; + height: 100px; + object-fit: contain; +} \ No newline at end of file From f37f8d101a330a38eb34643d81e9109d57ebffb5 Mon Sep 17 00:00:00 2001 From: OK <143250301+OK219@users.noreply.github.com> Date: Tue, 8 Apr 2025 18:19:02 +0500 Subject: [PATCH 2/4] 2 --- index.html | 14 ++++++++++++ index.js | 22 +++++++++++++++++- styles.css | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index e658258..601a888 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,20 @@ + +
+ \ No newline at end of file diff --git a/index.js b/index.js index dd50919..9cef040 100644 --- a/index.js +++ b/index.js @@ -4,4 +4,24 @@ const element = document.querySelector('.myElement'); element.style.color = 'red'; element.style.width = '300px'; -*/ \ No newline at end of file +*/ +const modal = document.getElementById('modal'); +const overlay = document.getElementById('overlay'); +const closeBtn = document.getElementById('close-btn'); +const openModalBtn = document.querySelector('.open-modal-btn'); + +function openModal() { + modal.style.display = 'block'; + overlay.style.display = 'block'; + document.body.style.overflow = 'hidden'; +} + +function closeModal() { + modal.style.display = 'none'; + overlay.style.display = 'none'; + document.body.style.overflow = ''; +} + +openModalBtn.addEventListener('click', openModal); +closeBtn.addEventListener('click', closeModal); +overlay.addEventListener('click', closeModal); \ No newline at end of file diff --git a/styles.css b/styles.css index 2fbd6ca..032ca13 100644 --- a/styles.css +++ b/styles.css @@ -2,4 +2,70 @@ width: 100px; height: 100px; object-fit: contain; +} + +body { + font-family: Arial, sans-serif; + margin: 0; + padding: 20px; + line-height: 1.6; +} + +.overlay { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.5); + z-index: 1000; + display: none; +} + +.modal { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 640px; + max-width: 90%; + max-height: 90vh; + overflow-y: auto; + background-color: white; + border-radius: 8px; + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); + z-index: 1001; + display: none; +} + +.modal-header { + padding: 20px; + border-bottom: 1px solid #eee; + display: flex; + justify-content: space-between; + align-items: center; +} + +.close-btn { + background: none; + border: none; + font-size: 24px; + cursor: pointer; + color: #777; + padding: 0; + line-height: 1; +} + +.modal-content { + padding: 20px; +} + +.open-modal-btn { + padding: 10px 20px; + background-color: #4CAF50; + color: white; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 16px; } \ No newline at end of file From 3aba68b8dd594c451e387bd0289a760427dd8eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= <145160988+lyubdim@users.noreply.github.com> Date: Tue, 8 Apr 2025 18:30:17 +0500 Subject: [PATCH 3/4] task 3 --- index.html | 40 ++++++++++++++++++++++++---------------- styles.css | 44 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 67 insertions(+), 17 deletions(-) diff --git a/index.html b/index.html index 601a888..f2c8a49 100644 --- a/index.html +++ b/index.html @@ -6,22 +6,30 @@ - - - -
-