192.168.0.2/themes/neff/assets/scss/_header.scss

213 lines
5.2 KiB
SCSS

#header {
$transition-time: 0.4s;
position: fixed;
width: 100%;
top: 0;
left: 0;
font-family: $heading-font-family;
&.small {
transition: $transition-time;
.navbar-logo {
flex: 1 1 0;
img {
max-height: 30px;
transition: $transition-time * 1.5;
width: auto;
}
}
@media only screen and (min-width: calc(#{$max-width} + calc(6 * #{$gutter-width}))) {
.navbar-logo {
img {
transition: $transition-time * 1.5;
max-height: 30px;
}
}
}
}
&.large {
transition: $transition-time;
.navbar-logo {
flex: 1 1 0;
img {
max-height: 50px;
width: auto;
transition: $transition-time * 1.5;
}
}
@media only screen and (min-width: calc(#{$max-width} + calc(6 * #{$gutter-width}))) {
.navbar-logo {
img {
max-height: 100px;
transition: $transition-time * 1.5;
}
}
}
}
&.hidden {
transition: $transition-time;
top: -200px;
}
h1 {
font-size: 1.3rem;
display: inline;
margin: $gutter-width;
padding: 0;
}
.container {
border-radius: 0 0 $border-radius $border-radius;
}
.navbar {
@extend .flex;
@extend .column;
justify-content: space-between;
align-items: stretch;
max-width: 40px;
padding: 0 $gutter-width;
@media only screen and (min-width: calc(#{$max-width} + calc(6 * #{$gutter-width}))) {
max-width: none;
}
input[type=checkbox] {
display: none;
& + label {
display: block;
margin-top: $gutter-width;
margin-right: calc(2 * #{$gutter-width});
div {
position: relative;
cursor: pointer;
width: 35px;
height: 30px;
background-color: transparent;
.line {
height: 4px;
width: 35px;
background: black;
border-radius: 2px;
transition: 0.4s;
transform-origin: center;
position: absolute;
}
.line:nth-child(1) {
top: 0px;
}
.line:nth-child(2) {
top: 10px;
transition: 0.1s;
}
.line:nth-child(3) {
top: 20px;
}
}
}
}
input[type=checkbox]:checked+.hamburger .line:nth-child(1) {
transform: translateY(10px) rotate(-45deg);
}
input[type=checkbox]:checked+.hamburger .line:nth-child(2) {
opacity: 0;
}
input[type=checkbox]:checked+.hamburger .line:nth-child(3) {
transform: translateY(-10px) rotate(45deg);
}
ul {
display: none;
}
input[type=checkbox]:checked ~ .navbar-container nav ul {
@include menu-list(column);
li {
text-align: right;
flex: 0 0 0;
margin: $gutter-width 0;
font-size: 1.1rem;
font-weight: bold;
a {
&:active,
&:hover {
color: darken($primary-color, 15%);
}
}
}
}
.navbar {
flex: 1 1 0;
@extend .flex;
@extend .column;
justify-content: end;
align-items: end;
}
.navbar-container {
margin-top: auto;
nav {
@extend .flex;
@extend .column;
align-items: flex-end;
@media only screen and (min-width: calc(#{$max-width} + calc(6 * #{$gutter-width}))) {
& {
justify-content: flex-end;
align-items: flex-end;
}
ul {
@include menu-list(row);
@include trim-list-margin-horizontal;
align-items: flex-end;
height: 100%;
li {
font-size: 1.1rem;
font-weight: bold;
}
}
}
}
}
@media only screen and (min-width: calc(#{$max-width} + calc(6 * #{$gutter-width}))) {
input[type=checkbox] {
display: none;
& + label {
display: none;
.line {
display: none;
}
}
}
}
}
}