2 次代碼提交 07944ea3c2 ... fe929850c9

作者 SHA1 備註 提交日期
  Michael Buesch fe929850c9 page: Add NEW-marker to new items 1 周之前
  Michael Buesch ee36d7640d Update dependencies 1 周之前
共有 2 個文件被更改,包括 14 次插入13 次删除
  1. 12 12
      Cargo.lock
  2. 2 1
      feeds/src/pagegen.rs

+ 12 - 12
Cargo.lock

@@ -511,9 +511,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
 
 [[package]]
 name = "h2"
-version = "0.4.6"
+version = "0.4.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205"
+checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e"
 dependencies = [
  "atomic-waker",
  "bytes",
@@ -621,9 +621,9 @@ checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946"
 
 [[package]]
 name = "hyper"
-version = "1.5.0"
+version = "1.5.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a"
+checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f"
 dependencies = [
  "bytes",
  "futures-channel",
@@ -865,9 +865,9 @@ dependencies = [
 
 [[package]]
 name = "itoa"
-version = "1.0.11"
+version = "1.0.13"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
+checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2"
 
 [[package]]
 name = "jobserver"
@@ -1066,9 +1066,9 @@ dependencies = [
 
 [[package]]
 name = "quick-xml"
-version = "0.37.0"
+version = "0.37.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffbfb3ddf5364c9cfcd65549a1e7b801d0e8d1b14c1a1590a6408aa93cfbfa84"
+checksum = "f22f29bdff3987b4d8632ef95fd6424ec7e4e0a57e2f4fc63e489e75357f6a03"
 dependencies = [
  "encoding_rs",
  "memchr",
@@ -1467,9 +1467,9 @@ dependencies = [
 
 [[package]]
 name = "sync_wrapper"
-version = "1.0.1"
+version = "1.0.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394"
+checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
 dependencies = [
  "futures-core",
 ]
@@ -1641,9 +1641,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
 
 [[package]]
 name = "unicode-ident"
-version = "1.0.13"
+version = "1.0.14"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
+checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
 
 [[package]]
 name = "untrusted"

+ 2 - 1
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#"    <a class="title" href="{link}">{author}{title}</a>"#)?;
         ln!(b, r#"    {history}"#)?;
         ln!(b, r#"    <br />"#)?;
-        ln!(b, r#"    <div class="date">{timestring}</div>"#)?;
+        ln!(b, r#"    <div class="date">{new_marker}{timestring}</div>"#)?;
         ln!(b, r#"    <br />"#)?;
         ln!(b, r#"    <div class="summary">{summary}</div>"#)?;
         ln!(b, r#"  </div>"#)?;