mirror of
https://gitlab.com/Anson-Projects/zine.git
synced 2025-06-15 21:26:38 +00:00
add basic date
This commit is contained in:
parent
4252550fdd
commit
fc8ddcb3d2
10
src/main.rs
10
src/main.rs
@ -1,7 +1,10 @@
|
|||||||
|
extern crate chrono;
|
||||||
extern crate feed_rs;
|
extern crate feed_rs;
|
||||||
extern crate maud;
|
extern crate maud;
|
||||||
extern crate reqwest;
|
extern crate reqwest;
|
||||||
|
|
||||||
|
use chrono::DateTime;
|
||||||
|
use chrono::Utc;
|
||||||
use feed_rs::model::Entry;
|
use feed_rs::model::Entry;
|
||||||
use feed_rs::parser;
|
use feed_rs::parser;
|
||||||
use maud::{html, Markup};
|
use maud::{html, Markup};
|
||||||
@ -220,18 +223,23 @@ fn about_modal(entries: Vec<Entry>) -> Markup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn generate_footer() -> 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! {
|
html! {
|
||||||
footer class="container" {
|
footer class="container" {
|
||||||
small {
|
small {
|
||||||
p {
|
p {
|
||||||
a href="https://ansonbiggs.com" { "Anson Biggs" }
|
a href="https://ansonbiggs.com" { "Anson Biggs" }
|
||||||
" - 2024 - "
|
" - "
|
||||||
a href="https://gitlab.com/MisterBiggs/zine" { "Source Code" }
|
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>> {
|
fn group_by_nth<T: Clone>(slice: &[T], n: usize) -> Vec<Vec<T>> {
|
||||||
(0..n)
|
(0..n)
|
||||||
.map(|i| {
|
.map(|i| {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user