From fc8ddcb3d20d24a8e04602ebd9be239b8e6122dc Mon Sep 17 00:00:00 2001 From: Anson Biggs Date: Thu, 22 Feb 2024 23:05:21 -0700 Subject: [PATCH] add basic date --- src/main.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 67fd242..f3bb34c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,10 @@ +extern crate chrono; extern crate feed_rs; extern crate maud; extern crate reqwest; +use chrono::DateTime; +use chrono::Utc; use feed_rs::model::Entry; use feed_rs::parser; use maud::{html, Markup}; @@ -220,18 +223,23 @@ fn about_modal(entries: Vec) -> Markup { } fn generate_footer() -> Markup { + let utc: DateTime = Utc::now(); + let formatted_utc = utc.format("%Y-%m-%d %H:%M:%S").to_string(); + html! { footer class="container" { small { p { a href="https://ansonbiggs.com" { "Anson Biggs" } - " - 2024 - " + " - " a href="https://gitlab.com/MisterBiggs/zine" { "Source Code" } + " - Page generated at: " (formatted_utc) " UTC" } } } } } + fn group_by_nth(slice: &[T], n: usize) -> Vec> { (0..n) .map(|i| {