trillo sidebar done
This commit is contained in:
1 parent
2b1e91befa
commit
a0e1f31987
4 files changed
+170
-4
No files matched your search
@@ -126,6 +126,51 @@ body {
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
margin-right: 1rem; }
|
margin-right: 1rem; }
|
||||||
|
|
||||||
|
.side-nav {
|
||||||
|
font-size: 1.4rem;
|
||||||
|
list-style: none;
|
||||||
|
margin-top: 3.5rem; }
|
||||||
|
.side-nav__item {
|
||||||
|
position: relative; }
|
||||||
|
.side-nav__item:not(:last-child) {
|
||||||
|
margin-bottom: 0.5rem; }
|
||||||
|
.side-nav__item::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 3px;
|
||||||
|
background-color: var(--color-primary);
|
||||||
|
transform: scaleY(0);
|
||||||
|
transform-origin: center;
|
||||||
|
transition: transform 0.2s, width 0.4s cubic-bezier(1, 0, 0, 1) 0.2s, background-color 0.1s; }
|
||||||
|
.side-nav__item:hover::before, .side-nav__item--active::before {
|
||||||
|
transform: scaleY(1);
|
||||||
|
width: 100%; }
|
||||||
|
.side-nav__item:active::before {
|
||||||
|
background-color: var(--color-primary-light); }
|
||||||
|
.side-nav__link:link, .side-nav__link:visited {
|
||||||
|
color: var(--color-grey-light-1);
|
||||||
|
text-decoration: none;
|
||||||
|
text-transform: uppercase;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 1.5rem 3rem;
|
||||||
|
position: relative;
|
||||||
|
z-index: 10; }
|
||||||
|
.side-nav__icon {
|
||||||
|
width: 1.75rem;
|
||||||
|
height: 1.75rem;
|
||||||
|
margin-right: 2rem;
|
||||||
|
fill: currentColor; }
|
||||||
|
|
||||||
|
.legal {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
color: var(--color-grey-light-4);
|
||||||
|
text-align: center;
|
||||||
|
padding: 2.5rem; }
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 120rem;
|
max-width: 120rem;
|
||||||
min-height: 50rem;
|
min-height: 50rem;
|
||||||
@@ -147,8 +192,12 @@ body {
|
|||||||
|
|
||||||
.sidebar {
|
.sidebar {
|
||||||
background-color: var(--color-grey-dark-1);
|
background-color: var(--color-grey-dark-1);
|
||||||
flex: 0 0 18%; }
|
flex: 0 0 18%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between; }
|
||||||
|
|
||||||
.hotel-view {
|
.hotel-view {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
background-color: #fff; }
|
background-color: #fff;
|
||||||
|
height: 80rem; }
|
||||||
@@ -54,7 +54,48 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<nav class="sidebar">Navigation</nav>
|
<nav class="sidebar">
|
||||||
|
<ul class="side-nav">
|
||||||
|
<li class="side-nav__item">
|
||||||
|
<a href="#" class="side-nav__link">
|
||||||
|
<svg class="side-nav__icon">
|
||||||
|
<use xlink:href="img/sprite.svg#icon-home"></use>
|
||||||
|
</svg>
|
||||||
|
<span>Home</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="side-nav__item side-nav__item--active">
|
||||||
|
<a href="#" class="side-nav__link">
|
||||||
|
<svg class="side-nav__icon">
|
||||||
|
<use xlink:href="img/sprite.svg#icon-aircraft-take-off"></use>
|
||||||
|
</svg>
|
||||||
|
<span>Flight</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="side-nav__item">
|
||||||
|
<a href="#" class="side-nav__link">
|
||||||
|
<svg class="side-nav__icon">
|
||||||
|
<use xlink:href="img/sprite.svg#icon-key"></use>
|
||||||
|
</svg>
|
||||||
|
<span>Car rental</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="side-nav__item">
|
||||||
|
<a href="#" class="side-nav__link">
|
||||||
|
<svg class="side-nav__icon">
|
||||||
|
<use xlink:href="img/sprite.svg#icon-map"></use>
|
||||||
|
</svg>
|
||||||
|
<span>Tours</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="legal">© 2017 by trillo. Al rights reserved.</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
<main class="hotel-view">Hotel view</main>
|
<main class="hotel-view">Hotel view</main>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
.user-nav {
|
.user-nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
align-self: stretch; //make it cover the entire height
|
align-self: stretch; //NOTE: make it cover the entire height
|
||||||
|
|
||||||
& > * {
|
& > * {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -114,3 +114,74 @@
|
|||||||
margin-right: 1rem;
|
margin-right: 1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Side navigation
|
||||||
|
.side-nav {
|
||||||
|
font-size: 1.4rem;
|
||||||
|
list-style: none;
|
||||||
|
margin-top: 3.5rem;
|
||||||
|
|
||||||
|
&__item {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&:not(:last-child) {
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__item::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 3px;
|
||||||
|
background-color: var(--color-primary);
|
||||||
|
transform: scaleY(0);
|
||||||
|
|
||||||
|
transform-origin: center; //NOTE: cool
|
||||||
|
transition:
|
||||||
|
transform 0.2s,
|
||||||
|
width 0.4s cubic-bezier(1, 0, 0, 1) 0.2s,
|
||||||
|
//NOTE: duration timing delay
|
||||||
|
background-color 0.1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__item:hover::before,
|
||||||
|
&__item--active::before {
|
||||||
|
transform: scaleY(1);
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__item:active::before {
|
||||||
|
background-color: var(--color-primary-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
&__link:link,
|
||||||
|
&__link:visited {
|
||||||
|
color: var(--color-grey-light-1);
|
||||||
|
text-decoration: none;
|
||||||
|
text-transform: uppercase;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 1.5rem 3rem;
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__icon {
|
||||||
|
width: 1.75rem;
|
||||||
|
height: 1.75rem;
|
||||||
|
margin-right: 2rem;
|
||||||
|
fill: currentColor; //NOTE: color of current or parent element
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Legal
|
||||||
|
.legal {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
color: var(--color-grey-light-4);
|
||||||
|
text-align: center;
|
||||||
|
padding: 2.5rem;
|
||||||
|
}
|
||||||
@@ -25,9 +25,14 @@
|
|||||||
.sidebar {
|
.sidebar {
|
||||||
background-color: var(--color-grey-dark-1);
|
background-color: var(--color-grey-dark-1);
|
||||||
flex: 0 0 18%;
|
flex: 0 0 18%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hotel-view {
|
.hotel-view {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
|
height: 80rem; // temporary
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user