Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 44 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,50 @@
<link rel="stylesheet" href="styles.css">
</head>
<body>
<!--Верстать тут-->
<div id="overlay" class="overlay">
<div class="lightbox">
<div id="cross-icon-container" class="icon-container">
<img src="x.svg">
</div>
<div id="logo-container">
<div class="logo100"><img id="logo1" src="designs/logo1.png" class="logo100"></div>
<div class="logo100"><img id="logo3" src="designs/logo3.jpg" class="logo100"></div>
</div>
<div class="progress-bar-background">
<div id="bar" class="progress-bar-container">
<div class="progress-bar">
<p class="progress-bar-top-text">Loading...</p>
</div>
</div>
<p class="progress-bar-text">Loading...</p>
</div>
<div class="accordion-group">
<div class="accordion">
<input type="checkbox" id="acc1">
<label for="acc1">Аккордеон 1</label>
<div class="panel">
<p>После долгих зим всегда приходит лето (Е)
Я знаю: где ты, с кем ты; но мне пофиг, где ты, с кем ты</p>
</div>
</div>
<div class="accordion">
<input type="checkbox" id="acc2">
<label for="acc2">Аккордеон 2</label>
<div class="panel">
<p>Двести двадцать третий, Трэвис давит на педаль кареты</p>
</div>
</div>
<div class="accordion">
<input type="checkbox" id="acc3">
<label for="acc3">Аккордеон 3</label>
<div class="panel">
<p>Мешаю ветер с дымом с окон AMG-пакета (Воу, воу, воу, воу-воу, ушёл)
</p>
</div>
</div>
</div>
</div>
</div>
<script src="index.js"></script>
</body>
</html>
21 changes: 15 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
/*
Изменить элементу цвет и ширину можно вот так:
const bar = document.getElementById('bar');
var width = 0;
incrementWidth();

const element = document.querySelector('.myElement');
element.style.color = 'red';
element.style.width = '300px';
*/
function incrementWidth() {
width++;
bar.style.width = width + '%';
if (width < 100) {
setTimeout(incrementWidth, 50);
}
}

const cross = document.getElementById('cross-icon-container');
cross.addEventListener('click', function() {
document.getElementById('overlay').style.display = 'none';
});
130 changes: 130 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
p {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.1);
display: flex;
justify-content: center;
align-items: center;
}

.lightbox {
position: relative;
display: flex;
flex-direction: column;
padding: 24px;
border-radius: 20px;
gap: 16px;
width: 640px;
background-color: white;
align-items: center;
justify-content: center;
}

#logo-container {
display: flex;
justify-content: center;
align-items: center;
gap: 16px;
}

.logo100 {
width: 100px;
height: 100px;
object-fit: contain;
overflow: hidden;
}

#logo3 {
transform: scale(1.15);
}

.icon-container {
display: flex;
padding: 4px;
border-radius: 20px;
background-color: #f0f0f0;
}

#cross-icon-container {
position: absolute;
top: 4px;
right: 4px;
}

.progress-bar-background {
position: relative;
display: flex;
justify-content: center;
height: 20px;
width: 350px;
background-color: #f0f0f0;
border-radius: 10px;
overflow: hidden;
}

.progress-bar-text {
margin: 0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 13px;
}

.progress-bar-top-text {
margin: 0;
color: white;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 13px;
}

.progress-bar-container {
position: absolute;
top: 0px;
left: 0px;
width: 0%;
height: 100%;
overflow: hidden;
}

.progress-bar {
display: flex;
justify-content: center;
position: absolute;
top: 0px;
left: 0px;
background-color: red;
width: 350px;
height: 100%;
}

.accordion input {
display: none;
}

.accordion label {
display: block;
background-color: #eee;
padding: 10px;
margin-top: 8px;
cursor: pointer;
border-radius: 4px;
}

.accordion .panel {
max-height: 0;
overflow: hidden;
transition: max-height 0.2s ease-out;
background-color: #f9f9f9;
padding: 0 10px;
border-radius: 4px;
}

.accordion input:checked ~ .panel {
max-height: 200px;
padding: 10px;
}
1 change: 1 addition & 0 deletions x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.