diff options
| author | Fuwn <[email protected]> | 2024-03-17 14:11:31 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-03-17 14:11:31 +0000 |
| commit | bfcaeed9e9cb7c6c91bdae83c4f62cca446b92d1 (patch) | |
| tree | 2a4545cbfb44143115a3cba67358ce8f085c8190 /src | |
| parent | docs(readme): add example usage (diff) | |
| download | september-bfcaeed9e9cb7c6c91bdae83c4f62cca446b92d1.tar.xz september-bfcaeed9e9cb7c6c91bdae83c4f62cca446b92d1.zip | |
feat(response): default css
Diffstat (limited to 'src')
| -rw-r--r-- | src/response.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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".< "<link rel=\"stylesheet\" type=\"text/css\" href=\"{stylesheet}\">", )); } + } else if !is_nocss { + html_context.push_str(&format!(r#"<link rel="stylesheet" href="https://latex.now.sh/style.css"><style>{CSS}</style>"#)); } // Try to add an external favicon from the `FAVICON_EXTERNAL` environment |