From e09f62bb392915f51b8e42f993c7f3d1f8de9840 Mon Sep 17 00:00:00 2001 From: Yusuf Ipek Date: Sun, 9 May 2021 12:37:40 +0300 Subject: [PATCH] styled navbar --- src/SASS/abstracts/_variables.scss | 1 + src/SASS/layout/_home.scss | 78 +++++++++++++++++++++++++++ src/SASS/layout/_layout.scss | 13 +---- src/commons/navigation/navigation.jsx | 45 +++++++++++++++- 4 files changed, 124 insertions(+), 13 deletions(-) diff --git a/src/SASS/abstracts/_variables.scss b/src/SASS/abstracts/_variables.scss index 4babc2b..c2371ca 100644 --- a/src/SASS/abstracts/_variables.scss +++ b/src/SASS/abstracts/_variables.scss @@ -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; diff --git a/src/SASS/layout/_home.scss b/src/SASS/layout/_home.scss index 4fc1b4f..a06fcae 100644 --- a/src/SASS/layout/_home.scss +++ b/src/SASS/layout/_home.scss @@ -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; + } +} diff --git a/src/SASS/layout/_layout.scss b/src/SASS/layout/_layout.scss index beb22da..de108f9 100644 --- a/src/SASS/layout/_layout.scss +++ b/src/SASS/layout/_layout.scss @@ -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; } diff --git a/src/commons/navigation/navigation.jsx b/src/commons/navigation/navigation.jsx index d05c90f..4a66e06 100644 --- a/src/commons/navigation/navigation.jsx +++ b/src/commons/navigation/navigation.jsx @@ -1,5 +1,48 @@ +import sprite from "../img/sprite.svg"; + function Nav() { - return ; + return ( + + ); } export default Nav;