diff --git a/assets/favicon.png b/assets/favicon.png deleted file mode 100644 index a57c480..0000000 Binary files a/assets/favicon.png and /dev/null differ diff --git a/assets/logo.svg b/assets/logo.svg new file mode 100644 index 0000000..9c0616f --- /dev/null +++ b/assets/logo.svg @@ -0,0 +1,59 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/src/server/assets.rs b/src/server/assets.rs index 0959c4e..84f59b3 100644 --- a/src/server/assets.rs +++ b/src/server/assets.rs @@ -1,2 +1,2 @@ pub static STATIC_STYLE_CSS: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/style.css")); -pub static STATIC_FAVICON_PNG: &[u8] = include_bytes!("../../assets/favicon.png"); +pub static STATIC_FAVICON: &[u8] = include_bytes!("../../assets/logo.svg"); diff --git a/src/server/mod.rs b/src/server/mod.rs index 724f6e7..ccc81b5 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -52,7 +52,7 @@ impl App { router.add("/", Route::Index); router.add("/static/style.css", Route::Static(StaticFile::StyleCss)); - router.add("/static/favicon.png", Route::Static(StaticFile::FaviconPng)); + router.add("/static/logo.svg", Route::Static(StaticFile::FaviconPng)); router.add( "/repo/:site/:qual/:name", @@ -345,8 +345,8 @@ impl App { .body(Body::from(assets::STATIC_STYLE_CSS)) .unwrap(), StaticFile::FaviconPng => Response::builder() - .header(CONTENT_TYPE, "image/png") - .body(Body::from(assets::STATIC_FAVICON_PNG)) + .header(CONTENT_TYPE, "image/svg+xml") + .body(Body::from(assets::STATIC_FAVICON)) .unwrap(), } } diff --git a/src/server/views/html/mod.rs b/src/server/views/html/mod.rs index b1afec1..7291953 100644 --- a/src/server/views/html/mod.rs +++ b/src/server/views/html/mod.rs @@ -17,7 +17,7 @@ fn render_html(title: &str, body: B) -> Response { meta charset="utf-8"; meta name="viewport" content="width=device-width, initial-scale=1"; title { (format!("{} - Deps.rs", title)) } - link rel="icon" type="image/png" href="/static/favicon.png"; + link rel="icon" type="image/svg+xml" href="/static/logo.svg"; link rel="stylesheet" type="text/css" href="/static/style.css"; link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Fira+Sans:400,500,600"; link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Source+Code+Pro";