497 lines
12 KiB
SCSS
497 lines
12 KiB
SCSS
.navbar {
|
|
margin: auto;
|
|
width: inherit;
|
|
max-width: inherit;
|
|
height: $grid_navbar_height;
|
|
z-index: z('navbar');
|
|
position: fixed;
|
|
left: 0;
|
|
right: 0;
|
|
top: 0;
|
|
|
|
@include transition(all, 0.2s, ease);
|
|
@include flexbox();
|
|
@include justify-content(space-between);
|
|
@include themify($themes) {
|
|
border-bottom: 1px solid themed('navbar-border-bottom-color');
|
|
background-color: themed('navbar-background-color');
|
|
}
|
|
|
|
&--hide {
|
|
top: -$grid_navbar_height;
|
|
}
|
|
|
|
&--show {
|
|
top: 0;
|
|
}
|
|
|
|
&__slide-down {
|
|
svg {
|
|
margin: auto;
|
|
display: block;
|
|
}
|
|
|
|
@include themify($themes) {
|
|
background-color: themed('navbar-background-color');
|
|
@include on-event {
|
|
background-color: themed('navbar-menu-hover-background-color');
|
|
}
|
|
}
|
|
|
|
@media only screen and (min-width: 769px) {
|
|
@for $i from 1 through 8 {
|
|
&:nth-child(#{$i}) {
|
|
@include animation('slide-in-down .25s #{$i * .1}s 1 ease both');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&__brand {
|
|
height: $grid_navbar_height;
|
|
|
|
@include flexbox();
|
|
@include align-items(center);
|
|
@include flex-shrink(0);
|
|
}
|
|
|
|
&__burger {
|
|
display: none;
|
|
position: relative;
|
|
|
|
@include animation('slide-in-down .5s .0s 1 ease both');
|
|
@media only screen and (max-width: 769px) {
|
|
cursor: pointer;
|
|
margin-left: auto;
|
|
position: relative;
|
|
height: $grid_navbar_height;
|
|
width: 35px;
|
|
|
|
@include flexbox();
|
|
@include align-items(center);
|
|
@include justify-content(flex-end);
|
|
|
|
span {
|
|
@include themify($themes) {
|
|
background-color: themed('burger-menu-color');
|
|
}
|
|
|
|
border-radius: 1rem;
|
|
display: block;
|
|
height: 2px;
|
|
left: calc(50% - 8px);
|
|
position: absolute;
|
|
transform-origin: center;
|
|
transition-duration: 86ms;
|
|
transition-property: background-color, opacity, transform;
|
|
transition-timing-function: ease-out;
|
|
width: 16px;
|
|
&:nth-child(1) {
|
|
top: calc(50% - 6px);
|
|
}
|
|
&:nth-child(2) {
|
|
top: calc(50% - 1px);
|
|
}
|
|
&:nth-child(3) {
|
|
top: calc(50% + 4px);
|
|
}
|
|
}
|
|
|
|
&:hover {
|
|
span {
|
|
@include themify($themes) {
|
|
background-color: themed('link-hover');
|
|
}
|
|
}
|
|
}
|
|
|
|
&.is-active {
|
|
display: block;
|
|
span {
|
|
&:nth-child(1) {
|
|
transform: translateY(5px) rotate(45deg);
|
|
}
|
|
&:nth-child(2) {
|
|
opacity: 0;
|
|
}
|
|
&:nth-child(3) {
|
|
transform: translateY(-5px) rotate(-45deg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&__logo {
|
|
width: 100%;
|
|
height: 100%;
|
|
|
|
&-link {
|
|
width: 40px;
|
|
height: 40px;
|
|
padding: 0.1rem;
|
|
margin: auto 0.25rem;
|
|
@include flex-shrink(0);
|
|
flex-shrink: 0;
|
|
}
|
|
}
|
|
|
|
&__long {
|
|
&-link {
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: 0.6rem 0.2rem;
|
|
margin: auto 0.25rem;
|
|
@include flex-shrink(0);
|
|
flex-shrink: 0;
|
|
}
|
|
}
|
|
|
|
&__title {
|
|
height: $grid_navbar_height;
|
|
font-size: 1.5rem;
|
|
|
|
@include flexbox();
|
|
@include align-items(center);
|
|
|
|
&-link {
|
|
@include themify($themes) {
|
|
color: themed("navbar-title-color");
|
|
@include on-event {
|
|
text-decoration: none;
|
|
color: themed("navbar-title-color");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&__menu {
|
|
@include flex-grow(1);
|
|
@include flexbox();
|
|
@include align-items(center);
|
|
@include justify-content(flex-end);
|
|
height: $grid_navbar_height;
|
|
|
|
@media only screen and (max-width: 769px) {
|
|
display: none;
|
|
}
|
|
|
|
&-item {
|
|
height: $grid_navbar_height;
|
|
padding: 0.5rem;
|
|
font-size: 1rem;
|
|
font-family: $title-font;
|
|
font-weight: 700;
|
|
|
|
@include flexbox();
|
|
@include align-items(center);
|
|
@include justify-content(center);
|
|
@include no-select;
|
|
@include themify($themes) {
|
|
color: themed('navbar-title-color');
|
|
border-top: 1px solid transparent;
|
|
border-bottom: 1px solid themed('navbar-border-bottom-color');
|
|
@include on-event {
|
|
color: themed('navbar-title-hover-color');
|
|
background-color: themed('navbar-menu-hover-background-color');
|
|
text-decoration: none;
|
|
border-bottom: 1px solid themed('navbar-border-bottom-color');
|
|
@media only screen and (max-width: 769px) {
|
|
border-bottom: none;
|
|
}
|
|
}
|
|
&.active {
|
|
color: themed('navbar-title-active-color') !important;
|
|
}
|
|
}
|
|
|
|
@media only screen and (max-width: 769px) {
|
|
@include justify-content(flex-start);
|
|
width: 100%;
|
|
padding: 0 0.75rem;
|
|
}
|
|
}
|
|
|
|
&.is-active {
|
|
position: absolute;
|
|
top: $grid_navbar_height;
|
|
left: 0;
|
|
width: 100%;
|
|
height: auto;
|
|
overflow: hidden;
|
|
|
|
@include flexbox();
|
|
@include flex-direction(column);
|
|
@include align-items(flex-start);
|
|
@include themify($themes) {
|
|
border-top: 1px solid themed('navbar-border-bottom-color');
|
|
background-color: themed('navbar-mobile-background-color');
|
|
border-bottom: 1px solid themed('navbar-border-bottom-color');
|
|
}
|
|
}
|
|
}
|
|
|
|
&__dropdown {
|
|
display: inline-block;
|
|
height: $grid_navbar_height;
|
|
@media only screen and (max-width: 769px) {
|
|
width: 100%;
|
|
height: auto;
|
|
}
|
|
|
|
&--content {
|
|
position: absolute;
|
|
display: none;
|
|
width: inherit;
|
|
z-index: z("dropdown");
|
|
border-bottom-left-radius: 0.15rem;
|
|
border-bottom-right-radius: 0.15rem;
|
|
|
|
@include box-shadow(0, 1px, 3px, 0, rgba(0, 0, 0, 0.4));
|
|
@include themify($themes) {
|
|
border-top: 4px solid themed("dropdown-border-top-color");
|
|
background-color: themed("dropdown-content-background-color");
|
|
}
|
|
|
|
@media only screen and (max-width: 769px) {
|
|
position: relative;
|
|
display: block;
|
|
box-shadow: none;
|
|
@include themify($themes) {
|
|
border-top: none;
|
|
background-color: themed("navbar-mobile-background-color");
|
|
}
|
|
}
|
|
}
|
|
|
|
&--item {
|
|
padding: 0.25rem 0.75rem;
|
|
height: auto;
|
|
margin: auto;
|
|
min-width: 40px;
|
|
max-width: 150px;
|
|
text-decoration: none;
|
|
display: block;
|
|
font-size: 1rem;
|
|
font-weight: 700;
|
|
|
|
@include truncate(150px);
|
|
@include themify($themes) {
|
|
color: themed("dropdown-item-color");
|
|
@include on-event {
|
|
color: themed("navbar-dropdown-item-hover-color");
|
|
background-color: themed("navbar-menu-hover-background-color");
|
|
text-decoration: none;
|
|
|
|
&:last-child {
|
|
border-bottom-left-radius: 0.15rem;
|
|
border-bottom-right-radius: 0.15rem;
|
|
}
|
|
}
|
|
}
|
|
|
|
@media only screen and (max-width: 769px) {
|
|
padding-left: 2.5rem;
|
|
min-width: 100%;
|
|
max-width: 100%;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.navbar__dropdown:hover .navbar__dropdown--content {
|
|
display: block;
|
|
}
|
|
|
|
.theme {
|
|
@include flexbox();
|
|
@include align-items(center);
|
|
@include justify-content(flex-end);
|
|
@include animation('slide-in-down .5s .0s 1 ease both');
|
|
|
|
@media only screen and (max-width: 769px) {
|
|
display: none;
|
|
}
|
|
|
|
.dropdown {
|
|
@include flexbox();
|
|
@include align-items(center);
|
|
@include justify-content(center);
|
|
@include themify($themes) {
|
|
color: themed('burger-menu-color');
|
|
@include on-event {
|
|
color: themed('navbar-title-hover-color');
|
|
background-color: themed('navbar-menu-hover-background-color');
|
|
}
|
|
}
|
|
|
|
&-trigger {
|
|
padding: 0.5rem;
|
|
cursor: pointer;
|
|
border: none;
|
|
outline: none;
|
|
width: $grid_navbar_height;
|
|
height: $grid_navbar_height - 2px;
|
|
color: inherit;
|
|
background-color: inherit;
|
|
}
|
|
|
|
&-content {
|
|
position: absolute;
|
|
top: 100%;
|
|
right: 0;
|
|
display: none;
|
|
height: auto;
|
|
z-index: z("dropdown");
|
|
border-bottom-left-radius: 0.25rem;
|
|
border-bottom-right-radius: 0.25rem;
|
|
|
|
a {
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
@include box-shadow(0, 1px, 3px, 0, rgba(0, 0, 0, 0.4));
|
|
@include themify($themes) {
|
|
border-top: 4px solid themed("dropdown-border-top-color");
|
|
background-color: themed("dropdown-content-background-color");
|
|
}
|
|
|
|
.is-active {
|
|
@include themify($themes) {
|
|
background-color: themed("dropdown-item-active-background-color");
|
|
}
|
|
}
|
|
}
|
|
|
|
&-item {
|
|
padding: 0.25rem 0.75rem;
|
|
height: 100%;
|
|
text-decoration: none;
|
|
display: block;
|
|
font-size: 1rem;
|
|
|
|
@include no-select;
|
|
@include themify($themes) {
|
|
color: themed("dropdown-item-color");
|
|
@include on-event {
|
|
color: themed("dropdown-item-hover-color");
|
|
background-color: themed("dropdown-item-hover-background-color");
|
|
text-decoration: none;
|
|
|
|
&:last-child {
|
|
border-bottom-left-radius: 0.25rem;
|
|
border-bottom-right-radius: 0.25rem;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.dropdown:hover .dropdown-content {
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
.theme-mobile {
|
|
display: none;
|
|
outline: none;
|
|
position: absolute;
|
|
top: 0;
|
|
right: 35px * 2;
|
|
width: 35px;
|
|
height: $grid_navbar_height;
|
|
cursor: pointer;
|
|
z-index: z('modal');
|
|
|
|
@include animation('slide-in-down .5s .4s 1 ease both');
|
|
@include themify($themes) {
|
|
color: themed('burger-menu-color');
|
|
@include on-event {
|
|
color: themed('link-hover');
|
|
background-color: inherit;
|
|
border-bottom: none;
|
|
}
|
|
}
|
|
|
|
@media only screen and (max-width: 769px) {
|
|
@include flexbox();
|
|
@include align-items(center);
|
|
@include justify-content(flex-end);
|
|
}
|
|
|
|
.dropdown {
|
|
height: $grid_navbar_height !important;
|
|
@include themify($themes) {
|
|
color: themed('burger-menu-color');
|
|
@include on-event {
|
|
color: themed('link-hover');
|
|
background-color: themed('navbar-menu-hover-background-color');
|
|
}
|
|
}
|
|
|
|
&-trigger {
|
|
padding: 0.25rem;
|
|
cursor: pointer;
|
|
border: none;
|
|
outline: none;
|
|
width: 35px;
|
|
height: $grid_navbar_height !important;
|
|
color: inherit;
|
|
background-color: inherit;
|
|
}
|
|
|
|
&-content {
|
|
position: absolute;
|
|
top: 100%;
|
|
right: 0;
|
|
display: none;
|
|
height: auto;
|
|
z-index: z("dropdown");
|
|
border-top-left-radius: 0.15rem;
|
|
border-top-right-radius: 0.15rem;
|
|
|
|
a {
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
@include box-shadow(0, 1px, 3px, 0, rgba(0, 0, 0, 0.4));
|
|
@include themify($themes) {
|
|
border-top: 4px solid themed("dropdown-border-top-color");
|
|
background-color: themed("dropdown-content-background-color");
|
|
}
|
|
|
|
.is-active {
|
|
@include themify($themes) {
|
|
background-color: themed("dropdown-item-active-background-color");
|
|
}
|
|
}
|
|
}
|
|
|
|
&-item {
|
|
padding: 0.25rem 0.75rem;
|
|
height: 100%;
|
|
text-decoration: none;
|
|
display: block;
|
|
font-size: 1rem;
|
|
|
|
@include no-select;
|
|
@include themify($themes) {
|
|
color: themed("dropdown-item-color");
|
|
@include on-event {
|
|
color: themed("dropdown-item-hover-color");
|
|
background-color: themed("dropdown-item-hover-background-color");
|
|
text-decoration: none;
|
|
|
|
&:first-child {
|
|
border-top-left-radius: 0.15rem;
|
|
border-top-right-radius: 0.15rem;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.dropdown:hover .dropdown-content {
|
|
display: block;
|
|
}
|
|
} |