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 8 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.
41 changes: 40 additions & 1 deletion 07-lection5/04-input/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,45 @@
<link rel="stylesheet" href="./input.css">
</head>
<body>

<div class="wrapper">
<div class="input">
<label for="label" class="input__label">Label</label>
<div class="input__wrapper">
<input id="label" class="input__field" type="text" placeholder="Placeholder">
<div class="input__icon"></div>
</div>
</div>
<div class="input">
<label for="focus" class="input__label">Focus</label>
<div class="input__wrapper">
<input id="focus" class="input__field" type="text" placeholder="Placeholder" value="Filled Input">
<div class="input__icon"></div>
</div>
</div>
<div class="input input_success">
<label for="success" class="input__label">Success</label>
<div class="input__wrapper">
<input id="success" class="input__field" type="text" placeholder="Placeholder" value="Success">
<svg class="input__icon input__icon_success">
<use xlink:href="../../assets/images/icons.svg#success"></use>
</svg>
<svg class="input__icon input__icon_invalid">
<use xlink:href="../../assets/images/icons.svg#error"></use>
</svg>
</div>
</div>
<div class="input input_invalid">
<label for="error" class="input__label">Error</label>
<div class="input__wrapper">
<input id="error" class="input__field" type="text" placeholder="Placeholder" value="Error">
<svg class="input__icon input__icon_success">
<use xlink:href="../../assets/images/icons.svg#success"></use>
</svg>
<svg class="input__icon input__icon_invalid">
<use xlink:href="../../assets/images/icons.svg#error"></use>
</svg>
</div>
</div>
</div>
</body>
</html>
61 changes: 61 additions & 0 deletions 07-lection5/04-input/input.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.input__label {
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: 5px;
display: inline-block;
}
.input__wrapper {
position: relative;
max-width: 350px;
}
.input__field {
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__field:focus {
outline: none;
border-color: #4263EB;
}
.input__field::placeholder {
color: var(--grey-2);
}
.input__icon {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 16px;
display: none;
width: 24px;
height: 24px;
}
.input__icon_success {
color: #374FC7;
}
.input__icon_invalid {
color: #F03D3E;
}
.input_success .input__icon_success {
display: block;
}
.input_invalid .input__icon_invalid {
display: block;
}
.input_invalid .input__field {
border-color: #F03D3E;
}

35 changes: 35 additions & 0 deletions 09-lection7/01-burger-menu/burger-menu.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.burger-menu {
position: fixed;
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;
}
.icon {
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.
27 changes: 26 additions & 1 deletion 09-lection7/01-burger-menu/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,33 @@
<link rel="stylesheet" href="../../assets/css/main.css">
<link rel="stylesheet" href="./burger-menu.css">
<script defer src="./burger-menu.js"></script>
<style>
.burger-menu-button {
position: absolute;
left: 16px;
}
burger-menu-button__icon {
width: 24px;
height: 24px;
color: var(--grey-4);
}
</style>
</head>
<body>

<div class="burger-menu-button" id="burger-menu-open">
<svg class="burger-menu-button__icon">
<use xlink:href="../../assets/images/icons.svg#burger"></use>
</svg>
</div>
<div class="burger-menu" id="burger-menu">
<div class="burger-menu__header">
<div class="burger-menu__close" id="burger-menu-close">
<svg class="icon">
<use xlink:href="../../assets/images/icons.svg#close"></use>
</svg>
</div>
<div class="burger-menu__logo"><img src="img/logo.png" alt="логотип"></div>
</div>
</div>
</body>
</html>
6 changes: 1 addition & 5 deletions assets/css/main.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import '../fonts/fonts.css';
@import url(../../03-lection1/01-button/button.css);

:root {
--white: #ffffff;
--black: #212429;
Expand All @@ -22,7 +22,3 @@
body {
font-family: 'Roboto', sans-serif;
}
.wrapper {
display: grid;
gap: 16px;
}
Loading
Loading