feat: redesign the timeline as day columns with a bar per placement

This commit is contained in:
fromme committed 2026-11-12 11:14:25 +01:00
1 parent 4e50f23558
commit e976342c09
8 files changed
+413 -190

No files matched your search

+54 -2
View File
@@ -1,4 +1,56 @@
.scroll-container {
/*
* The timeline (administrative/assignment/timeline.html.twig): one grid per house with a fixed
* house column and one column per day. The header, the background and every house share the
* column template, so their columns line up; --timeline-days is set on .timeline.
*/
.timeline {
--timeline-label: 11rem;
--timeline-day: 1.75rem;
@apply overflow-auto;
max-height: calc(100vh - 320px);
max-height: calc(100vh - 260px);
}
.timeline-grid {
display: grid;
grid-template-columns: var(--timeline-label) repeat(var(--timeline-days), var(--timeline-day));
}
.timeline-background {
@apply pointer-events-none absolute inset-0;
grid-template-rows: 100%;
}
.timeline-header {
@apply sticky top-0 z-20 border-b-2 border-brand bg-white;
}
.timeline-corner {
@apply sticky left-0 z-10 border-r border-line bg-white;
}
.timeline-house {
@apply relative border-b border-line py-1;
grid-auto-rows: 1.75rem;
}
.timeline-house-label {
@apply sticky left-0 z-10 -my-1 border-r border-line bg-white px-3 py-2;
}
.timeline-bar {
@apply relative z-[1] mx-px my-0.5 flex min-w-0 items-center gap-x-1 overflow-hidden whitespace-nowrap px-1.5 text-xs leading-none;
}
/* the states differ in shape too, not only in colour: dashed, outlined, filled */
.timeline-bar--open {
@apply border border-dashed border-muted bg-white text-muted;
}
.timeline-bar--pending {
@apply border border-brand bg-brand-light text-brand-dark;
}
.timeline-bar--staffed {
@apply border border-emerald-800 bg-emerald-700 text-white;
}