123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286 |
- //
- // Vertical navbar
- //
-
-
- // Vertical
- //
- // Creates a vertically aligned version of the navbar
- .navbar-vertical {
- box-shadow: $navbar-vertical-box-shadow;
-
- .navbar {
- border-width: 0 0 1px 0;
- border-style: solid;
- }
-
-
- // Navbar light
-
- .navbar-light {
- background-color: $navbar-light-bg;
- border-color: $navbar-light-border-color;
- }
-
-
- // Navbar brand
-
- .navbar-brand {
- margin-right: 0;
- }
-
- .navbar-brand-img,
- .navbar-brand > img {
- max-width: 100%;
- max-height: 2rem;
- }
-
-
- // Navbar collapse
-
- @include media-breakpoint-up(md) {
- .navbar-collapse {
- margin-left: -$navbar-padding-x;
- margin-right: -$navbar-padding-x;
- padding-left: $navbar-padding-x;
- padding-right: $navbar-padding-x;
-
- &:before {
- content: '';
- display: block;
- margin: $navbar-padding-y (-$navbar-padding-x);
- }
- }
- }
-
-
-
- // Navbar navigaton
-
- .navbar-nav {
- margin-left: -$navbar-padding-x;
- margin-right: -$navbar-padding-x;
-
-
- // Navbar link
-
- .nav-link {
- padding-left: $navbar-padding-x;
- padding-right: $navbar-padding-x;
- font-size: $navbar-nav-link-font-size;
-
- &.active {
- position: relative;
-
- &:before {
- content: '';
- position: absolute;
- left: 0;
- top: $nav-link-padding-y;
- bottom: $nav-link-padding-y;
- border-left: 2px solid $primary;
- }
- }
-
-
- // Icon
-
- > i {
- min-width: $navbar-icon-min-width;
- font-size: .9375rem;
- line-height: ($font-size-base * $line-height-base);
- }
-
-
- // Dropdown
-
- .dropdown-menu {
- border: none;
-
- .dropdown-menu {
- margin-left: $dropdown-item-padding-x / 2;
- }
- }
- }
- }
-
-
- // Navbar navigation
- .navbar-nav .nav-link {
- display: flex;
- align-items: center;
- }
-
- .navbar-nav .nav-link[data-toggle="collapse"] {
- &:after {
- display: inline-block;
- font-style: normal;
- font-variant: normal;
- text-rendering: auto;
- -webkit-font-smoothing: antialiased;
- font-family: 'Font Awesome 5 Free';
- font-weight: 700;
- content: "\f105";
- margin-left: auto;
- color: $text-muted;
- transition: $transition-base;
- } // Expanded
- &[aria-expanded="true"] {
-
- &:after {
- transform: rotate(90deg);
- }
- }
- }
-
- // Second level
- .navbar-nav .nav .nav-link {
- padding-left: $navbar-padding-x + $navbar-icon-min-width;
- }
-
- // Third level
- .navbar-nav .nav .nav .nav-link {
- padding-left: $navbar-padding-x * 1.5 + $navbar-icon-min-width;
- }
-
-
- // Navbar heading
- .navbar-heading {
- padding-top: $nav-link-padding-y;
- padding-bottom: $nav-link-padding-y;
- font-size: $font-size-xs;
- text-transform: uppercase;
- letter-spacing: .04em;
- }
-
-
- // Expanded navbar specific styles
- &.navbar-expand {
- @each $breakpoint,
- $dimension in $grid-breakpoints {
-
- &-#{$breakpoint} {
- @include media-breakpoint-up(#{$breakpoint}) {
- display: block;
- position: fixed;
- top: 0;
- bottom: 0;
- width: 100%;
- max-width: $navbar-vertical-width;
- padding-left: $navbar-vertical-padding-x;
- padding-right: $navbar-vertical-padding-x;
-
- overflow-y: auto;
-
- // Container
- >[class*="container"] {
- flex-direction: column;
- align-items: stretch;
- min-height: 100%;
- padding-left: 0;
- padding-right: 0; // Target IE 10 & 11
- @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
- min-height: none;
- height: 100%;
- }
- }
-
-
- // Fixes the vertical navbar to the left
- &.fixed-left {
- left: 0;
- border-width: 0 1px 0 0;
- }
-
-
- // Fixed the vertical navbar to the right
- &.fixed-right {
- right: 0;
- border-width: 0 0 0 1px;
- }
-
-
- // Navbar collapse
- .navbar-collapse {
- flex: 1;
- display: flex;
- flex-direction: column;
- align-items: stretch;
- margin-left: -$navbar-vertical-padding-x;
- margin-right: -$navbar-vertical-padding-x;
- padding-left: $navbar-vertical-padding-x;
- padding-right: $navbar-vertical-padding-x;
-
- > * {
- min-width: 100%;
- }
- }
-
-
- // Navbar navigation
- .navbar-nav {
- flex-direction: column;
- margin-left: -$navbar-vertical-padding-x;
- margin-right: -$navbar-vertical-padding-x;
- }
-
- .navbar-nav .nav-link {
- padding: $navbar-vertical-nav-link-padding-y $navbar-vertical-nav-link-padding-x;
-
- &.active {
- &:before {
- top: $nav-link-padding-y;
- bottom: $nav-link-padding-y;
- left: 0;
- right: auto;
- border-left: 2px solid $primary;
- border-bottom: 0;
- }
- }
- }
-
-
- // Second level
- .navbar-nav .nav .nav-link {
- padding-left: $navbar-vertical-padding-x + $navbar-icon-min-width;
- }
-
-
- // Third level
- .navbar-nav .nav .nav .nav-link {
- padding-left: $navbar-vertical-padding-x * 1.5 + $navbar-icon-min-width;
- }
-
- // Navbar brand
- .navbar-brand {
- display: block;
- text-align: center;
- padding-top: (2rem - $navbar-padding-y);
- padding-bottom: (2rem - $navbar-padding-y);
- }
-
- .navbar-brand-img {
- max-height: 2.5rem;
- }
-
- // Navbar user
- .navbar-user {
- margin-left: -$navbar-vertical-padding-x;
- margin-right: -$navbar-vertical-padding-x;
- padding-top: $spacer;
- padding-bottom: $spacer - $navbar-padding-y;
- padding-left: $navbar-vertical-padding-x;
- padding-right: $navbar-vertical-padding-x;
- border-top: 1px solid $border-color;
-
- // Dropup menu
- .dropup .dropdown-menu {
- left: 50%;
- transform: translateX(-50%);
- }
- }
- }
- }
- }
- }
- }
|