generated from goitacademy/vanilla-app-template
-
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.
Merge pull request #25 from ReshetS/add-header
feature/header
- Loading branch information
Showing
2 changed files
with
170 additions
and
25 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,22 +1,132 @@ | ||
/* Header styles */ | ||
.header { | ||
padding: 20px 0; | ||
|
||
.header .container { | ||
position: relative; | ||
} | ||
|
||
.nav-list { | ||
.header-container { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
justify-content: flex-end; | ||
gap: 40px; | ||
position: absolute; | ||
padding: 0 20px; | ||
left: 0; | ||
right: 0; | ||
top: 20px; | ||
width: 100%; | ||
} | ||
|
||
.nav-link { | ||
font-weight: 500; | ||
letter-spacing: 0.02em; | ||
line-height: 1.5; | ||
.header-logo-link{ | ||
display: flex; | ||
align-items: center; | ||
gap:4px; | ||
} | ||
|
||
.nav-link:hover, | ||
.nav-link:focus { | ||
color: #747bff; | ||
.header-logo-mob { | ||
fill: #FBFBFB; | ||
} | ||
|
||
.button-menu-open{ | ||
display: block; | ||
stroke: #FBFBFB; | ||
background-color: transparent; | ||
border: none; | ||
} | ||
.open-menu-tablet { | ||
display: none; | ||
} | ||
|
||
.header-logo-tab, .nav{ | ||
display: none; | ||
} | ||
|
||
@media screen and (min-width: 768px) { | ||
.header-container{ | ||
padding: 0 32px; | ||
top: 32px; | ||
} | ||
|
||
.header-logo-link { | ||
gap: 8px; | ||
} | ||
|
||
.button-menu-open { | ||
height: 40px; | ||
} | ||
|
||
.button-menu-open-mob, .header-logo-mob { | ||
display: none; | ||
} | ||
|
||
.open-menu-mobile{ | ||
display: none; | ||
} | ||
|
||
.open-menu-tablet{ | ||
display: inline; | ||
} | ||
|
||
.open-menu-tablet-icon { | ||
stroke: #FBFBFB; | ||
background-color: transparent; | ||
border: none; | ||
} | ||
|
||
.header-logo-tab { | ||
display: inline; | ||
fill: #FBFBFB; | ||
} | ||
} | ||
|
||
@media screen and (min-width:1280px) { | ||
.header-container { | ||
padding: 0 100px; | ||
} | ||
|
||
.button-menu-open-td{ | ||
display: none; | ||
} | ||
|
||
.nav{ | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.nav-list{ | ||
display: flex; | ||
} | ||
|
||
.nav-item:not(:last-child){ | ||
margin-right: 8px; | ||
} | ||
|
||
.nav-item:nth-last-child(2) { | ||
margin-right: 20px; | ||
} | ||
|
||
.nav-link{ | ||
padding: 12px; | ||
border: 1px solid rgba(251, 251, 251, 0.4); | ||
border-radius: 12px; | ||
font-weight: 500; | ||
line-height: 1.25; | ||
letter-spacing: -0.02em; | ||
} | ||
|
||
.button-menu-open{ | ||
display: none; | ||
} | ||
|
||
.shop-now{ | ||
border-radius: 30px; | ||
padding: 16px 32px; | ||
background-color: #7a3145; | ||
border: none; | ||
font-weight: 600; | ||
font-size: 18px; | ||
letter-spacing: -0.01em; | ||
line-height: 1.11; | ||
text-transform: uppercase; | ||
color: var(--main-text); | ||
} | ||
} |
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,15 +1,50 @@ | ||
<header class="header"> | ||
<nav class="nav"> | ||
<ul class="nav-list"> | ||
<li class="nav-item"> | ||
<a href="#how-it-works" class="nav-link">How it works</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a href="#vegetables" class="nav-link">Vegetables</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a href="#reviews" class="nav-link">Reviews</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
<div class="container"> | ||
<div class="header-container"> | ||
<a class="header-logo-link" href="./index.html"> | ||
<svg class="header-logo-mob squares" width="16" height="16"> | ||
<use href="./img/icons.svg#mini-cubiki"></use> | ||
</svg> | ||
<svg class="header-logo-mob" width="148" height="12"> | ||
<use href="./img/icons.svg#mini-green-harvest"></use> | ||
</svg> | ||
<svg class="header-logo-tab squares" width="18" height="18"> | ||
<use href="./img/icons.svg#big-cubiki"></use> | ||
</svg> | ||
<svg class="header-logo-tab" width="168" height="16"> | ||
<use href="./img/icons.svg#big-green-harvest"></use> | ||
</svg> | ||
</a> | ||
<nav class="nav"> | ||
<ul class="nav-list"> | ||
<li class="nav-item"> | ||
<a href="#how-it-works" class="nav-link">How it works</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a href="#vegetables" class="nav-link">Vegetables</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a href="#reviews" class="nav-link">Reviews</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a href="#your-order" class="shop-now">shop now</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
<button type="button" class="button-menu-open"> | ||
<svg class="open-menu-mobile" width="32" height="32"> | ||
<use | ||
class="open-menu-mob-icon" | ||
href="./img/icons.svg#mini-icon-menu-open" | ||
></use> | ||
</svg> | ||
<svg class="open-menu-tablet" width="40" height="40"> | ||
<use | ||
class="open-menu-tablet-icon" | ||
href="./img/icons.svg#big-icon-menu-open" | ||
></use> | ||
</svg> | ||
</button> | ||
</div> | ||
</div> | ||
</header> |