From 70a174c098aead0791e8f350ace76bf7e5af6282 Mon Sep 17 00:00:00 2001 From: dabbl Date: Tue, 8 Apr 2025 17:57:44 +0500 Subject: [PATCH 1/6] add 1 --- index.html | 3 ++- styles.css | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 846cf93..85f30e9 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..1bea40a 100644 --- a/styles.css +++ b/styles.css @@ -0,0 +1,6 @@ +.logo { + overflow: hidden; + width: 100px; + height: 100px; + object-fit: contain; +} \ No newline at end of file From 9208ecb70f8cee4b00e0acbbe30f8057adee8c9c Mon Sep 17 00:00:00 2001 From: Bu16a Date: Tue, 8 Apr 2025 18:11:43 +0500 Subject: [PATCH 2/6] =?UTF-8?q?=D0=92=D1=82=D0=BE=D1=80=D0=BE=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 17 +++++++++++++++++ index.js | 19 ++++++++++++++++++- styles.css | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 85f30e9..aca8e38 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,23 @@ +
+ +
+ \ No newline at end of file diff --git a/index.js b/index.js index dd50919..5e7c193 100644 --- a/index.js +++ b/index.js @@ -4,4 +4,21 @@ const element = document.querySelector('.myElement'); element.style.color = 'red'; element.style.width = '300px'; -*/ \ No newline at end of file +*/ +document.addEventListener('DOMContentLoaded', function() { + document.querySelector('.overlay').style.display = 'flex'; + + function closeModal() { + document.querySelector('.overlay').style.display = 'none'; + } + + document.querySelectorAll('.close-btn').forEach(btn => { + btn.addEventListener('click', closeModal); + }); + + document.querySelector('.overlay').addEventListener('click', function(e) { + if (e.target === this) { + closeModal(); + } + }); +}); \ No newline at end of file diff --git a/styles.css b/styles.css index 1bea40a..6f89b49 100644 --- a/styles.css +++ b/styles.css @@ -3,4 +3,38 @@ width: 100px; height: 100px; object-fit: contain; +} + +.overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0,0,0,0.5); + display: flex; + justify-content: center; + align-items: center; +} + +.modal { + width: 640px; + background: white; + padding: 20px; + position: relative; + border-radius: 5px; +} + +.close-btn { + position: absolute; + top: 10px; + right: 10px; + cursor: pointer; + border: none; + background: none; + font-size: 20px; +} + +.close-btn:hover { + color: #666; } \ No newline at end of file From 7996feda56fcc5260040c3a4640bdae278c50056 Mon Sep 17 00:00:00 2001 From: Bu16a Date: Tue, 8 Apr 2025 18:19:07 +0500 Subject: [PATCH 3/6] 2_dop --- index.html | 3 ++- index.js | 17 +++++++++-------- styles.css | 16 ++++++++++++++++ 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index aca8e38..3a0ea20 100644 --- a/index.html +++ b/index.html @@ -8,9 +8,10 @@ +