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

Hooli-style Popup #355

Merged
merged 2 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
125 changes: 125 additions & 0 deletions submissions/Nik3264/Hooli-style Popup/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<!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>Hello, world!</title>
<link href="style.css" rel="stylesheet" type="text/css">

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&display=swap" rel="stylesheet">
</head>
<body>

<header class="header">
<div class="header_logo">
<img src="./img/logo_u.png" alt="logo">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For icons it's better set an empty alt attribute, read more here

</div>
<nav class="menu">
<a href="#">Mail</a>
<a href="#">Images</a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, use ul>li>a fot lists of links

<div class="menu_wrap">
<input id="menu_input" class="header_menu_input" type="checkbox">
<label class="header_menu_label" for="menu_input">
<span class="header_menu_checkbox">
<img src="./img/popup-icons/popup-button.png" class="menu_img" alt="menu">
</span>
</label>

<div class="popup_menu">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, use ul>li>a fot lists of links here too

<a href="#" class="popup_menu_item">
<img src="./img/popup-icons/compass-205.svg" alt="compass">
<span>compass</span>
</a>
<a href="#" class="popup_menu_item">
<img src="./img/popup-icons/create-visuals-1.svg" alt="visuals">
<span>visuals</span>
</a>
<a href="#" class="popup_menu_item">
<img src="./img/popup-icons/distribution-47.svg" alt="distribution">
<span>distribut</span>
</a>
<a href="#" class="popup_menu_item">
<img src="./img/popup-icons/early-access-1.svg" alt="access">
<span>access</span>
</a>
<a href="#" class="popup_menu_item">
<img src="./img/popup-icons/flagship-1.svg" alt="flagship">
<span>flagship</span>
</a>
<a href="#" class="popup_menu_item">
<img src="./img/popup-icons/mana-potion-2.svg" alt="mana">
<span>mana</span>
</a>
<a href="#" class="popup_menu_item">
<img src="./img/popup-icons/mobile-game-1.svg" alt="mobile">
<span>mobile</span>
</a>
<a href="#" class="popup_menu_item">
<img src="./img/popup-icons/monster-15.svg" alt="monster">
<span>monster</span>
</a>
<a href="#" class="popup_menu_item">
<img src="./img/popup-icons/protective-wear-1.svg" alt="wear">
<span>wear</span>
</a>
<a href="#" class="popup_menu_item">
<img src=".//img/popup-icons/quest-2.svg" alt="quest">
<span>quest</span>
</a>
<a href="#" class="popup_menu_item">
<img src="./img/popup-icons/save-game-1.svg" alt="game">
<span>game</span>
</a>
<a href="#" class="popup_menu_item">
<img src="./img/popup-icons/shooting-game-2.svg" alt="shooting">
<span>shooting</span>
</a>

<input id="menu_input_more" class="popup_menu_more" type="checkbox">
<label class="header_menu_label_more" for="menu_input_more">
<span class="header_menu_label_more_ico"></span>
</label>

<a href="#" class="popup_menu_item_last popup_menu_last">
<img src="./img/popup-icons/sound-effects-3.svg" alt="sound">
<span>sound</span>
</a>
<a href="#" class="popup_menu_item_last popup_menu_last">
<img src="./img/popup-icons/space-mission-1.svg" alt="space">
<span>space</span>
</a>
<a href="#" class="popup_menu_item_last popup_menu_last">
<img src="./img/popup-icons/sports-game-1.svg" src="sports">
<span>sport</span>
</a>
<a href="#" class="popup_menu_item_last popup_menu_last">
<img src="./img/popup-icons/treasure-7.svg" alt="treasure">
<span>treasure</span>
</a>
<a href="#" class="popup_menu_item_last popup_menu_last">
<img src="./img/popup-icons/trophy-162.svg" alt="trophy">
<span>trophy</span>
</a>
<a href="#" class="popup_menu_item_last popup_menu_last">
<img src="./img/popup-icons/world-47.svg" alt="world">
<span>world</span>
</a>

</div>
</div>
<a href="#">Other</a>
</nav>
</header>

<section>
<div class="green"></div>
<div ><img src="img/popup-icons/sun.png" class="sun" alt="sun"></div>
<h1 class="dropdown_text">Доброго ранку! Ми з України!</h1>
</section>

</body>
</html>
247 changes: 247 additions & 0 deletions submissions/Nik3264/Hooli-style Popup/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
* {
padding:0;
margin: 0;
box-sizing: border-box;
}
HannaSyn marked this conversation as resolved.
Show resolved Hide resolved
body {
margin: 0 auto;
background-color: #ebebeb;
overflow: hidden;

}
:root {
--color-header:#aee4f3;
--color-blue:#0057B8;/*№00a6eb*/
--color-yellow:#FFD700;
}

@keyframes text {
from {
font-size: 2em;
margin-top:-200px;
}
to {
font-size: 5em;
margin-top:250px;
}
}
@keyframes green {
from {
opacity:0;
}
to {
opacity: 1;
margin-top: 200px;
}
}
@keyframes sun {
from {
margin-top:20vh;
margin-left: -50vw;
}
to {
margin-top:-25vh;
margin-left: 0vw;
}
}

.dropdown_text {
padding: 15px;
position: relative;
font-family: 'Caveat', cursive;
text-align: center;
color:var(--color-blue);
animation-fill-mode: forwards;
animation-duration: 4s;
animation-name: text;
}
.sun, .green {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.sun, .green {
.sun,
.green {

Please, write each class name from new line

position: absolute;
}
.green {
width: 100vw;
height: 100vh;
z-index: 0;
background-image: url(./img/popup-icons/backgr2.png);
background-size:cover;
animation-fill-mode: forwards;
animation-duration: 1s;
animation-name: green;
}
.sun {
width: 50vw;
max-width: 600px;
z-index: 0;
color: var(--color-yellow);
animation-fill-mode: forwards;
animation-duration: 3s;
animation-name: sun;
}
.header {
position: relative;
display: flex;
height: 5em;
justify-content: space-between;
background-color:var(--color-header);
border-bottom: 8px double var(--color-blue);
box-shadow: 2px 2px 50px #bebdbd;
z-index: 10;
transition: all ease-out 0.3s;
}

.header:hover {
box-shadow: none;
}

.header_logo img{
width: 5em;
padding-left: 1em;
}

.menu {
display: flex;
width:40%;
justify-content: space-around;
padding-top: 20px;
padding-bottom: 20px;
font-size: 1.1em;
}
a{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, avoid styling by tags link
use class names instead

text-decoration: none;
padding: 5px;
}
a:active{
color:var(--color-blue);
background-color: var(--color-yellow);
}
a:focus{
background-color: var(--color-yellow);
border-radius: 10%;
}
a:hover{
box-shadow: 0 1px 4px rgba(0, 0, 0, .3),
-23px 0 20px -23px rgba(0, 0, 0, .6),
23px 0 20px -23px rgba(0, 0, 0, .6),
inset 0 0 40px rgba(0, 0, 0, .1);
}
.menu_img:hover {
box-shadow: 0 1px 4px rgba(0, 0, 0, .3),
-23px 0 20px -23px rgba(0, 0, 0, .6),
23px 0 20px -23px rgba(0, 0, 0, .6),
inset 0 0 40px rgba(0, 0, 0, .1);
}
.menu_wrap {
width: 50px;
}

.menu_img{
width: 2.5em;
height: 2.5em;
padding: 5px;
margin-top:-6px;
border-radius: 50%;

}
.header_menu_label {
padding-top: 12px;
}
.header_menu_input:focus + * .menu_img {
background-color: var(--color-yellow);
}
.popup_menu{
position: absolute;
right:5vh;
top:85px;
z-index: 10;
width: 286px;
max-height: 560px;
overflow-y: auto;
overflow-x: hidden;
background-color:#e0e0e0;
box-shadow: 0 1px 6px rgb(32 33 36 / 20%);
}

.header_menu_input, .popup_menu_more {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
.popup_menu_more {
position: absolute;
}
.popup_menu, .popup_menu_last {
display: none;
}
.popup_menu_item{
text-align: center;
}
.popup_menu_item > span, .popup_menu_item_last > span {
font-size: 0.8em;
text-align: center;
}
.header_menu_input:checked ~ .popup_menu{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add padding: 10px; to make it more pretty

display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: auto;
grid-gap: 15px;
grid-template-areas:
"a c d"
"e f g"
"h i j"
"k l m"
"b b b"
"n o p"
"q r s"
;
}
.header_menu_label_more {
grid-area: b;
text-align: center;
}

.popup_menu_more:checked ~ .popup_menu_last{
display: grid;
}
.header_menu_label_more_ico {
display: inline-block;
width: 25px;
height: 25px;
margin-top: 5px;
border: solid var(--color-blue);
border-width: 0 8px 8px 0;
transform: rotate( 45deg);
transition: all 0.5s;
}

.popup_menu_more:checked + * .header_menu_label_more_ico{
transform: rotate( 225deg);
}
.popup_menu_more:hover + .header_menu_label_more{
border-width:0 0 2px 0;
border-style:none none solid none;
border-color: var(--color-yellow);
}
.popup_menu_more:focus + .header_menu_label_more{
border-width:0 0 2px 0;
border-style:none none solid none;
border-color: var(--color-yellow);
}
.popup_menu_more:active + .header_menu_label_more{
border-width:0 0 2px 0;
border-style:none none solid none;
border-color: var(--color-yellow);
}


@media screen and (min-width:250px) and (max-width:767px) {
.popup_menu {
right: 10px;
}
}

@media screen and (min-width:250px) and (max-width:510px) {
.menu {
width:80%;
font-size: 1em;
}
}