Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Html css popup #572

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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
163 changes: 163 additions & 0 deletions submissions/JuliaLuccio/HTML-CSS-Popup/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
<!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">
<title>HTML-CSS-Popup</title>
<link rel="stylesheet" href="./reset.css">
<link rel="icon" type="image/png" href="./popup-icons/favicon.png">
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div class="container">
<nav class="nav">
<ul class="nav__list">
<li class="nav__list-item">
<a class="nav__list-item-link" href="#">Mail</a>
</li>
<li class="nav__list-item">
<a class="nav__list-item-link" href="#">Images</a>
</li>
<li class="nav__list-item menu-item">
<input class="menu-item__inp" type="checkbox" name="menu" id="menu">
<ul class="menu-item__list">
<li class="menu-item__list-elem">
<a class="menu-item__list-elem-link" href="#">
<img class="menu-item__list-elem-link-img" src="./popup-icons/calendar.png" alt="calendar">
Calendar
</a>
</li>
<li class="menu-item__list-elem">
<a class="menu-item__list-elem-link" href="#">
<img class="menu-item__list-elem-link-img" src="./popup-icons/mail.png" alt="letter">
Mail
</a>
</li>
<li class="menu-item__list-elem">
<a class="menu-item__list-elem-link" href="#">
<img class="menu-item__list-elem-link-img" src="./popup-icons/news.png" alt="newspaper">
News
</a>
</li>
<li class="menu-item__list-elem">
<a class="menu-item__list-elem-link" href="#">
<img class="menu-item__list-elem-link-img" src="./popup-icons/maps.png" alt="map">
Map
</a>
</li>
<li class="menu-item__list-elem">
<a class="menu-item__list-elem-link" href="#">
<img class="menu-item__list-elem-link-img" src="./popup-icons/files.png" alt="folder">
Files
</a>
</li>
<li class="menu-item__list-elem">
<a class="menu-item__list-elem-link" href="#">
<img class="menu-item__list-elem-link-img" src="./popup-icons/contacts.png" alt="contact">
Contacts
</a>
</li>
<li class="menu-item__list-elem">
<a class="menu-item__list-elem-link" href="#">
<img class="menu-item__list-elem-link-img" src="./popup-icons/translation.png" alt="translate">
Translate
</a>
</li>
<li class="menu-item__list-elem">
<a class="menu-item__list-elem-link" href="#">
<img class="menu-item__list-elem-link-img" src="./popup-icons/videos.png" alt="video">
Videos
</a>
</li>
<li class="menu-item__list-elem">
<a class="menu-item__list-elem-link" href="#">
<img class="menu-item__list-elem-link-img" src="./popup-icons/search.png" alt="search">
Search
</a>
</li>
<li class="menu-item__list-elem">
<a class="menu-item__list-elem-link" href="#">
<img class="menu-item__list-elem-link-img" src="./popup-icons/photos.png" alt="photo">
Photo
</a>
</li>
<li class="menu-item__list-elem">
<a class="menu-item__list-elem-link" href="#">
<img class="menu-item__list-elem-link-img" src="./popup-icons/apps.png" alt="apps">
Apps
</a>
</li>
<li class="menu-item__list-elem">
<a class="menu-item__list-elem-link" href="#">
<img class="menu-item__list-elem-link-img" src="./popup-icons/documents.png" alt="document">
Document
</a>
</li>
<li class="menu-item__list-more">
<input class="menu-item__list-more-inp" type="checkbox" name="menu-more" id="menu-more">
<ul class="menu-plus">
<li class="menu-plus__item">
<a class="menu-plus__item-link" href="#">
<img class="menu-plus__item-link-img" src="./popup-icons/chat.png" alt="smiles">
Chat
</a>
</li>
<li class="menu-plus__item">
<a class="menu-plus__item-link" href="#">
<img class="menu-plus__item-link-img" src="./popup-icons/classroom.png" alt="board">
Classroom
</a>
</li>
<li class="menu-plus__item">
<a class="menu-plus__item-link" href="#">
<img class="menu-plus__item-link-img" src="./popup-icons/collection.png" alt="star">
Collection
</a>
</li>
<li class="menu-plus__item">
<a class="menu-plus__item-link" href="#">
<img class="menu-plus__item-link-img" src="./popup-icons/mars.png" alt="red ball">
Mars
</a>
</li>
<li class="menu-plus__item">
<a class="menu-plus__item-link" href="#">
<img class="menu-plus__item-link-img" src="./popup-icons/blogs.png" alt="blogs">
Blogs
</a>
</li>
<li class="menu-plus__item">
<a class="menu-plus__item-link" href="#">
<img class="menu-plus__item-link-img" src="./popup-icons/promos.png" alt="loudspeaker">
Promos
</a>
</li>
<li class="menu-plus__even-more">
<a class="menu-plus__even-more-link" href="#">
Even more from Kottans
</a>
</li>
</ul>
<label class="menu-item__list-more-label" for="menu-more">More</label>
</li>
</ul>
<label class="menu-item__label" for="menu">
<img src="./popup-icons/popup-button.png" alt="popup button">
</label>
</li>
<li class="nav__list-item">
<a class="nav__list-item-link" href="#">
<img class="nav__list-item-link-img" src="./popup-icons/bell.png" height="27" alt="bell">
</a>
</li>
<li class="nav__list-item">
<a class="nav__list-item-link" href="#">
<img class="nav__list-item-link-img user-img" src="./popup-icons/unnamed.jpg" alt="user photo" height="27">
</a>
</li>
</ul>
</nav>
</div>
</body>
</html>
47 changes: 47 additions & 0 deletions submissions/JuliaLuccio/HTML-CSS-Popup/reset.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}

a {
text-decoration: none;
}
146 changes: 146 additions & 0 deletions submissions/JuliaLuccio/HTML-CSS-Popup/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
*, *:before, *:after {
box-sizing: border-box;
}

a {
color: #757575;
display: inline-block;
}

.container {
max-width: 1890px;
margin: 0 auto;
padding: 0 15px;;
}

.nav__list {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 30px;
padding: 10px;
}

.menu-item__inp,
.menu-item__list-more-inp {
appearance: none;
position: absolute;
}

.menu-item__label:hover,
.menu-item__list-more-label {
cursor: pointer;
}

.user-img {
border-radius: 50%;
}

.menu-item__inp:checked + .menu-item__list {
display: flex;
}

.menu-item__inp:focus ~ .menu-item__label img,
.nav__list-item-link:focus,
.menu-item__list-elem-link:focus,
.menu-plus__item-link:focus,
.menu-plus__even-more-link:focus {
box-shadow: 0px 0px 1px 3px #A9C9FC;
border-radius: 2px;
}

.menu-item__list-more-inp:focus ~ .menu-item__list-more-label {
box-shadow: inset 0px 0px 0px 5px #A9C9FC;
}

.nav__list-item-link:focus,
.menu-item__list-elem-link,
.menu-plus__item-link,
.menu-plus__even-more-link {
outline: none;
}

.menu-item__list {
display: none;
max-width: 485px;
justify-content: space-around;
align-items: center;
position: absolute;
top: 60px;
right: 35px;
flex-wrap: wrap;
column-gap: 10px;
padding: 30px 0 0;
border: 1px solid #75757569;
box-shadow: 5px 5px 16px 5px rgba(43,43,43,0.29);
border-radius: 10px;
max-height: 520px;
overflow-y: auto;
}

.menu-item__list-elem,
.menu-plus__item {
flex: 0 0 30%;
border-radius: 10px;
}

.menu-item__list-elem:hover,
.menu-plus__item:hover {
background-color: #d7d7d785;
}

.menu-item__list-elem a,
.menu-plus__item a {
display: flex;
flex-direction: column;
gap: 10px;
align-items: center;
}

.menu-item__list-elem-link,
.menu-plus__item-link {
padding: 15px 0;
}

.menu-item__list-elem-link-img,
.menu-plus__item-link-img {
max-height: 45px;
}

.menu-item__list-more {
width: 100%;
margin-top: 20px;
}

.menu-item__list-more-label {
display: inline-block;
width: 100%;
text-align: center;
background-color: #f5f5f5;
padding: 20px 0;
border-radius: 10px;
color: #808080;
}

.menu-plus,
.menu-item__list-more-inp:checked ~ .menu-item__list-more-label {
display: none;
}

.menu-item__list-more-inp:checked + .menu-plus {
display: flex;
border-top: 1px solid #d7d7d785;
}

.menu-plus {
flex-wrap: wrap;
justify-content: space-around;
align-items: center;
padding: 30px 0;
}

.menu-plus__even-more {
width: 100%;
text-align: center;
padding-top: 20px;
}