1
0
mirror of https://gitlab.com/Anson-Projects/anson-stuff/zinetest.git synced 2025-06-15 13:36:39 +00:00

add basic date

This commit is contained in:
Anson Biggs 2024-02-22 23:05:21 -07:00
parent 4252550fdd
commit fc8ddcb3d2

View File

@ -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<Entry>) -> Markup {
}
fn generate_footer() -> Markup {
let utc: DateTime<Utc> = 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<T: Clone>(slice: &[T], n: usize) -> Vec<Vec<T>> {
(0..n)
.map(|i| {