create & use logo

This commit is contained in:
2026-08-08 14:11:39 -04:00
parent f24d8aa062
commit 8bb0471a71
8 changed files with 157 additions and 4 deletions
+5 -2
View File
@@ -342,8 +342,11 @@ async fn static_asset(Path(path): Path<String>) -> Response {
let Some(asset) = assets::STORE.get(&path) else {
return StatusCode::NOT_FOUND.into_response();
};
let mime = match path.as_str() {
"style.css" => "text/css",
let mime = match path.rsplit('.').next() {
Some("css") => "text/css",
Some("ico") => "image/x-icon",
Some("png") => "image/png",
Some("svg") => "image/svg+xml",
_ => "application/javascript",
};
let mut response = ([(header::CONTENT_TYPE, mime)], asset.data).into_response();