quitsocialmedia.club/styles/parts/_nav.scss

201 lines
3.1 KiB
SCSS
Raw Normal View History

2022-06-01 10:26:43 +02:00
$tiny: .2rem;
$small: .5rem;
$regular-less: .9rem;
$regular: 1.1rem;
$regular-more: 1.3rem;
$regular-more-em: 1.3em;
$big: 1.6rem;
$bigger: 1.8rem;
$twice: 2.2rem;
$height: 3.1rem;
$mastodon: 4rem;
2022-06-01 10:26:43 +02:00
$radius-s: .4rem;
$radius-m: .6rem;
$radius-l: 1rem;
$trans: .5s ease-out;
$quicktrans: .1s ease-in-out;
2022-06-01 10:26:43 +02:00
header {
height: $mastodon;
2020-12-31 20:03:57 +01:00
text-transform: uppercase;
* {
2022-01-05 20:29:51 +01:00
border-radius: $radius-m;
list-style-type: none !important;
font-weight: 700 !important;
z-index: 9;
2020-12-31 20:03:57 +01:00
}
}
#home {
2022-01-05 20:29:51 +01:00
position: fixed;
top: 1.5vw;
left: 5vw;
2022-09-18 10:24:33 +02:00
a {
display: inline-block;
padding: 0 $regular-less;
line-height: $height;
font-size: 1.8rem;
color: var(--background);
background: var(--primary);
box-shadow: var(--shadow);
margin: auto;
&:hover,
&:focus {
box-shadow: none !important;
}
&:active {
box-shadow: var(--inner-shadow);
}
2020-12-31 20:03:57 +01:00
}
}
#nav {
position: fixed;
top: 1.5vw;
right: 6vw;
2020-12-31 20:03:57 +01:00
text-align: right;
2022-09-18 10:24:33 +02:00
padding: 0 .8rem;
2020-12-31 20:03:57 +01:00
box-shadow: var(--shadow);
background: var(--background);
2022-01-05 20:29:51 +01:00
* {
margin: 0 !important;
2020-12-31 20:03:57 +01:00
}
2022-09-18 10:24:33 +02:00
ul,
menu {
2020-12-31 20:03:57 +01:00
padding: 0;
li {
float: left;
2022-01-05 20:29:51 +01:00
a,
label {
2020-12-31 20:03:57 +01:00
display: block;
color: var(--text) !important;
2022-01-05 20:29:51 +01:00
line-height: $height;
height: $height;
2022-09-18 10:24:33 +02:00
padding: 0 .8rem;
2022-01-05 20:29:51 +01:00
font-size: $regular-more;
2021-01-01 01:48:06 +01:00
font-weight: 700;
&::after {
content: none;
}
2020-12-31 20:03:57 +01:00
&:hover,
&:focus{
transform: scale(1.1) rotate(3deg);
filter: none;
border-bottom: none;
2020-12-31 20:03:57 +01:00
}
&:active {
opacity: .6;
}
&::before {
content: none !important;
}
}
}
}
}
2022-01-05 20:29:51 +01:00
.lang-list {
top: 3.7rem;
2022-09-18 10:24:33 +02:00
display: none;
2020-12-31 20:03:57 +01:00
position: absolute;
background: var(--background);
#langtoggle:checked + & {
box-shadow: var(--shadow);
2022-09-18 10:24:33 +02:00
display: block;
}
2020-12-31 20:03:57 +01:00
}
.nav-mobile {
display: none;
2022-01-05 20:29:51 +01:00
height: $height;
width: $height;
position: fixed;
bottom: calc(3vh + .5rem);
right: calc(6vw + 3.5rem);
box-shadow: var(--button-shadow);
2022-01-05 20:29:51 +01:00
background: var(--background);
z-index: 6;
2020-12-31 20:03:57 +01:00
span {
top: 1.4rem;
left: .7rem;
2020-12-31 20:03:57 +01:00
}
span,
span::before,
span::after {
height: 4px;
width: 1.7rem;
2020-12-31 20:03:57 +01:00
background: var(--text);
position: absolute;
display: block;
2022-01-05 20:29:51 +01:00
content: '';
2020-12-31 20:03:57 +01:00
box-shadow: var(--little-shadow);
2022-01-05 20:29:51 +01:00
border-radius: $radius-s !important;
transition: $quicktrans;
2020-12-31 20:03:57 +01:00
}
span::before {
top: .65rem;
}
span::after {
bottom: .65rem;
}
}
2022-09-18 10:24:33 +02:00
.dropdown {
height: $height;
}
2020-12-31 20:03:57 +01:00
@media only screen and (max-width: 950px) {
2022-01-05 20:29:51 +01:00
#home {
2022-09-18 10:24:33 +02:00
right: 0;
left: 0;
top: 2vh;
text-align: center;
2022-01-05 20:29:51 +01:00
}
.nav {
margin: 3vh;
}
2020-12-31 20:03:57 +01:00
.nav-mobile {
display: block;
}
2022-09-18 10:24:33 +02:00
#nav menu {
2020-12-31 20:03:57 +01:00
position: fixed;
2022-09-18 10:24:33 +02:00
width: 11rem;
bottom: calc(3vh + 4.5rem);
right: -14rem;
2020-12-31 20:03:57 +01:00
background: var(--background);
box-shadow: var(--shadow);
2022-01-05 20:29:51 +01:00
z-index: 9;
overflow: hidden;
2022-09-18 10:24:33 +02:00
li {
clear: both;
a {
line-height: 2.5rem;
height: 2.5rem;
}
}
2020-12-31 20:03:57 +01:00
}
}
2022-01-05 20:29:51 +01:00
#menutoggle:checked {
2022-09-18 10:24:33 +02:00
& ~ menu {
right: calc(4vw + .3rem);
}
& ~ .nav-mobile {
box-shadow: var(--inner-little-shadow);
span {
background: transparent;
2020-12-31 20:03:57 +01:00
box-shadow: none;
&::before,
&::after {
top: 0;
box-shadow: none;
}
&::before {
transform: rotate(45deg);
}
&::after {
transform: rotate(-45deg);
}
2020-12-31 20:03:57 +01:00
}
}
}