old-website/static/css/_aside.scss

130 lines
2.1 KiB
SCSS
Raw Normal View History

2022-12-28 00:46:08 +00:00
@mixin aside-item($color) {
background-color: rgba($color, 0.1);
border: 1px solid rgba($color, 0.5);
color: $color;
}
.aside {
margin: 0;
padding: 0;
background-color: $black;
box-sizing: border-box;
2022-12-28 18:45:26 +00:00
z-index: 68;
2022-12-28 00:46:08 +00:00
hr {
2022-12-28 18:45:26 +00:00
margin: 0.5rem auto;
2022-12-28 00:46:08 +00:00
padding: 0;
2022-12-28 18:45:26 +00:00
width: 80%;
2022-12-28 00:46:08 +00:00
height: 1px;
background-color: $white;
border: none;
}
br {
margin: 0.5rem 0;
padding: 0;
}
}
.aside-container {
margin: 0;
padding: 1rem;
position: sticky;
top: 0;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.aside-item {
margin: 0;
padding: 0.75rem;
width: 100%;
height: auto;
background-color: transparent;
color: $white;
text-decoration: none;
display: flex;
align-items: center;
gap: 0.5rem;
border: 1px solid transparent;
border-radius: 3px;
transition: all 0.2s ease-in-out;
cursor: pointer;
i {
opacity: 0;
transform: translateX(1rem);
transition: all 0.2s ease-in-out;
filter: blur(0.1rem);
pointer-events: none;
}
&:hover i {
opacity: 1;
transform: translateX(0);
filter: blur(0);
}
}
.aside-red {
@include aside-item($red);
}
.aside-yellow {
@include aside-item($yellow);
}
.aside-green {
@include aside-item($green);
}
.aside-blue {
@include aside-item($blue);
}
.aside-purple {
@include aside-item($purple);
}
2022-12-28 18:45:26 +00:00
@media screen and (max-width: $phone-width) {
@media screen and (min-width: calc(#{$phone-width} * 0.6)) {
.aside {
max-width: 20rem;
}
}
2022-12-28 00:46:08 +00:00
.aside {
display: block;
position: fixed;
top: 3rem;
left: -100vw;
2022-12-28 18:45:26 +00:00
width: 100vw;
2022-12-28 00:46:08 +00:00
height: calc(100vh - 3rem);
2022-12-28 18:45:26 +00:00
background-color: #121212;
2022-12-28 00:46:08 +00:00
2022-12-28 18:45:26 +00:00
overflow-y: auto;
2022-12-28 00:46:08 +00:00
box-shadow: 0 0 0.5rem 5px rgba($black, 0.5);
transition: left 0.2s ease-in-out, opacity 0.2s ease-in-out;
2022-12-28 18:45:26 +00:00
hr {
margin: 1rem auto;
width: 100%;
}
2022-12-28 00:46:08 +00:00
}
.aside-active {
opacity: 1;
left: 0;
}
}