website/assets/scss/partials/sidebar.scss

263 lines
5.1 KiB
SCSS
Raw Normal View History

2022-11-28 18:33:52 +01:00
// -----------
// - sidebar -
// -----------
#sidebar {
2023-03-09 15:41:41 +01:00
background: var(--sidebar-background);
2022-11-28 18:33:52 +01:00
display: flex;
flex-direction: column;
2023-03-09 18:16:35 +01:00
justify-content: space-between;
2023-01-19 17:30:13 +01:00
gap: 1em;
2023-03-09 14:19:43 +01:00
height: calc(100vh - 1rem);
padding: 0.25rem;
2023-03-05 23:22:05 +01:00
position: fixed;
2022-11-28 18:33:52 +01:00
top: 0;
2023-03-09 14:19:43 +01:00
width: 5rem;
2023-03-05 23:22:05 +01:00
z-index: 2;
2023-03-09 14:19:43 +01:00
margin: 0.5rem 0;
border-radius: 0 2rem 2rem 0;
2023-03-09 15:41:41 +01:00
border: 1px solid var(--sidebar-border);
2023-03-09 14:19:43 +01:00
border-left: 0;
2023-03-09 20:47:10 +01:00
@media (max-width: 1140px) {
2023-03-09 22:00:22 +01:00
overflow: unset;
border: 0;
position: unset;
height: 0;
padding: 0;
2023-03-09 18:16:35 +01:00
margin: 0;
2023-03-09 22:00:22 +01:00
background-color: transparent;
2023-03-09 17:02:06 +01:00
}
2023-03-16 16:41:50 +01:00
2023-03-16 18:59:31 +01:00
a {
&.hint-text {
position: relative;
2023-03-16 16:43:33 +01:00
2023-03-16 18:59:31 +01:00
&::before {
content: attr(data-title);
2023-03-16 21:50:11 +01:00
left: calc(100% + 0.5rem);
2023-03-16 18:59:31 +01:00
position: absolute;
top: 50%;
transform: translateY(-50%);
2023-03-16 21:50:11 +01:00
background-color: var(--sidebar-accent-3);
2023-03-16 18:59:31 +01:00
color: var(--text-accent-900);
padding: 0.2rem 0.5rem;
border-radius: 0.5rem;
pointer-events: none;
opacity: 0%;
transition: opacity 0.3s ease-in-out;
2023-03-16 21:50:11 +01:00
z-index: 201;
2023-03-16 18:59:31 +01:00
}
&::after {
content: "";
2023-03-16 21:50:11 +01:00
transform: translate(-50%, -50%) rotate(45deg);
transform-origin: center;
background-color: var(--sidebar-accent-3);
2023-03-16 18:59:31 +01:00
top: 50%;
2023-03-16 21:50:11 +01:00
height: 1.2rem;
width: 1.2rem;
z-index: 200;
border-radius: 0 0 0 0.5rem;
2023-03-16 18:59:31 +01:00
position: absolute;
2023-03-16 21:50:11 +01:00
left: calc(100% + 0.5rem);
2023-03-16 18:59:31 +01:00
pointer-events: none;
opacity: 0%;
transition: opacity 0.3s ease-in-out;
}
&:hover {
&::before, &::after {
opacity: 100%;
}
2023-03-16 16:41:50 +01:00
}
}
}
2022-11-28 18:33:52 +01:00
header {
text-align: center;
2022-12-24 14:59:52 +01:00
user-select: none;
2023-03-09 14:19:43 +01:00
padding: inherit;
2022-12-24 14:59:52 +01:00
#avatar {
2023-03-09 14:19:43 +01:00
border-radius: 300% 500% / 500% 300%;
2023-03-05 23:22:05 +01:00
max-width: 64px;
2023-03-09 22:00:22 +01:00
transition: 0.4s border-radius ease-in-out;
@media (max-width: 1140px) {
position: absolute;
top: 1rem;
left: 1rem;
}
2023-01-12 23:22:05 +01:00
&:hover {
2023-03-09 14:19:43 +01:00
border-radius: 500% 300% / 300% 500%;
2023-01-12 23:22:05 +01:00
}
2022-12-24 14:59:52 +01:00
}
2022-11-28 18:33:52 +01:00
}
#sidebar-menu {
2022-12-24 14:59:52 +01:00
user-select: none;
2023-03-05 23:22:05 +01:00
text-align: center;
2023-03-09 22:00:22 +01:00
@media (max-width: 1140px) {
position: fixed;
width: 100vw;
background-color: var(--sidebar-background);
height: 5rem;
left: 0;
bottom: 0;
padding: 0.4rem;
border: 1px solid var(--sidebar-border);
border-bottom: 0;
}
2022-11-28 18:33:52 +01:00
ul {
list-style: none;
padding: 0;
margin: 0;
2023-03-09 20:47:10 +01:00
@media (max-width: 1140px) {
2023-03-09 17:02:06 +01:00
display: flex;
flex-direction: row;
2023-03-09 22:00:22 +01:00
justify-content: center;
2023-03-09 17:02:06 +01:00
height: 100%;
}
2022-11-28 18:33:52 +01:00
}
li {
2023-03-09 18:16:35 +01:00
border-radius: 0.5rem;
2023-03-09 14:19:43 +01:00
margin: 0.5em 0;
2022-11-28 18:33:52 +01:00
position: relative;
2023-03-09 22:00:22 +01:00
letter-spacing: 0.025rem;
2023-03-09 14:19:43 +01:00
aspect-ratio: 1 / 1;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s linear;
2023-03-09 20:47:10 +01:00
@media (max-width: 1140px) {
2023-03-09 17:02:06 +01:00
margin: 0 0.5rem;
}
2022-11-28 18:33:52 +01:00
a {
2023-03-16 21:50:11 +01:00
overflow: visible;
display: flex;
align-items: center;
width: 100%;
height: 100%;
2022-11-28 18:33:52 +01:00
}
2023-03-09 14:19:43 +01:00
&::after {
2023-03-09 17:02:06 +01:00
background-color: var(--sidebar-accent-1);
2022-11-28 18:33:52 +01:00
bottom: 0;
content: "";
2023-03-09 14:19:43 +01:00
height: 100%;
2022-11-28 18:33:52 +01:00
position: absolute;
2023-03-09 14:19:43 +01:00
left: -100%;
2022-11-28 18:33:52 +01:00
top: 0;
2023-03-09 14:19:43 +01:00
width: 100%;
2022-11-28 18:33:52 +01:00
z-index: -1;
2023-03-09 14:19:43 +01:00
opacity: 1;
opacity: 0.5;
2023-03-09 18:16:35 +01:00
transition: left 0.5s ease-out, opacity 0.5s ease-out, background-color 0.2s linear, top 0.5s ease-out;
2023-03-16 22:01:52 +01:00
border-radius: 0.5rem;
2023-03-09 20:47:10 +01:00
@media (max-width: 1140px) {
2023-03-09 18:16:35 +01:00
left: 0;
top: 100%;
}
2022-11-28 18:33:52 +01:00
}
&.active {
2023-03-09 17:02:06 +01:00
background-color: var(--sidebar-accent-1);
2023-03-09 14:19:43 +01:00
&:hover {
2023-03-09 17:02:06 +01:00
background-color: var(--sidebar-accent-2);
2023-03-09 15:41:41 +01:00
}
&:active {
2023-03-09 17:02:06 +01:00
background-color: var(--sidebar-accent-3);
2023-03-09 14:19:43 +01:00
}
2022-11-28 18:33:52 +01:00
}
&:hover {
2023-03-09 14:19:43 +01:00
&::after {
left: 0;
2022-11-28 18:33:52 +01:00
opacity: 1;
2023-03-09 20:47:10 +01:00
@media (max-width: 1140px) {
2023-03-09 18:16:35 +01:00
top: 0;
}
2023-03-09 14:19:43 +01:00
}
}
&:active {
&::after {
2023-03-09 17:02:06 +01:00
background-color: var(--sidebar-accent-2);
2022-11-28 18:33:52 +01:00
}
}
}
a {
text-decoration: none;
2023-03-16 18:59:31 +01:00
display: flex;
place-content: center;
svg {
height: 3rem;
width: 3rem;
fill: transparent;
stroke: var(--text-accent-300);
stroke-width: 20px;
}
2022-11-28 18:33:52 +01:00
}
}
2023-03-09 18:16:35 +01:00
aside {
#social-links {
text-align: center;
2023-03-09 22:00:22 +01:00
@media (max-width: 1140px) {
display: none;
}
2023-03-15 11:58:14 +01:00
a {
2023-03-09 20:47:10 +01:00
display: flex;
2023-03-15 11:58:14 +01:00
padding: 1rem;
place-content: center;
2023-03-16 16:41:50 +01:00
2023-03-15 11:58:14 +01:00
&:hover {
.mastodon-icon {
2023-03-09 18:16:35 +01:00
color: hsl(251.5, 58.9%, 51.4%);
}
2023-03-05 23:22:05 +01:00
}
2023-03-15 11:58:14 +01:00
.mastodon-icon {
color: hsl(239.6, 100%, 69.4%);
}
2023-03-16 16:41:50 +01:00
2023-03-15 11:58:14 +01:00
.icon {
height: 1.25rem;
width: 1.25rem;
transition: color 0.2s ease-in-out;
display: block;
}
2023-03-05 23:22:05 +01:00
}
}
2023-03-09 18:16:35 +01:00
#languages {
text-align: center;
transition: background-color 0.2s ease-in-out;
border-radius: 0.5rem 0.5rem 1.85rem 0.5rem;
2023-03-09 20:47:10 +01:00
@media (max-width: 1140px) {
2023-03-09 22:00:22 +01:00
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;
2023-03-09 20:47:10 +01:00
}
2022-12-24 14:59:52 +01:00
&:hover {
2023-03-09 18:16:35 +01:00
background-color: var(--sidebar-accent-1);
2023-03-09 22:00:22 +01:00
@media (max-width: 1140px) {
background-color: var(--sidebar-accent-2);
}
2022-12-24 14:59:52 +01:00
}
2023-03-09 18:16:35 +01:00
&:active {
background-color: var(--sidebar-accent-2);
2023-03-09 22:00:22 +01:00
@media (max-width: 1140px) {
background-color: var(--sidebar-accent-3);
}
2023-03-09 18:16:35 +01:00
}
#language {
display: block;
2022-12-24 14:59:52 +01:00
text-decoration: none;
2023-03-09 18:16:35 +01:00
width: 100%;
height: 100%;
2023-03-09 22:00:22 +01:00
padding: 1rem;
2022-12-24 14:59:52 +01:00
pointer-events: all;
}
}
}
2022-11-28 18:33:52 +01:00
}