diff options
| author | Fuwn <[email protected]> | 2026-01-14 02:54:51 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-01-14 02:54:51 -0800 |
| commit | 9565088365b6094c235e3f7862add1d3da84fd1a (patch) | |
| tree | 3c607be598f28ec9317992f8a20c7c943960c100 | |
| parent | fix: Various optimisations (diff) | |
| download | locus-9565088365b6094c235e3f7862add1d3da84fd1a.tar.xz locus-9565088365b6094c235e3f7862add1d3da84fd1a.zip | |
feat: Template footer year
| -rw-r--r-- | content/templates/partials/footer.hbs | 2 | ||||
| -rw-r--r-- | src/response.rs | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/content/templates/partials/footer.hbs b/content/templates/partials/footer.hbs index a178e94..4ed53e1 100644 --- a/content/templates/partials/footer.hbs +++ b/content/templates/partials/footer.hbs @@ -20,6 +20,6 @@ => http://fuwnme4wbs5x36jjf2usedw2zscozwhazykhyfkjsmudtb7egs3mb7yd.onion Onion Service (Tor) => http://fuwn.i2p/?i2paddresshelper=umaux4l3q3j33pfsz3mzxk6o5c7f6lu47wln5vo5nqvv5nyufgra.b32.i2p Eepsite (I2P) -Copyright (c) 2021-2025 Fuwn. All rights reserved. +Copyright (c) 2021-{{{ year }}} Fuwn. All rights reserved. > Any and all opinions listed here are my own and not representative of my employers; past, present, and future. diff --git a/src/response.rs b/src/response.rs index 9c1cc69..8851b18 100644 --- a/src/response.rs +++ b/src/response.rs @@ -1,4 +1,4 @@ -use {std::sync::LazyLock, windmark::response::Response}; +use {chrono::Datelike, std::sync::LazyLock, windmark::response::Response}; static QUOTES: LazyLock<Vec<String>> = LazyLock::new(|| { serde_json::from_str(include_str!("../content/json/quotes.json")).unwrap() @@ -14,6 +14,7 @@ struct Main<'a> { pub commit: &'a str, pub mini_commit: &'a str, pub header_image: &'a str, + pub year: i32, } pub fn success( @@ -32,6 +33,7 @@ pub fn success( commit: &format!("/tree/{}", env!("VERGEN_GIT_SHA")), mini_commit: env!("VERGEN_GIT_SHA").get(0..5).unwrap_or("UNKNOWN"), header_image: &std::env::var("HEADER_IMAGE").unwrap_or_else(|_| "https://is1-ssl.mzstatic.com/image/thumb/Music112/v4/27/8b/e1/278be12a-185e-2b65-aa68-7e7e98b140f7/859754679778_cover.jpg/316x316bb.webp".to_string()), + year: chrono::Utc::now().year(), } .to_string(), ) |