Files
Oxicloud/static/css/layout/sidebar.css
T

259 lines
5.9 KiB
CSS
Raw Normal View History

/* Sidebar */
.sidebar {
width: var(--sidebar-width);
background: linear-gradient(180deg, var(--color-sidebar-bg-from) 0%, var(--color-sidebar-bg-to) 100%);
color: var(--color-sidebar-text-active);
2026-04-07 22:48:59 +02:00
display: flex;
flex-direction: column;
height: 100%;
flex-shrink: 0;
box-shadow: 2px 0 12px var(--color-shadow-md);
transition: transform var(--motion-slow) var(--ease-emphasized);
}
/* Sidebar overlay for mobile */
.sidebar-overlay {
2026-04-07 22:48:59 +02:00
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: var(--color-sidebar-overlay);
2026-04-07 22:48:59 +02:00
z-index: 998;
opacity: 0;
transition: opacity 0.3s ease;
}
.sidebar-overlay.active {
2026-04-07 22:48:59 +02:00
display: block;
opacity: 1;
}
/* Mobile responsive styles */
@media (max-width: 768px) {
2026-04-07 22:48:59 +02:00
.sidebar {
position: fixed;
left: 0;
top: 0;
z-index: 999;
transform: translateX(-100%);
}
2026-04-07 22:48:59 +02:00
.sidebar.open {
transform: translateX(0);
}
2026-04-07 22:48:59 +02:00
[dir="rtl"] .sidebar {
left: auto;
right: 0;
transform: translateX(100%);
}
2026-04-07 22:48:59 +02:00
[dir="rtl"] .sidebar.open {
transform: translateX(0);
}
}
.logo-container {
padding: 22px var(--space-5);
2026-04-07 22:48:59 +02:00
display: flex;
align-items: center;
border-bottom: 1px solid var(--color-sidebar-separator);
margin-bottom: var(--space-2);
2026-04-07 22:48:59 +02:00
text-decoration: none;
color: inherit;
}
.logo {
2026-04-07 22:48:59 +02:00
width: 40px;
height: 40px;
background: var(--color-sidebar-logo-gradient);
border-radius: var(--radius-2xl);
2026-04-07 22:48:59 +02:00
display: flex;
align-items: center;
justify-content: center;
margin-right: var(--space-3);
box-shadow: 0 3px 10px var(--color-sidebar-shadow);
2026-04-07 22:48:59 +02:00
transition:
transform 0.2s,
box-shadow 0.2s;
[dir="rtl"] & {
margin-left: var(--space-3);
2026-04-07 22:48:59 +02:00
margin-right: unset;
}
}
.logo:hover {
2026-04-07 22:48:59 +02:00
transform: scale(1.05);
box-shadow: 0 4px 14px var(--color-sidebar-shadow-lg);
}
.logo svg {
2026-04-07 22:48:59 +02:00
width: 22px;
height: 22px;
fill: var(--color-sidebar-text-active);
}
.app-name {
2026-04-07 22:48:59 +02:00
font-size: 19px;
font-weight: var(--weight-bold);
color: var(--color-sidebar-text-active);
2026-04-07 22:48:59 +02:00
letter-spacing: 0.3px;
}
.nav-menu {
2026-04-07 22:48:59 +02:00
display: flex;
flex-direction: column;
flex-grow: 1;
padding: var(--space-2) var(--space-3);
gap: var(--space-0-5);
}
.nav-item {
2026-04-07 22:48:59 +02:00
display: flex;
align-items: center;
width: 100%;
padding: 11px var(--space-3-5);
border-radius: var(--radius-xl);
2026-04-07 22:48:59 +02:00
cursor: pointer;
color: var(--color-sidebar-text);
2026-04-07 22:48:59 +02:00
font-size: 14.5px;
font-weight: var(--weight-medium);
/* Button resets — .nav-item is a <button> (keyboard-operable nav). */
font-family: inherit;
text-align: left;
appearance: none;
background: none;
2026-04-07 22:48:59 +02:00
transition: all 0.2s ease;
position: relative;
border: none;
2026-04-07 22:48:59 +02:00
border-left: 3px solid transparent;
[dir="rtl"] & {
border-left: none;
border-right: 3px solid transparent;
}
}
.nav-item:hover {
background-color: var(--color-sidebar-hover-bg);
color: var(--color-sidebar-text-hover);
}
.nav-item.active {
background-color: var(--color-sidebar-active-bg);
color: var(--color-sidebar-text-active);
border-left-color: var(--color-accent);
font-weight: var(--weight-semibold);
2026-04-07 22:48:59 +02:00
[dir="rtl"] & {
border-left-color: transparent;
border-right-color: var(--color-accent);
2026-04-07 22:48:59 +02:00
}
}
.nav-item i,
2026-04-08 15:14:03 +03:00
.nav-item .nav-icon,
.nav-item .oxi-icon {
margin-right: var(--space-3-5);
2026-04-07 22:48:59 +02:00
width: 20px;
height: 20px;
text-align: center;
font-size: var(--text-md);
2026-04-07 22:48:59 +02:00
transition:
color 0.2s,
transform 0.2s;
flex-shrink: 0;
2026-04-07 22:48:59 +02:00
[dir="rtl"] & {
margin-left: var(--space-3-5);
2026-04-07 22:48:59 +02:00
margin-right: unset;
}
}
/* Colored icons per section */
2026-04-07 22:48:59 +02:00
.nav-item:nth-child(1) i,
.nav-item:nth-child(1) .oxi-icon {
color: var(--color-cal-1);
2026-04-07 22:48:59 +02:00
} /* Files - orange */
.nav-item:nth-child(2) i,
.nav-item:nth-child(2) .oxi-icon {
color: var(--color-cal-2);
2026-04-07 22:48:59 +02:00
} /* Shared - blue */
.nav-item:nth-child(3) i,
.nav-item:nth-child(3) .oxi-icon {
color: var(--color-cal-3);
2026-04-07 22:48:59 +02:00
} /* Recent - teal */
.nav-item:nth-child(4) i,
.nav-item:nth-child(4) .oxi-icon {
color: var(--color-cal-4);
2026-04-07 22:48:59 +02:00
} /* Favorites - gold */
.nav-item:nth-child(5) i,
.nav-item:nth-child(5) .oxi-icon {
color: var(--color-cal-5);
2026-04-07 22:48:59 +02:00
} /* Photos - pink */
.nav-item:nth-child(6) i,
.nav-item:nth-child(6) .oxi-icon {
color: var(--color-cal-6);
2026-04-07 22:48:59 +02:00
} /* Trash - red */
/* Colourful icons at rest, but the ACTIVE item is always accent — one
coherent active state instead of a colour that changes per item.
Same specificity as the per-child rest rules, so source order (this comes
after them) makes it win for the active item. */
.nav-item.active i,
.nav-item.active .oxi-icon {
color: var(--color-accent);
2026-04-07 22:48:59 +02:00
}
.nav-item:hover i,
.nav-item:hover .oxi-icon {
2026-04-07 22:48:59 +02:00
transform: scale(1.1);
}
/* Storage indicator */
.storage-container {
margin: auto var(--space-3) var(--space-4) var(--space-3);
background: var(--color-sidebar-storage-bg);
border: 1px solid var(--color-sidebar-storage-border);
border-radius: var(--radius-2xl);
padding: var(--space-4);
}
.storage-title {
2026-04-07 22:48:59 +02:00
display: flex;
align-items: center;
justify-content: center;
gap: var(--space-1-5);
margin-bottom: var(--space-3);
font-size: var(--text-sm);
font-weight: var(--weight-semibold);
color: var(--color-sidebar-storage-text);
2026-04-07 22:48:59 +02:00
letter-spacing: 0.3px;
}
.storage-bar {
2026-04-07 22:48:59 +02:00
height: 6px;
background-color: var(--color-sidebar-storage-bar);
2026-04-07 22:48:59 +02:00
border-radius: 3px;
overflow: hidden;
margin-bottom: var(--space-2-5);
}
.storage-fill {
2026-04-07 22:48:59 +02:00
height: 100%;
background: var(--color-sidebar-progress);
2026-04-07 22:48:59 +02:00
border-radius: 3px;
width: 0%;
transition: width 0.8s ease;
}
.storage-info {
2026-04-07 22:48:59 +02:00
text-align: center;
font-size: 11.5px;
color: var(--color-sidebar-storage-faint);
font-weight: var(--weight-normal);
}