Skip to content

Commit

Permalink
popup (#110)
Browse files Browse the repository at this point in the history
* popup

* Update style.css

* update index.html

* update index.html

* update index.html

* update.style.css

* update index.html

* update css

* update css

* bug fixes

* update index.html

* update index.html

* update index.html
  • Loading branch information
vovan-zt authored Aug 19, 2022
1 parent 22dce6d commit b25f396
Show file tree
Hide file tree
Showing 2 changed files with 252 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>popup</title>
</head>
<body>

<nav class="navigation">
<ul class="navigation__list">
<li class="navigation__item">
<a href="#"><img class="navigation__image" src="icons/bell.png" alt="" > </a>
</li>
<li class="navigation__item">
<a href="#"><img class="navigation__image" src="icons/bell.png" alt="" ></a>
</li>
<li class="navigation__item navigation__item-modal">
<input class="navigation__check_input" type="checkbox" name="modal" id="modal" >

<div class="modal">

<ul class="modal__list">
<li class="modal__item"><a class="modal__link" href="#"> <img class="modal__image" src="icons/apps.png" alt="" ><span class="modal__descr">item1</span></a></li>
<li class="modal__item"><a class="modal__link" href="#"> <img class="modal__image" src="icons/blogs.png" alt=""><span class="modal__descr">item2</span></a></li>
<li class="modal__item"><a class="modal__link" href="#"> <img class="modal__image" src="icons/calendar.png" alt=""><span class="modal__descr">item3</span></a></li>
<li class="modal__item"><a class="modal__link" href="#"> <img class="modal__image" src="icons/chat.png" alt=""><span class="modal__descr">item4</span></a></li>
<li class="modal__item"><a class="modal__link" href="#"> <img class="modal__image" src="icons/classroom.png" alt=""><span class="modal__descr">item5</span></a></li>
<li class="modal__item"><a class="modal__link" href="#"> <img class="modal__image" src="icons/collection.png" alt=""><span class="modal__descr">item6</span></a></li>
<li class="modal__item"><a class="modal__link" href="#"> <img class="modal__image" src="icons/contacts.png" alt=""><span class="modal__descr">item7</span></a></li>
<li class="modal__item"><a class="modal__link" href="#"> <img class="modal__image" src="icons/documents.png" alt=""><span class="modal__descr">item8</span></a></li>
<li class="modal__item"><a class="modal__link" href="#"> <img class="modal__image" src="icons/files.png" alt=""><span class="modal__descr">item9</span></a></li>
<li class="modal__item"><a class="modal__link" href="#"> <img class="modal__image" src="icons/mail.png" alt=""><span class="modal__descr">item10</span></a></li>
<li class="modal__item"><a class="modal__link" href="#"> <img class="modal__image" src="icons/maps.png" alt=""><span class="modal__descr">item11</span></a></li>
<li class="modal__item"><a class="modal__link" href="#"> <img class="modal__image" src="icons/mars.png" alt=""><span class="modal__descr">item12</span></a></li>

<input class="navigation__check_input" type="checkbox" name="modal2" id="modal2">
<label for="modal2" class="modal__button"></label>

<li class="modal__item modal__item2" ><a class="modal__link" href="#"><img class="modal__image" src="icons/collection.png" alt=""><span class="modal__descr">item13</span></a></li>
<li class="modal__item modal__item2" ><a class="modal__link" href="#"><img class="modal__image" src="icons/contacts.png" alt=""><span class="modal__descr">item14</span></a></li>
<li class="modal__item modal__item2" ><a class="modal__link" href="#"><img class="modal__image" src="icons/documents.png" alt=""><span class="modal__descr">item15</span></a></li>
<li class="modal__item modal__item2" ><a class="modal__link" href="#"><img class="modal__image" src="icons/files.png" alt=""><span class="modal__descr">item16</span></a></li>
<li class="modal__item modal__item2" ><a class="modal__link" href="#"><img class="modal__image" src="icons/mail.png" alt=""><span class="modal__descr">item17</span></a></li>
<li class="modal__item modal__item2" ><a class="modal__link" href="#"><img class="modal__image" src="icons/maps.png" alt=""><span class="modal__descr">item18</span></a></li>
<li class="modal__item modal__item2" ><a class="modal__link" href="#"><img class="modal__image" src="icons/mars.png" alt=""><span class="modal__descr">item19</span></a></li>
<li class="modal__item modal__item2" ><a class="modal__link" href="#"><img class="modal__image" src="icons/maps.png" alt=""><span class="modal__descr">item20</span></a></li>
<li class="modal__item modal__item2" ><a class="modal__link" href="#"><img class="modal__image" src="icons/mars.png" alt=""><span class="modal__descr">item21</span></a></li>
</ul>
</div>
</li>
<li class="navigation__item">
<a href="#"><img class="navigation__image" src="icons/bell.png" alt=""></a>
</li>
<li class="navigation__item">
<a href="#"><img class="navigation__image" src="icons/bell.png" alt=""></a>
</li>
</ul>
</nav>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

.navigation {
display: flex;
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, 0.2);
height: 80px;
}

.navigation__list {
margin: 1rem;
display: grid;
grid-template-columns: repeat(5, 50px);
gap: 20px;
align-items: start;
justify-items: start;

}

.navigation__item {
list-style-type: none;
text-decoration: none;
border-radius: 10px;
cursor: pointer;
padding: 10px;
justify-items: center;
}

.navigation__item:hover {
border-radius:10px;
box-shadow: 5px 5px 5px rgba(40, 9, 9, 0.15);
background-color:rgba(0, 0, 0, 0.1)
}

.navigation__item:focus {
padding: 4px;
border: 2px solid rgb(19, 18, 18);
}

.navigation__image {
width: 30px;
height: 30px;
cursor: pointer;
}

.navigation__item-modal {
position: relative;
width: 50px;
height: 55px;
}

.navigation__check_input{
position: absolute;
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
}

.navigation__check_input:focus ~label{
outline-style: solid;
border-radius:5px;
outline-width: 0.15rem;
}

#modal {
background-image: url(icons/popup-button.png);
background-size: 100%;
height: 32px;
width: 32px;
cursor: pointer;
}

.modal {
display: none;
position: absolute;
top: 67px;
right: -150px;
overflow: auto;
width: 360px;
height: 500px;
box-shadow: 5px 5px 10px rgba(0,0,0,0.25);
background-color: rgba(0, 0, 0, 0.4);
padding: 20px;
}

.modal::-webkit-scrollbar {
width: 10px;
height: 0;
}
.modal::-webkit-scrollbar-thumb {
background: rgb(233, 197, 18);
border-radius:5px;
}

.modal__list {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-auto-rows: 90px;
list-style: none;
gap: 30px 30px;
align-items: center;
justify-items: center;
}

.modal__item {
list-style-type: none;
text-decoration: none;
display:flex;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
}

.modal__item:hover {
border-radius:10px;
box-shadow: 5px 5px 5px rgba(40, 9, 9, 0.15);
background-color:rgba(0, 0, 0, 0.1)
}

.modal__item:focus {
padding: 4px;
border: 2px solid rgb(19, 18, 18);
}

.modal__link {
text-decoration: none;

}

.modal__image {
width: 40px;
height: auto;
display: block;

}

.modal__descr {
display: block;
margin-top: 5px;
text-align: center;
}

.modal__item2 {
display: none;
}

#modal:checked ~ .modal {
display: flex;
flex-direction: column-reverse;
}

.modal__button {
position: absolute;
display: block;
width: 200px;
padding: 10px;
height: 30px;
color: #121111;
background-color:rgb(99, 108, 108);
border-radius:10px;
text-align: center;
cursor: pointer;
bottom: 0;
left: 80px;
}

.modal__button::before {
content: 'Bottom';
color:white;
}

.modal__button:hover {
box-shadow: 5px 5px 10px rgba(0,0,0,0.25);
background-color:rgb(61, 76, 76);
}

#modal2:checked~.modal__item2 {
display:flex;
}

#modal2:checked ~ .modal__button::before {
content: 'UP';
}

0 comments on commit b25f396

Please sign in to comment.