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 | fc1d82631db3e78a965b1b8e6905c7d222f22ad9 (patch) | |
| tree | 17207b1b24ab9b689e2e170fb97e66c1ec093d4c /src | |
| parent | docs(readme): add example usage (diff) | |
| download | september-fc1d82631db3e78a965b1b8e6905c7d222f22ad9.tar.xz september-fc1d82631db3e78a965b1b8e6905c7d222f22ad9.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 |