mirror of
https://github.com/yusufipk/trillo-react.git
synced 2026-09-11 19:06:10 +00:00
styled navbar
This commit is contained in:
@@ -34,6 +34,7 @@ $color-black: #000;
|
||||
$color-white: #fff;
|
||||
|
||||
// FONT CONTROL
|
||||
$small-font-size: 1.2rem;
|
||||
$default-font-size: 1.6rem;
|
||||
$normal-font-size: 1.4rem;
|
||||
$medium-font-size: 3rem;
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
.header {
|
||||
height: 7rem;
|
||||
background-color: $color-white;
|
||||
border-bottom: $color-grey-light-2;
|
||||
|
||||
display: flex;
|
||||
font-size: $normal-font-size;
|
||||
|
||||
@@ -119,3 +123,77 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
background-color: $color-grey-dark-1;
|
||||
|
||||
flex: 0 0 18%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
&__side-nav {
|
||||
font-size: $small-font-size;
|
||||
list-style: none;
|
||||
margin-top: 3.5rem;
|
||||
|
||||
&--item {
|
||||
position: relative;
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
width: 3px;
|
||||
background-color: $color-primary;
|
||||
transform: scaleY(0);
|
||||
transition: transform 0.2s, width 0.4s cubic-bezier(1, 0, 0, 1) 0.2s,
|
||||
background-color 0.1s;
|
||||
}
|
||||
|
||||
&:hover::before,
|
||||
&--active::before {
|
||||
transform: scaleY(1);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&:active::before {
|
||||
background-color: $color-primary-light;
|
||||
}
|
||||
}
|
||||
|
||||
&--link:link,
|
||||
&--link:visited {
|
||||
z-index: 1;
|
||||
color: $color-grey-light-1;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
display: block;
|
||||
padding: 1.5rem 3rem;
|
||||
position: relative;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&--icon {
|
||||
width: 1.75rem;
|
||||
height: 1.75rem;
|
||||
margin-right: 2rem;
|
||||
fill: currentColor;
|
||||
}
|
||||
}
|
||||
|
||||
.legal {
|
||||
font-size: $small-font-size;
|
||||
color: $color-grey-light-4;
|
||||
text-align: center;
|
||||
padding: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,24 +7,13 @@
|
||||
min-height: 50rem;
|
||||
}
|
||||
|
||||
.header {
|
||||
height: 7rem;
|
||||
background-color: $color-white;
|
||||
border-bottom: $color-grey-light-2;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
background-color: $color-grey-dark-1;
|
||||
|
||||
flex: 0 0 18%;
|
||||
}
|
||||
|
||||
.hotel-view {
|
||||
background-color: $color-white;
|
||||
height: 80rem;
|
||||
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,48 @@
|
||||
import sprite from "../img/sprite.svg";
|
||||
|
||||
function Nav() {
|
||||
return <nav className="sidebar">Navigation</nav>;
|
||||
return (
|
||||
<nav className="sidebar">
|
||||
<ul className="sidebar__side-nav">
|
||||
<li className="sidebar__side-nav--item sidebar__side-nav--item--active">
|
||||
<a href="#" className="sidebar__side-nav--link">
|
||||
<svg className="sidebar__side-nav--icon">
|
||||
<use href={`${sprite}#icon-home`}></use>
|
||||
</svg>
|
||||
<span>Hotel</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li className="sidebar__side-nav--item">
|
||||
<a href="#" className="sidebar__side-nav--link">
|
||||
<svg className="sidebar__side-nav--icon">
|
||||
<use href={`${sprite}#icon-aircraft-take-off`}></use>
|
||||
</svg>
|
||||
<span>Flight</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li className="sidebar__side-nav--item">
|
||||
<a href="#" className="sidebar__side-nav--link">
|
||||
<svg className="sidebar__side-nav--icon">
|
||||
<use href={`${sprite}#icon-key`}></use>
|
||||
</svg>
|
||||
<span>Car rental</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li className="sidebar__side-nav--item">
|
||||
<a href="#" className="sidebar__side-nav--link">
|
||||
<svg className="sidebar__side-nav--icon">
|
||||
<use href={`${sprite}#icon-map`}></use>
|
||||
</svg>
|
||||
<span>Tours</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div className="legal">© 2017 by trillo. All rights reserved.</div>
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
|
||||
export default Nav;
|
||||
|
||||
Reference in New Issue
Block a user