From fe929850c956208248a46f81e0408e072bb94161 Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Wed, 20 Nov 2024 20:47:42 +0100 Subject: page: Add NEW-marker to new items --- feeds/src/pagegen.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/feeds/src/pagegen.rs b/feeds/src/pagegen.rs index 0dab168..2becbde 100644 --- a/feeds/src/pagegen.rs +++ b/feeds/src/pagegen.rs @@ -140,6 +140,7 @@ async fn gen_item_list( } else { format!("{} - ", escape(&item.author, 32)) }; + let new_marker = if item.seen { "" } else { "(NEW) " }; let timestring = item.published.format("%Y-%m-%d %H:%M:%S"); let mut history = String::new(); if count > 1 { @@ -151,7 +152,7 @@ async fn gen_item_list( ln!(b, r#" {author}{title}"#)?; ln!(b, r#" {history}"#)?; ln!(b, r#"
"#)?; - ln!(b, r#"
{timestring}
"#)?; + ln!(b, r#"
{new_marker}{timestring}
"#)?; ln!(b, r#"
"#)?; ln!(b, r#"
{summary}
"#)?; ln!(b, r#" "#)?; -- cgit v1.2.3