old-website/static/css/_aside.scss
2022-12-28 00:46:08 +00:00

118 lines
1.9 KiB
SCSS

@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;
hr {
margin: 0.5rem 0;
padding: 0;
width: 100%;
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);
}
@media screen and (max-width: 768px) {
.aside {
display: block;
position: fixed;
top: 3rem;
left: -100vw;
width: calc(100vw - 1rem);
height: calc(100vh - 3rem);
z-index: 68;
overflow-y: auto;
box-shadow: 0 0 0.5rem 5px rgba($black, 0.5);
transition: left 0.2s ease-in-out, opacity 0.2s ease-in-out;
}
.aside-active {
opacity: 1;
left: 0;
}
}