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

09 burger menu #17

Merged
merged 9 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from 3 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
5 changes: 5 additions & 0 deletions 07-lection5/04-input/img/error.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions 07-lection5/04-input/img/success.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 30 additions & 1 deletion 07-lection5/04-input/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,35 @@
<link rel="stylesheet" href="./input.css">
</head>
<body>

<div class="wrapper">
<div class="input">
<div class="input__title">Label</div>
GSemikozov marked this conversation as resolved.
Show resolved Hide resolved
<div class="input__wrapper">
<input type="text" placeholder="Placeholder">
<div class="input__icon"></div>
</div>
</div>
<div class="input">
<div class="input__title">Focus</div>
<div class="input__wrapper">
<input type="text" placeholder="Placeholder" value="Filled Input">
<div class="input__icon"></div>
</div>
</div>
<div class="input input_success">
<div class="input__title">Success</div>
<div class="input__wrapper">
<input type="text" placeholder="Placeholder" value="Success">
<div class="input__icon"></div>
</div>
</div>
<div class="input input_invalid">
<div class="input__title">Error</div>
<div class="input__wrapper">
<input type="text" placeholder="Placeholder" value="Error">
<div class="input__icon"></div>
</div>
</div>
</div>
</body>
</html>
62 changes: 62 additions & 0 deletions 07-lection5/04-input/input.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
.wrapper {
GSemikozov marked this conversation as resolved.
Show resolved Hide resolved
display: flex;
flex-direction: column;
gap: 16px;
}
.input {
width: 350px;
GSemikozov marked this conversation as resolved.
Show resolved Hide resolved
}
.input__title {
GSemikozov marked this conversation as resolved.
Show resolved Hide resolved
font-family: 'Inter';
font-style: normal;
font-weight: 500;
font-size: 12px;
line-height: 18px;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--grey-3);
margin-bottom: 11px;
GSemikozov marked this conversation as resolved.
Show resolved Hide resolved
}
.input__wrapper {
position: relative;
}
.input__wrapper input {
GSemikozov marked this conversation as resolved.
Show resolved Hide resolved
width: 100%;
padding: 17px 16px 17px 24px;
border-radius: 8px;
border: 1px solid var(--grey-2);
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 26px;
color: var(--grey-4);
box-sizing: border-box;
}
.input__wrapper input:focus {
outline: none;
border-color: #4263EB;
}
.input__wrapper input::placeholder {
color: var(--grey-2);
}
.input__icon {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 16px;
}
.input_success .input__icon {
GSemikozov marked this conversation as resolved.
Show resolved Hide resolved
background: url("img/success.svg");
width: 24px;
height: 24px;
}
.input_invalid .input__icon {
background: url("img/error.svg");
width: 24px;
height: 24px;
}
.input_invalid input {
GSemikozov marked this conversation as resolved.
Show resolved Hide resolved
border-color: #F03D3E;
}

52 changes: 52 additions & 0 deletions 09-lection7/01-burger-menu/burger-menu.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.header__top {
GSemikozov marked this conversation as resolved.
Show resolved Hide resolved
background-color: #F9FAFC;
padding: 16px 0;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.burger-menu-button {
GSemikozov marked this conversation as resolved.
Show resolved Hide resolved
background: url("img/menu.svg") no-repeat;
width: 24px;
height: 24px;
position: absolute;
left: 16px;
}
.burger-menu {
position: absolute;
GSemikozov marked this conversation as resolved.
Show resolved Hide resolved
width: 100vw;
height: 100vh;
top: 0;
left: 0;
transform: translateX(-100%);
background: #F9FAFC;
transition: all 350ms linear;
}
.burger-menu[data-open] {
transform: translateX(0%);
}
.burger-menu__header {
position: relative;
padding: 16px 0;
display: flex;
justify-content: center;
align-items: center;
}
.burger-menu__close {
background-color: var(--grey-2);
border-radius: 16px;
width: 32px;
height: 32px;
position: absolute;
left: 16px;
display: flex;
justify-content: center;
align-items: center;
}
.burger-menu__close:before {
content: '';
background: url("img/close.svg") no-repeat;
GSemikozov marked this conversation as resolved.
Show resolved Hide resolved
width: 24px;
height: 24px;
}
4 changes: 4 additions & 0 deletions 09-lection7/01-burger-menu/img/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 09-lection7/01-burger-menu/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions 09-lection7/01-burger-menu/img/menu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion 09-lection7/01-burger-menu/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@
<script defer src="./burger-menu.js"></script>
</head>
<body>

<header class="header">
<div class="header__top">
<div class="burger-menu-button" id="burger-menu-open"></div>
<div class="header__logo"><img src="img/logo.png" alt="логотип"></div>
GSemikozov marked this conversation as resolved.
Show resolved Hide resolved
</div>
<div class="burger-menu" id="burger-menu">
<div class="burger-menu__header">
<div class="burger-menu__close" id="burger-menu-close"></div>
<div class="burger-menu__logo"><img src="img/logo.png" alt="логотип"></div>
</div>
</div>
</header>
</body>
</html>
1 change: 1 addition & 0 deletions assets/css/main.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import '../fonts/fonts.css';
@import "normolize.css";

:root {
--white: #ffffff;
Expand Down
Loading
Loading