-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
159 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,42 @@ | ||
.burger-menu { | ||
|
||
} | ||
|
||
.burger-menu__open { | ||
display: inline-flex; /* Чтобы компонент остался строчным снаружи */ | ||
cursor: pointer; | ||
width: 24px; | ||
height: 24px; | ||
} | ||
|
||
.burger-menu__close { | ||
display: inline-flex; /* Чтобы компонент остался строчным снаружи */ | ||
cursor: pointer; | ||
width: 24px; | ||
height: 24px; | ||
} | ||
|
||
.burger-menu__curtain { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100vw; | ||
height: 100vh; | ||
transform: translateX(-100vw); | ||
transition: transform 200ms linear; | ||
background-color: rgba(127, 127, 127, 0.5); | ||
background-color: var(--grey-5); | ||
} | ||
|
||
.burger-menu__window { | ||
max-width: 375px; | ||
.burger-menu__curtain[data-open] { | ||
transform: translateX(0); | ||
} | ||
|
||
.burger-menu__open { | ||
width: 32px; | ||
height: 32px; | ||
background: var(--grey-2); | ||
border-radius: 100%; | ||
.burger-menu__window { | ||
padding: 24px 16px; | ||
} | ||
|
||
.burger-menu[data-open] { | ||
transform: translateX(0); | ||
} | ||
@media screen and (min-width: 768px) { | ||
.burger-menu { | ||
display: none; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,83 @@ | ||
<!DOCTYPE html> | ||
<!-- Страница бургер-меню --> | ||
<html lang="ru"> | ||
<head> | ||
<link rel="stylesheet" href="../../assets/css/main.css"> | ||
<link rel="stylesheet" href="./burger-menu.css"> | ||
<script defer src="./burger-menu.js"></script> | ||
</head> | ||
<body> | ||
|
||
<div style="background-color: #F9FAFC; padding: 16px 12px; display: flex; gap: 12px; align-items: center;"> | ||
<button class="burger-menu__open" id="burger-menu-open"> | ||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path d="M3 12H21" stroke="#495057" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||
<path d="M3 6H21" stroke="#495057" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||
<path d="M3 18H21" stroke="#495057" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||
</svg> | ||
</button> | ||
<svg width="110" height="32" viewBox="0 0 110 32" fill="none" xmlns="http://www.w3.org/2000/svg" style="flex-grow: 1;"> | ||
<rect y="1" width="30" height="30" fill="#212429"/> | ||
<rect x="38" width="32" height="32" rx="16" fill="#212429"/> | ||
<path d="M78 0L110 32H78V0Z" fill="#212429"/> | ||
</svg> | ||
</div> | ||
|
||
|
||
<div class="burger-menu" id="burger-menu"> | ||
<button class="burger-menu__close" id="burger-menu-close"> | ||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path d="M18 6L6 18" stroke="#212429" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||
<path d="M6 6L18 18" stroke="#212429" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||
</svg> | ||
</button> | ||
<div class="burger-menu__window"></div> | ||
</div> | ||
|
||
</body> | ||
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="../../assets/css/main.css"> | ||
<script defer src="./burger-menu.js"></script> | ||
</head> | ||
<body> | ||
<div class="page page_inner"> | ||
|
||
<header class="header header_for-inner-page"> | ||
<div class="container"> | ||
<div class="header__inner"> | ||
|
||
<div class="burger-menu"> | ||
|
||
<svg class="burger-menu__open header__burger-menu-open" id="burger-menu-open"> | ||
<use href="/assets/images/icons.svg#burger"></use> | ||
</svg> | ||
|
||
<div class="burger-menu__curtain" id="burger-menu"> | ||
|
||
<div class="header header_for-inner-page"> | ||
<div class="container"> | ||
<div class="header__inner"> | ||
<svg class="burger-menu__close header__burger-menu-open" id="burger-menu-close"> | ||
<use href="/assets/images/icons.svg#close-burger-menu"></use> | ||
</svg> | ||
|
||
<a href="/index.html" class="header__logo"> | ||
<svg width="110" height="32" viewBox="0 0 110 32" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<rect y="1" width="30" height="30" fill="#212429"/> | ||
<rect x="38" width="32" height="32" rx="16" fill="#212429"/> | ||
<path d="M78 0L110 32H78V0Z" fill="#212429"/> | ||
</svg> | ||
</a> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="burger-menu__window"> | ||
<nav class="menu"> | ||
<h2 class="menu__name">Components</h2> | ||
<ul class="menu__list"> | ||
<li class="menu__item"><a class="menu__item-a" href="/pages/modal.html">Modal</a> | ||
</li> | ||
<li class="menu__item"><a class="menu__item-a" | ||
href="/pages/tooltip.html">Tooltip</a></li> | ||
<li class="menu__item menu__item_selected">Avatar</li> | ||
<li class="menu__item"><a class="menu__item-a" | ||
href="/pages/calendar.html">Calendar</a></li> | ||
<li class="menu__item"><a class="menu__item-a" href="/pages/histogram.html">Histogram</a> | ||
</li> | ||
<li class="menu__item"><a class="menu__item-a" href="/pages/form-elements.html">Custom | ||
form | ||
elements</a></li> | ||
<li class="menu__item menu__item_main"><a class="menu__item-a" href="/index.html">Main | ||
page</a></li> | ||
</ul> | ||
</nav> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
<a href="/index.html" class="header__logo"> | ||
<svg width="110" height="32" viewBox="0 0 110 32" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<rect y="1" width="30" height="30" fill="#212429"/> | ||
<rect x="38" width="32" height="32" rx="16" fill="#212429"/> | ||
<path d="M78 0L110 32H78V0Z" fill="#212429"/> | ||
</svg> | ||
</a> | ||
|
||
</div> | ||
</div> | ||
</header> | ||
|
||
</div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters