171 lines
3.1 KiB
SCSS
171 lines
3.1 KiB
SCSS
.sidebar {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 240px;
|
|
height: 100vh;
|
|
background-color: var(--background-primary);
|
|
color: white;
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 16px;
|
|
z-index: 1100;
|
|
border-right: 1px solid #835454;
|
|
transition: transform 0.3s ease-in-out;
|
|
overflow: hidden;
|
|
|
|
.sidebar__submenu {
|
|
overflow: hidden;
|
|
max-height: 200px;
|
|
transition: max-height 0.3s ease-in-out;
|
|
overflow-y: auto;
|
|
&:hover {
|
|
max-height: 300px;
|
|
}
|
|
}
|
|
|
|
&--collapsed {
|
|
transform: translateX(-210px); // Hide 90% (210px out of 240px)
|
|
.sidebar__header,
|
|
.sidebar__dropdown-button,
|
|
.sidebar__submenu,
|
|
a {
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
}
|
|
|
|
&__toggle-button {
|
|
position: absolute;
|
|
top: 12px;
|
|
right: 0;
|
|
background: var(--background-primary);
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
color: white;
|
|
cursor: pointer;
|
|
padding: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 50% 0 0 50%;
|
|
transition: all 0.2s ease;
|
|
z-index: 1101;
|
|
width: 36px;
|
|
height: 36px;
|
|
border-left: 1px solid #333;
|
|
|
|
&:hover {
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
svg {
|
|
font-size: 20px;
|
|
}
|
|
}
|
|
|
|
&--collapsed &__toggle-button {
|
|
border-radius: 50%;
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
border-left: 1px solid #333;
|
|
}
|
|
|
|
&__header {
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
margin-bottom: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
color: white;
|
|
|
|
&__icon-spacing {
|
|
margin-left: 8px;
|
|
}
|
|
}
|
|
|
|
&__dropdown-button {
|
|
padding: 10px 0;
|
|
background: none;
|
|
border: none;
|
|
color: white;
|
|
font-size: 16px;
|
|
text-align: left;
|
|
display: flex;
|
|
align-items: center;
|
|
width: 100%;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s ease;
|
|
|
|
&:hover {
|
|
background-color: rgba(255, 255, 255, 0.08);
|
|
}
|
|
|
|
svg {
|
|
margin-right: 10px;
|
|
}
|
|
|
|
.sidebar__arrow {
|
|
margin-left: auto;
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
|
|
&__submenu {
|
|
margin-left: 28px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
border-left: 2px solid rgba(255, 255, 255, 0.1);
|
|
padding-left: 8px;
|
|
|
|
a {
|
|
color: white;
|
|
padding: 8px 0;
|
|
font-size: 14px;
|
|
text-decoration: none;
|
|
transition: color 0.2s ease;
|
|
|
|
&:hover {
|
|
color: var(--primary-color);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Mobile responsiveness
|
|
@media (max-width: 768px) {
|
|
z-index: 1101;
|
|
}
|
|
}
|
|
|
|
// Sidebar overlay for mobile
|
|
.sidebar-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
z-index: 1100;
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
pointer-events: none;
|
|
transition:
|
|
opacity 0.3s ease-in-out,
|
|
visibility 0.3s ease-in-out;
|
|
|
|
&--visible {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
pointer-events: all;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
/* Track (background behind the thumb) */
|
|
.scrollable-div::-webkit-scrollbar-track {
|
|
background: #f0f0f0;
|
|
border-radius: 5px;
|
|
}
|