Merge pull request #10 from bartlomiej-pluta/rwd-navbar
Enable RWD for navbar and header
This commit is contained in:
7
src/img/navbar/sandwich.svg
Normal file
7
src/img/navbar/sandwich.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 27 22" width="27" height="22">
|
||||
<style>
|
||||
tspan { white-space:pre }
|
||||
.shp0 { fill: #333333 }
|
||||
</style>
|
||||
<path id="sandwich" class="shp0" d="M0,20.5c0,0.83 0.67,1.5 1.5,1.5h23c0.83,0 1.5,-0.67 1.5,-1.5c0,-0.83 -0.67,-1.5 -1.5,-1.5h-23c-0.83,0 -1.5,0.67 -1.5,1.5zM0,11.5c0,0.83 0.67,1.5 1.5,1.5h23c0.83,0 1.5,-0.67 1.5,-1.5c0,-0.83 -0.67,-1.5 -1.5,-1.5h-23c-0.83,0 -1.5,0.67 -1.5,1.5zM6,2.5c0,0.83 0.67,1.5 1.5,1.5h17c0.83,0 1.5,-0.67 1.5,-1.5c0,-0.83 -0.67,-1.5 -1.5,-1.5h-17c-0.83,0 -1.5,0.67 -1.5,1.5z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 568 B |
@@ -28,30 +28,34 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper" id="wrapper">
|
||||
<div class="navbar navbar-expand-lg fixed-top">
|
||||
<div class="container">
|
||||
<div class="brand navbar-header">
|
||||
<div class="navbar navbar-light navbar-expand-lg fixed-top">
|
||||
<div class="container navbar__content">
|
||||
<div class="brand navbar__content__brand navbar-header">
|
||||
<img class="brand__logo" src="img/logo.svg" alt="Forkio logo">
|
||||
<span class="brand__name">Fork</span>
|
||||
<span class="brand__name brand__name--emph">IO</span>
|
||||
</div>
|
||||
<ul class="navbar__body navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="navbar__link nav-link" href="#">Overview</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="navbar__link nav-link" href="#">About fork</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="navbar__link nav-link" href="#">Buying options</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="navbar__link nav-link" href="#">Support</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<button class="rounded-button rounded-button--strong">Buy now</button>
|
||||
</li>
|
||||
</ul>
|
||||
<button class="navbar__content__toggler navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown"
|
||||
aria-controls="navbarNavDropdown" aria-expanded="true" aria-label="Toggle navigation">
|
||||
<img src="img/navbar/sandwich.svg" alt="">
|
||||
</button>
|
||||
<div class="collapse navbar-collapse nav-content" id="navbarNavDropdown">
|
||||
<ul class="navbar__content__body navbar-nav mr-0 ml-auto">
|
||||
<li class="nav-item">
|
||||
<a class="navbar__link nav-link" href="#">Overview</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="navbar__link nav-link" href="#">About fork</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="navbar__link nav-link" href="#">Buying options</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="navbar__link nav-link" href="#">Support</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<button class="navbar__content__button rounded-button rounded-button--strong">Buy now</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.header {
|
||||
background: black url(../img/header/img.png) no-repeat 50% 30% / cover;
|
||||
background: black url(../img/header/img.png) no-repeat center 120px/ cover;
|
||||
height: 100vh;
|
||||
padding-top: 110px;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,42 @@
|
||||
$shrinking-duration: 0.4s;
|
||||
|
||||
.navbar {
|
||||
margin: 0 0;
|
||||
padding: 0 90px;
|
||||
height: 100px;
|
||||
background-color: white;
|
||||
transition: height $shrinking-duration;
|
||||
@media all and (min-width: $desktop) {
|
||||
.navbar {
|
||||
margin: 0 0;
|
||||
padding: 0 90px;
|
||||
height: 100px;
|
||||
transition: height $shrinking-duration;
|
||||
}
|
||||
|
||||
.navbar--shrink {
|
||||
height: 50px;
|
||||
transition: height $shrinking-duration;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar--shrink {
|
||||
height: 50px;
|
||||
transition: height $shrinking-duration;
|
||||
.navbar {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.navbar__content {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.navbar__content__header {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.navbar__content__toggler {
|
||||
order: 4;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.navbar__content__body {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.navbar__content__button {
|
||||
order: 3;
|
||||
}
|
||||
|
||||
.navbar__link {
|
||||
|
||||
Reference in New Issue
Block a user