diff --git a/src/domain/brews.rs b/src/domain/brews.rs index 1f7a47f..1b38f0b 100644 --- a/src/domain/brews.rs +++ b/src/domain/brews.rs @@ -118,13 +118,13 @@ impl BrewWithDetails { TimelineEventDetail { label: "Water".to_string(), value: format!( - "{}ml @ {:.1}\u{00B0}C", + "{}ml \u{00B7} {:.1}\u{00B0}C", self.brew.water_volume, self.brew.water_temp ), }, TimelineEventDetail { label: "Grinder".to_string(), - value: format!("{} @ {:.1}", self.grinder_name, self.brew.grind_setting), + value: format!("{} \u{00B7} {:.1}", self.grinder_name, self.brew.grind_setting), }, TimelineEventDetail { label: "Brewer".to_string(), diff --git a/static/css/input.css b/static/css/input.css index 9ceceba..0a64556 100644 --- a/static/css/input.css +++ b/static/css/input.css @@ -382,6 +382,20 @@ a { display: block; } +/* ── Timeline card expand/collapse ────────────────────────────── */ +/* Cards start collapsed; data-show toggles condensed vs detail content */ + +.tl-card { + cursor: pointer; +} + +@media (max-width: 767px) { + /* Tighter spacing for condensed cards on mobile */ + .timeline-item { + margin-bottom: 1rem; + } +} + /* ── Data page ─────────────────────────────────────────────────── */ /* Hide duplicate search inside data page - search is in the tab bar */ diff --git a/templates/pages/timeline.html b/templates/pages/timeline.html index 4a27eb5..abb17ab 100644 --- a/templates/pages/timeline.html +++ b/templates/pages/timeline.html @@ -2,6 +2,7 @@
{% if months.is_empty() %} diff --git a/templates/partials/timeline_month.html b/templates/partials/timeline_month.html index 0f0ea96..95fe697 100644 --- a/templates/partials/timeline_month.html +++ b/templates/partials/timeline_month.html @@ -12,23 +12,41 @@ class="timeline-node absolute h-5 w-5 rounded-full border-[3px] border-accent bg-page" aria-hidden="true" > -
+
- {{ event.kind_label }} - + {# Category — always visible #} + + {{ event.kind_label }} + {# Relative date — shown when collapsed #} + · {{ event.relative_date_label }} + {# Full timestamp — shown when expanded #} + + + {# Expand/collapse chevron #} + + {{ icons::chevron_down("h-4 w-4") }} + +

{{ event.title }} + {# External link — shown when expanded #} {% if let Some(url) = event.external_link %} {% endif %} - {% if is_authenticated %} - {% if let Some(brew) = event.brew_data %} -
- - - - - - {% if let Some(fp_id) = brew.filter_paper_id %} - - {% endif %} - - - -
- {% endif %} - {% endif %}

+ {# Subtitle — shown when collapsed #} + {% if let Some(sub) = event.subtitle %} +

{{ sub }}

+ {% endif %} + {# Detail rows — shown when expanded #} {% if event.details.len() > 0 %} -
+