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 {