From f9bc80cc800eb98cf3e836e01d2b535478d2c82c Mon Sep 17 00:00:00 2001 From: insects Date: Fri, 7 Feb 2025 15:13:35 +0100 Subject: [PATCH] also show subsequent window on up fish --- src/templates.rs | 9 +++++++++ static/style.css | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/templates.rs b/src/templates.rs index 3d9f20f..5791967 100644 --- a/src/templates.rs +++ b/src/templates.rs @@ -89,6 +89,15 @@ pub fn main_page( (clock::to_earth_time(window.start_time + window.duration).format("%c %Z")) } } + + @if let Some(window2) = fish.windows.get(1) { + .date.tiny data-ts=(clock::to_earth_time(window2.start_time).timestamp_millis()) { + "next: " + .inner id=(format!("nextwindow-{}", fish.entry.id)) hx-preserve { + (clock::to_earth_time(window2.start_time).format("%c %Z")) + } + } + } } @else { .date data-ts=(clock::to_earth_time(window.start_time).timestamp_millis()) { .inner id=(format!("date-{}", fish.entry.id)) hx-preserve { diff --git a/static/style.css b/static/style.css index 2877e96..cac2da3 100644 --- a/static/style.css +++ b/static/style.css @@ -55,6 +55,18 @@ select { .when .date { color: gray; font-size: 14px; + display: inline-block; +} + +.date.tiny { + font-size: 12px; + display: block; + margin-left: 5px; + color: #aaa; +} + +.date .inner { + display: inline-block; } section.up {