Files
ImpTune/imptune/static/app.css
T
kawa 3353f4546c feat(11-03): Alpine.js theme + i18n stores in base.html with top-right controls
- Add Alpine.store('theme') for Light/Dark/System cycling with localStorage persistence
- Add Alpine.store('i18n') with FR/EN translations for all static UI strings
- Add topbar with theme toggle button (:aria-label, @click cycle) and lang button
- Wrap main content in .main-wrapper + .topbar for layout structure
- Add .main-wrapper, .topbar, .topbar-controls styles to app.css
- Add test_theme_toggle_present integration test
- Fix test_dashboard_shows_recent_printers assertion (string now in i18n JS too)
2026-04-15 11:08:52 +02:00

167 lines
2.9 KiB
CSS

/* ImpTune layout — supplements Pico CSS */
.layout {
display: flex;
min-height: 100vh;
align-items: stretch;
}
.layout > * {
box-sizing: border-box;
}
/* Sidebar — override Pico's default nav styling (which is horizontal flex) */
nav.sidebar {
width: 220px;
min-width: 220px;
max-width: 220px;
flex: 0 0 220px;
border-right: 1px solid var(--pico-muted-border-color, #e0e0e0);
padding: 1rem 0;
margin: 0;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: stretch;
overflow-x: hidden;
}
nav.sidebar ul,
nav.sidebar li {
margin: 0;
padding: 0;
list-style: none;
}
nav.sidebar ul {
display: block;
}
nav.sidebar li {
display: block;
}
.sidebar-brand {
padding: 0.5rem 1rem 1rem;
font-size: 1.1rem;
border-bottom: 1px solid var(--pico-muted-border-color, #e0e0e0);
margin-bottom: 0.5rem;
}
/* Override Pico's horizontal nav ul default */
.sidebar nav,
.sidebar-nav {
display: block;
}
.sidebar-nav {
list-style: none;
padding: 0;
margin: 0;
flex-direction: column;
}
.sidebar-nav li {
display: block;
margin: 0;
padding: 0;
width: 100%;
}
.sidebar-nav a {
display: block;
box-sizing: border-box;
width: 100%;
padding: 0.6rem 1rem;
margin: 0;
text-decoration: none;
color: inherit;
font-weight: 400;
line-height: 1.4;
border-left: 3px solid transparent;
}
.sidebar-nav a:hover {
background-color: var(--pico-secondary-background, rgba(0,0,0,0.05));
}
.sidebar-nav a.active {
font-weight: 600;
background-color: var(--pico-primary-background, rgba(0,0,0,0.08));
border-left-color: var(--pico-primary, #1a73e8);
}
/* Main wrapper: fills remaining space beside sidebar, stacks topbar + content */
.main-wrapper {
flex: 1 1 auto;
min-width: 0;
display: flex;
flex-direction: column;
}
/* Topbar: holds top-right controls */
.topbar {
display: flex;
justify-content: flex-end;
align-items: center;
padding: 0.5rem 1rem;
border-bottom: 1px solid var(--pico-muted-border-color, #e0e0e0);
gap: 0.5rem;
}
.topbar-controls {
display: flex;
gap: 0.5rem;
align-items: center;
}
.topbar-controls button {
padding: 0.3rem 0.6rem;
font-size: 0.85rem;
min-width: 2.2rem;
}
/* Main content */
.main-content {
flex: 1 1 auto;
min-width: 0;
padding: 1.5rem 2rem;
overflow-x: hidden;
overflow-y: auto;
}
/* Quick action buttons */
.quick-actions {
display: flex;
gap: 0.75rem;
margin-bottom: 1.5rem;
flex-wrap: wrap;
}
.btn-action {
display: inline-block;
padding: 0.5rem 1rem;
border: 1px solid var(--pico-primary, #1a73e8);
border-radius: 4px;
text-decoration: none;
color: var(--pico-primary, #1a73e8);
font-weight: 500;
}
.btn-action[aria-disabled="true"] {
opacity: 0.5;
cursor: not-allowed;
pointer-events: none;
}
/* Empty state */
.empty-state {
color: var(--pico-muted-color, #666);
font-style: italic;
}
/* Recent activity */
.activity-section {
margin-bottom: 1.5rem;
}