From bfcaeed9e9cb7c6c91bdae83c4f62cca446b92d1 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 17 Mar 2024 14:11:31 +0000 Subject: feat(response): default css --- src/response.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/response.rs b/src/response.rs index 911880f..f7fbce3 100644 --- a/src/response.rs +++ b/src/response.rs @@ -21,6 +21,8 @@ use { std::{env::var, time::Instant}, }; +const CSS: &str = include_str!("../default.css"); + #[allow(clippy::unused_async, clippy::future_not_send, clippy::too_many_lines)] pub async fn default( req: actix_web::HttpRequest, @@ -158,6 +160,8 @@ For example: to proxy "gemini://fuwn.me/uptime", visit "/proxy/fuwn.me/uptime".< "", )); } + } else if !is_nocss { + html_context.push_str(&format!(r#""#)); } // Try to add an external favicon from the `FAVICON_EXTERNAL` environment -- cgit v1.2.3