From 9565088365b6094c235e3f7862add1d3da84fd1a Mon Sep 17 00:00:00 2001 From: Fuwn Date: Wed, 14 Jan 2026 02:54:51 -0800 Subject: feat: Template footer year --- src/response.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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> = 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(), ) -- cgit v1.2.3