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;
color: var(--vriish-gradient-text);
mask: var(--vriish-waves);
padding: 1rem;
padding: 5rem 1rem;
@media (max-width: 1140px) {
height: 90vh;
font-size: 1.5rem;

View file

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

View file

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