improve sidebar

This commit is contained in:
Vri 🌈 2023-03-09 22:00:22 +01:00
parent b70349e775
commit 03d663030b
Signed by: vrifox
GPG key ID: D40098E5B60B2197
4 changed files with 54 additions and 27 deletions

View file

@ -21,7 +21,7 @@
height: 100vh; height: 100vh;
color: var(--vriish-gradient-text); color: var(--vriish-gradient-text);
mask: var(--vriish-waves); mask: var(--vriish-waves);
padding: 1rem; padding: 5rem 1rem;
@media (max-width: 1140px) { @media (max-width: 1140px) {
height: 90vh; height: 90vh;
font-size: 1.5rem; font-size: 1.5rem;

View file

@ -19,9 +19,9 @@ html {
color: var(--text); color: var(--text);
display: flex; display: flex;
font-family: system-ui, sans-serif; font-family: system-ui, sans-serif;
font-size: 1.2em; font-size: 1.2rem;
flex-direction: column; flex-direction: column;
line-height: 1.7; line-height: 1.5;
margin: 0; margin: 0;
min-height: 100vh; min-height: 100vh;
@media (max-width: 920px) { @media (max-width: 920px) {

View file

@ -20,17 +20,13 @@
border-left: 0; border-left: 0;
overflow: hidden; overflow: hidden;
@media (max-width: 1140px) { @media (max-width: 1140px) {
top: auto; overflow: unset;
bottom: 0; border: 0;
border-radius: 2rem 2rem 0 0; position: unset;
flex-direction: row; height: 0;
min-width: 100vw; padding: 0;
height: 5rem;
margin: 0; margin: 0;
overflow-y: hidden; background-color: transparent;
overflow-x: scroll;
border: 1px solid var(--sidebar-border);
border-bottom: 0;
} }
header { header {
text-align: center; text-align: center;
@ -39,7 +35,12 @@
#avatar { #avatar {
border-radius: 300% 500% / 500% 300%; border-radius: 300% 500% / 500% 300%;
max-width: 64px; max-width: 64px;
transition: .4s border-radius ease-in-out; transition: 0.4s border-radius ease-in-out;
@media (max-width: 1140px) {
position: absolute;
top: 1rem;
left: 1rem;
}
&:hover { &:hover {
border-radius: 500% 300% / 300% 500%; border-radius: 500% 300% / 300% 500%;
} }
@ -48,6 +49,18 @@
#sidebar-menu { #sidebar-menu {
user-select: none; user-select: none;
text-align: center; text-align: center;
@media (max-width: 1140px) {
position: fixed;
width: 100vw;
background-color: var(--sidebar-background);
height: 5rem;
left: 0;
bottom: 0;
padding: 0.4rem;
border-radius: 2rem 2rem 0 0;
border: 1px solid var(--sidebar-border);
border-bottom: 0;
}
ul { ul {
list-style: none; list-style: none;
padding: 0; padding: 0;
@ -55,6 +68,7 @@
@media (max-width: 1140px) { @media (max-width: 1140px) {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center;
height: 100%; height: 100%;
} }
} }
@ -62,7 +76,7 @@
border-radius: 0.5rem; border-radius: 0.5rem;
margin: 0.5em 0; margin: 0.5em 0;
position: relative; position: relative;
letter-spacing: .025rem; letter-spacing: 0.025rem;
overflow: hidden; overflow: hidden;
aspect-ratio: 1 / 1; aspect-ratio: 1 / 1;
display: flex; display: flex;
@ -74,7 +88,7 @@
} }
a { a {
display: block; display: block;
padding: 0.25em 0.5em; padding: 3rem;
} }
&::after { &::after {
background-color: var(--sidebar-accent-1); background-color: var(--sidebar-accent-1);
@ -123,13 +137,11 @@
} }
} }
aside { aside {
@media (max-width: 1140px) {
display: flex;
flex-direction: row;
align-items: center;
}
#social-links { #social-links {
text-align: center; text-align: center;
@media (max-width: 1140px) {
display: none;
}
ul { ul {
list-style: none; list-style: none;
margin: 0; margin: 0;
@ -139,9 +151,6 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 1rem; gap: 1rem;
@media (max-width: 1140px) {
flex-direction: row;
}
} }
.icon { .icon {
height: 1.25rem; height: 1.25rem;
@ -161,20 +170,38 @@
transition: background-color 0.2s ease-in-out; transition: background-color 0.2s ease-in-out;
border-radius: 0.5rem 0.5rem 1.85rem 0.5rem; border-radius: 0.5rem 0.5rem 1.85rem 0.5rem;
@media (max-width: 1140px) { @media (max-width: 1140px) {
border-radius: 0.5rem; border-radius: 4rem;
position: absolute;
top: 1rem;
left: calc(100vw - 1em - 64px);
font-size: 1.4rem;
border-radius: 100%;
background-color: var(--sidebar-accent-1);
aspect-ratio: 1 / 1;
width: 64px;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
} }
&:hover { &:hover {
background-color: var(--sidebar-accent-1); background-color: var(--sidebar-accent-1);
@media (max-width: 1140px) {
background-color: var(--sidebar-accent-2);
}
} }
&:active { &:active {
background-color: var(--sidebar-accent-2); background-color: var(--sidebar-accent-2);
@media (max-width: 1140px) {
background-color: var(--sidebar-accent-3);
}
} }
#language { #language {
display: block; display: block;
text-decoration: none; text-decoration: none;
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 1rem 1rem; padding: 1rem;
pointer-events: all; pointer-events: all;
} }
} }