From e827a093fb7a4919b671f5d0047eaba60efe0938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=92=D0=BB=D0=B0?= =?UTF-8?q?=D0=B4=D0=B8=D0=BC=D0=B8=D1=80=D0=BE=D0=B2?= Date: Tue, 8 Apr 2025 15:48:09 +0500 Subject: [PATCH 1/7] 2 --- index.html | 20 +++++++++++++++++--- index.js | 38 +++++++++++++++++++++++++++++++++++++ styles.css | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 846cf93..05ae6c1 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,21 @@ - - + + + + + +
+ +
+ + - \ No newline at end of file + diff --git a/index.js b/index.js index dd50919..49f5487 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,41 @@ +// Закрытие по кнопке "крестик" +document.getElementById('closeModal').onclick = function () { + document.getElementById('modalOverlay').style.display = 'none'; +}; + +// Закрытие по кнопке "Close" +document.getElementById('closeButton').onclick = function () { + document.getElementById('modalOverlay').style.display = 'none'; +}; + +// Закрытие при клике вне модального окна +window.onclick = function(event) { + const overlay = document.getElementById('modalOverlay'); + if (event.target === overlay) { + overlay.style.display = 'none'; + } +}; + +// Закрытие по нажатию ESC +document.addEventListener('keydown', function(event) { + if (event.key === "Escape") { + document.getElementById('modalOverlay').style.display = 'none'; + } +}); + +// Показ по кнопке (если добавишь кнопку в HTML) +/* +document.getElementById('showModalBtn').onclick = function () { + document.getElementById('modalOverlay').style.display = 'flex'; +}; +*/ +/* + Изменить элементу цвет и ширину можно вот так: + + const element = document.querySelector('.myElement'); + element.style.color = 'red'; + element.style.width = '300px'; +*/ /* Изменить элементу цвет и ширину можно вот так: diff --git a/styles.css b/styles.css index e69de29..2edebc4 100644 --- a/styles.css +++ b/styles.css @@ -0,0 +1,55 @@ +body { + margin: 0; + font-family: sans-serif; +} + +.overlay { + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background: rgba(0, 0, 0, 0.6); + display: flex; + align-items: center; + justify-content: center; + z-index: 1000; +} + +.modal { + position: relative; + background: white; + width: 640px; + padding: 24px; + border-radius: 4px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); +} + +.close-btn { + position: absolute; + top: 10px; + right: 12px; + background: none; + border: none; + font-size: 20px; + cursor: pointer; +} + +.modal h2 { + margin-top: 0; +} + +.modal a { + color: #4CAF50; + text-decoration: none; +} + +.modal .green-btn { + margin-top: 16px; + background-color: #4CAF50; + color: white; + padding: 8px 16px; + border: none; + cursor: pointer; + border-radius: 4px; +} From e3ea80901fd51d7dd2b28780fb8bd1ca76381b3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=92=D0=BB=D0=B0?= =?UTF-8?q?=D0=B4=D0=B8=D0=BC=D0=B8=D1=80=D0=BE=D0=B2?= Date: Tue, 8 Apr 2025 15:55:47 +0500 Subject: [PATCH 2/7] 3 --- index.html | 24 +++++++++++++++--------- index.js | 43 +++++++++---------------------------------- styles.css | 50 ++++++++++++++++++++++++++++++++++++++++---------- 3 files changed, 64 insertions(+), 53 deletions(-) diff --git a/index.html b/index.html index 05ae6c1..1c1a09a 100644 --- a/index.html +++ b/index.html @@ -2,22 +2,28 @@ - Практика позиционирования + Модалка с прогресс-баром - - - - +
diff --git a/index.js b/index.js index 49f5487..b27f7c1 100644 --- a/index.js +++ b/index.js @@ -1,45 +1,20 @@ -// Закрытие по кнопке "крестик" -document.getElementById('closeModal').onclick = function () { +// Закрытие по кнопке +document.getElementById('closeModal').onclick = () => { document.getElementById('modalOverlay').style.display = 'none'; }; - -// Закрытие по кнопке "Close" -document.getElementById('closeButton').onclick = function () { +document.getElementById('closeButton').onclick = () => { document.getElementById('modalOverlay').style.display = 'none'; }; -// Закрытие при клике вне модального окна -window.onclick = function(event) { +// Закрытие по клику вне окна +window.onclick = (e) => { const overlay = document.getElementById('modalOverlay'); - if (event.target === overlay) { - overlay.style.display = 'none'; - } + if (e.target === overlay) overlay.style.display = 'none'; }; -// Закрытие по нажатию ESC -document.addEventListener('keydown', function(event) { - if (event.key === "Escape") { +// ESC +document.addEventListener('keydown', (e) => { + if (e.key === "Escape") { document.getElementById('modalOverlay').style.display = 'none'; } }); - -// Показ по кнопке (если добавишь кнопку в HTML) -/* -document.getElementById('showModalBtn').onclick = function () { - document.getElementById('modalOverlay').style.display = 'flex'; -}; -*/ -/* - Изменить элементу цвет и ширину можно вот так: - - const element = document.querySelector('.myElement'); - element.style.color = 'red'; - element.style.width = '300px'; -*/ -/* - Изменить элементу цвет и ширину можно вот так: - - const element = document.querySelector('.myElement'); - element.style.color = 'red'; - element.style.width = '300px'; -*/ \ No newline at end of file diff --git a/styles.css b/styles.css index 2edebc4..d98702e 100644 --- a/styles.css +++ b/styles.css @@ -35,16 +35,7 @@ body { cursor: pointer; } -.modal h2 { - margin-top: 0; -} - -.modal a { - color: #4CAF50; - text-decoration: none; -} - -.modal .green-btn { +.green-btn { margin-top: 16px; background-color: #4CAF50; color: white; @@ -53,3 +44,42 @@ body { cursor: pointer; border-radius: 4px; } + +.progress-container { + margin-top: 20px; +} + +.progress-bar { + position: relative; + width: 100%; + height: 40px; + background-color: #ccc; + overflow: hidden; +} + +.progress-fill { + position: absolute; + height: 100%; + width: 30%; /* Измени процент для имитации прогресса */ + background-color: red; + z-index: 1; +} + +.progress-text { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + font-size: 24px; + font-weight: bold; + white-space: nowrap; + z-index: 2; +} + +.progress-text .white { + color: white; +} + +.progress-text .black { + color: black; +} From f92aa40cac6a220ee0e037d5c2b14e1287efd4d0 Mon Sep 17 00:00:00 2001 From: EgorKolovev <118982453+EgorKolovev@users.noreply.github.com> Date: Tue, 8 Apr 2025 16:03:54 +0500 Subject: [PATCH 3/7] task1 --- index.html | 13 ++++++++++--- index.js | 3 --- styles.css | 24 +++++++++++++++++++++++- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 1c1a09a..25d4d96 100644 --- a/index.html +++ b/index.html @@ -2,18 +2,16 @@ - Модалка с прогресс-баром + Модалка с прогресс-баром и логотипами -
@@ -64,6 +37,33 @@

Прогресс загрузки

+ +
+
+ + +
+

Frontend — это часть веб-разработки, отвечающая за отображение и взаимодействие с пользователем. HTML, CSS и JavaScript — основные технологии.

+
+
+ +
+ + +
+

Backend — это логика приложения на сервере, работа с базами данных, авторизация, обработка запросов. Используются языки как PHP, Python, Node.js.

+
+
+ +
+ + +
+

UX/UI дизайнер разрабатывает визуальный стиль приложения и взаимодействие пользователя с системой. Занимается прототипами, юзабилити, визуалом.

+
+
+
+ From 814c5a0e2e45cb6563a51ab8641b82853ec1226b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=92=D0=BB=D0=B0?= =?UTF-8?q?=D0=B4=D0=B8=D0=BC=D0=B8=D1=80=D0=BE=D0=B2?= Date: Tue, 8 Apr 2025 16:30:57 +0500 Subject: [PATCH 7/7] full 5 --- index.html | 3 --- index.js | 3 +-- styles.css | 6 ------ 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/index.html b/index.html index d3800f0..7549c0a 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,6 @@ -
-
Logo 1 @@ -37,7 +35,6 @@

Прогресс загрузки

-
diff --git a/index.js b/index.js index 69959f6..dd20e9d 100644 --- a/index.js +++ b/index.js @@ -24,7 +24,7 @@ const interval = setInterval(() => { const redWidth = progressFill.offsetWidth; const percentRed = redWidth / totalWidth; - const redChars = Math.round(letters.length * percentRed); + const redChars = Math.round(letters.length * percentRed) + 3; const redText = letters.slice(0, redChars).join(''); const blackTextPart = letters.slice(redChars).join(''); @@ -33,7 +33,6 @@ const interval = setInterval(() => { }, 1000 / fps); -// === Закрытие модального окна === // document.addEventListener("DOMContentLoaded", () => { const overlay = document.getElementById('modalOverlay'); const closeModal = document.getElementById('closeModal'); diff --git a/styles.css b/styles.css index 6da914a..f0e9df2 100644 --- a/styles.css +++ b/styles.css @@ -1,4 +1,3 @@ -/* Оверлей и модалка */ body { margin: 0; font-family: sans-serif; @@ -28,7 +27,6 @@ body { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); } -/* Кнопка закрытия */ .close-btn { position: absolute; top: 10px; @@ -39,7 +37,6 @@ body { cursor: pointer; } -/* Прогресс-бар */ .progress-container { margin-top: 20px; } @@ -77,7 +74,6 @@ body { color: black; } -/* Аккордеон */ .accordion { margin: 20px 0; border-top: 1px solid #ccc; @@ -107,7 +103,6 @@ body { padding: 12px; } -/* Логотипы */ .logos { display: flex; justify-content: space-around; @@ -120,7 +115,6 @@ body { display: block; } -/* Кнопка закрытия */ .green-btn { margin-top: 20px; background-color: #4CAF50;