hugo-theme-re-terminal/assets/css/header.scss

173 lines
2.8 KiB
SCSS
Raw Normal View History

2022-06-21 15:14:59 +00:00
@mixin menu {
$shadow-color: opacify($background, .8);
$shadow: 0 10px $shadow-color, -10px 10px $shadow-color, 10px 10px $shadow-color;
2022-06-21 13:50:51 +00:00
position: absolute;
2022-06-21 15:14:59 +00:00
background: $background;
box-shadow: $shadow;
2022-06-21 13:50:51 +00:00
color: white;
border: 2px solid;
margin: 0;
padding: 10px;
list-style: none;
z-index: 99;
}
.header {
display: flex;
flex-direction: column;
position: relative;
@media print {
display: none;
}
&__inner {
display: flex;
align-items: center;
justify-content: space-between;
}
&__logo {
display: flex;
flex: 1;
&:after {
content: '';
2022-06-21 15:14:59 +00:00
background: repeating-linear-gradient(90deg, $accent, $accent 2px, transparent 0, transparent 10px);
2022-06-21 13:50:51 +00:00
display: block;
width: 100%;
right: 10px;
}
a {
flex: 0 0 auto;
max-width: 100%;
text-decoration: none;
}
}
.menu {
margin: 20px 1px;
2022-06-21 15:14:59 +00:00
@media ($phone) {
@include menu;
2022-06-21 13:50:51 +00:00
top: 50px;
right: 0;
2022-06-21 15:14:59 +00:00
&.hidden-on-mobile {
display: none;
}
2022-06-21 13:50:51 +00:00
}
&__inner {
display: flex;
flex-wrap: wrap;
list-style: none;
margin: 0;
padding: 0;
&--desktop {
2022-06-21 15:14:59 +00:00
@media ($phone) {
2022-06-21 13:50:51 +00:00
display: none;
}
}
&--mobile {
display: none;
2022-06-21 15:14:59 +00:00
@media ($phone) {
2022-06-21 13:50:51 +00:00
display: block;
}
}
li {
&:not(:last-of-type) {
margin-right: 20px;
margin-bottom: 10px;
flex: 0 0 auto;
}
}
2022-06-21 15:14:59 +00:00
@media ($phone) {
2022-06-21 13:50:51 +00:00
flex-direction: column;
align-items: flex-start;
padding: 0;
li {
margin: 0;
padding: 5px;
}
}
}
&__sub-inner {
position: relative;
list-style: none;
padding: 0;
margin: 0;
&:not(:only-child) {
margin-left: 20px;
}
&-more {
2022-06-21 15:14:59 +00:00
@include menu;
2022-06-21 13:50:51 +00:00
top: 35px;
left: 0;
&-trigger {
2022-06-21 15:14:59 +00:00
color: $accent;
2022-06-21 13:50:51 +00:00
user-select: none;
cursor: pointer;
}
li {
margin: 0;
padding: 5px;
white-space: nowrap;
}
}
}
.spacer {
flex-grow: 1;
}
.language-selector {
position: relative;
list-style: none;
margin: 0;
&-current {
list-style-type: none;
display: flex;
flex-direction: row;
2022-06-21 15:14:59 +00:00
color: $accent;
2022-06-21 13:50:51 +00:00
cursor: pointer;
margin: 0;
}
&__more {
2022-06-21 15:14:59 +00:00
@include menu;
2022-06-21 13:50:51 +00:00
top: 35px;
right: 0;
}
}
&-trigger {
2022-06-21 15:14:59 +00:00
display: none;
color: $accent;
2022-06-21 13:50:51 +00:00
border: 2px solid;
margin-left: 10px;
height: 100%;
padding: 3px 8px;
position: relative;
cursor: pointer;
2022-06-21 15:14:59 +00:00
@media ($phone) {
display: block;
}
2022-06-21 13:50:51 +00:00
}
}
}