CreatorCenter_OOIN/src/styles/sidebar.scss

143 lines
3.1 KiB
SCSS
Raw Normal View History

2025-05-09 07:03:19 +08:00
@import 'custom-theme.scss';
.sidebar {
width: 220px;
min-height: 100vh;
position: fixed;
left: 0;
top: 0;
bottom: 0;
box-shadow: none;
z-index: 1000;
transition: all 0.3s ease;
overflow-y: auto;
background: $violet-50;
.sidebar-header {
}
.sidebar-nav {
padding: 1rem 0;
.nav-link {
padding: 0.75rem 1rem;
color: $zinc-600; // neutral-600
font-size: 1rem;
border-radius: 0;
display: flex;
align-items: center;
text-decoration: none;
font-weight: 500;
&:hover {
text-decoration: none;
color: var(--bs-primary);
background-color: rgba(var(--bs-primary-rgb), 0.05);
}
&.active {
color: var(--bs-primary);
font-weight: 600;
border-left: 4px solid var(--bs-primary);
}
.sidebar-icon {
display: flex;
align-items: center;
justify-content: center;
}
}
}
.sidebar-accordion {
width: 100%;
.accordion-item {
background-color: transparent;
}
.accordion-header {
.accordion-button {
padding: 0.75rem 1rem;
background-color: transparent;
color: $zinc-600; // neutral-600
font-size: 1rem;
box-shadow: none;
font-weight: 500;
&:not(.collapsed) {
color: var(--bs-primary);
background-color: rgba(var(--bs-primary-rgb), 0.05);
font-weight: 500;
}
&:hover {
color: var(--bs-primary);
background-color: rgba(var(--bs-primary-rgb), 0.05);
}
&:focus {
box-shadow: none;
border-color: transparent;
}
&::after {
width: 1rem;
height: 1rem;
background-size: 1rem;
}
&.active {
font-weight: 600;
color: var(--bs-primary);
}
}
}
.sidebar-submenu {
.nav-link {
padding: 0.5rem 1rem;
padding-left: 2rem;
}
}
}
}
// Adjust main content when sidebar is present
.main-content {
2025-05-09 09:22:14 +08:00
padding: 1.5rem;
2025-05-09 07:03:19 +08:00
margin: 1rem;
margin-left: 220px;
height: 100vh;
transition: all 0.3s ease;
background: #f8f9fa;
border-radius: 8px;
}
// Responsive sidebar for mobile
@media (max-width: 768px) {
.sidebar {
width: 0;
overflow: hidden;
&.show {
width: 250px;
}
}
.main-content {
margin-left: 0;
}
}
// Toggle button for mobile
.sidebar-toggle {
position: fixed;
top: 1rem;
left: 1rem;
z-index: 1100;
display: none;
@media (max-width: 768px) {
display: block;
}
}