diff --git a/src/app.rs b/src/app.rs index 0577674..913687a 100644 --- a/src/app.rs +++ b/src/app.rs @@ -34,6 +34,7 @@ struct IndexTemplate<'a> { rss: bool, df: &'a DateFormat, js: bool, + color: Option<&'a str>, } #[derive(Template)] @@ -70,6 +71,7 @@ async fn index<'a>( rss: config.rss.enable, df: &config.date_format, js: config.js_enable, + color: config.default_color.as_deref(), } .into_response()) } diff --git a/templates/index.html b/templates/index.html index 7e6291a..85d6b21 100644 --- a/templates/index.html +++ b/templates/index.html @@ -7,11 +7,16 @@ + {% match color %} {% when Some with (color) %} + + {% when None %} {% endmatch %}