hugo-theme-wondermod/assets/css/common/header.css

182 lines
3.0 KiB
CSS
Raw Normal View History

2020-07-21 10:50:35 +02:00
.nav {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
max-width: calc(var(--nav-width) + var(--gap) * 2);
margin-inline-start: auto;
margin-inline-end: auto;
line-height: var(--header-height);
2020-07-21 10:50:35 +02:00
}
.nav a {
display: block;
2020-07-21 10:50:35 +02:00
}
.logo,
#menu {
display: flex;
margin: auto var(--gap);
}
.logo {
flex-wrap: inherit;
2020-07-21 10:50:35 +02:00
}
.logo a {
font-size: 24px;
font-weight: 700;
}
.logo a img {
display: inline;
vertical-align: middle;
pointer-events: none;
transform: translate(0, -10%);
border-radius: 6px;
margin-inline-end: 8px;
}
2021-06-11 10:04:55 +02:00
button#theme-toggle {
font-size: 26px;
margin: auto 4px;
}
body.dark #moon {
vertical-align: middle;
display: none;
}
body:not(.dark) #sun {
display: none;
}
#menu {
2020-07-21 10:50:35 +02:00
list-style: none;
word-break: keep-all;
overflow-x: auto;
white-space: nowrap;
2020-07-21 10:50:35 +02:00
}
2021-06-11 10:04:55 +02:00
#menu li + li {
margin-inline-start: var(--gap);
2020-07-21 10:50:35 +02:00
}
2022-07-25 06:10:26 +02:00
#hamburger-input {
display: none;
}
2022-07-25 06:08:07 +02:00
#hamburger-menu {
display: none;
width: 18px;
height: 18px;
margin: auto;
2022-07-25 06:17:33 +02:00
margin-right: 13px;
margin-left: 13px;
2022-07-25 06:08:07 +02:00
background: linear-gradient(
var(--primary), var(--primary) 20%,
#ffffff00 20%, #ffffff00 40%,
var(--primary) 40%, var(--primary) 60%,
#ffffff00 60%, #ffffff00 80%,
var(--primary) 80%, var(--primary) 100%
);
z-index: 10001;
2022-07-25 19:09:26 +02:00
cursor: pointer;
2022-07-25 06:08:07 +02:00
}
2022-07-25 06:32:59 +02:00
@media screen and (max-width: 900px) {
2022-07-25 06:08:07 +02:00
#menu {
display: none;
}
#hamburger-menu {
display: inline;
}
2022-07-25 17:49:52 +02:00
#hamburger-input:checked ~ #hamburger-menu {
background: none;
}
#hamburger-input:checked ~ #hamburger-menu:after {
content: "\00d7";
2022-07-28 02:44:46 +02:00
position: fixed;
2022-07-25 17:49:52 +02:00
font-size: 28px;
line-height: 0;
top: 28px;
}
2022-07-25 06:08:07 +02:00
#hamburger-input:checked ~ .overlay {
visibility: visible;
}
#hamburger-input:checked ~ #menu {
display: block;
width: 80%;
margin: auto;
2022-07-28 02:44:46 +02:00
position: fixed;
2022-07-25 06:08:07 +02:00
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%);
z-index: 10002;
}
#menu li {
text-align: center;
}
#menu li + li {
margin-inline-start: 0;
}
}
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
visibility: hidden;
overflow: hidden;
background: var(--theme);
z-index: 10000;
}
#menu a {
font-size: 16px;
}
#menu .active {
font-weight: 500;
border-bottom: 2px solid currentColor;
}
.lang-switch li,
.lang-switch ul,
.logo-switches {
display: inline-flex;
margin: auto 4px;
}
.lang-switch {
display: flex;
flex-wrap: inherit;
}
.lang-switch a {
margin: auto 3px;
font-size: 16px;
font-weight: 500;
}
.logo-switches {
flex-wrap: inherit;
}
2022-07-29 00:07:11 +02:00
#progressBar {
--scrollAmount: 0%;
width: var(--scrollAmount);
height: 3px;
2022-07-29 02:30:27 +02:00
background-color: #1e8cdb;
2022-07-29 00:07:11 +02:00
position: fixed;
z-index: 9999;
2022-07-29 02:30:27 +02:00
}