From dcd2e7a421478de5281fa51610d2cafbde9edca1 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Sun, 4 Oct 2020 21:28:01 +0200 Subject: [PATCH] New logo (#64) --- assets/favicon.png | Bin 1338 -> 0 bytes assets/logo.svg | 59 +++++++++++++++++++++++++++++++++++ src/server/assets.rs | 2 +- src/server/mod.rs | 6 ++-- src/server/views/html/mod.rs | 2 +- 5 files changed, 64 insertions(+), 5 deletions(-) delete mode 100644 assets/favicon.png create mode 100644 assets/logo.svg diff --git a/assets/favicon.png b/assets/favicon.png deleted file mode 100644 index a57c480b6ed3b74747cf24bc25a780cbf29f3d9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1338 zcmV-A1;zS_P)s=T!acU_>CV`;ZRMrk>ZN*Z+qP}nwyn%d^&3w#w(Z)J zTJLty+o}30yIbFPV%-1Ky`}Em`*!FZ==)#vE?&O__lNfE*|YAy4jf?Jpy!}Hefsoa z8MGIldj;y9_uw5ncB~4H`=R|D&b^-K+_`hDyoB%3qem-%&*vcC6vyv$%qw`*b6W(x zk^|&G_^ov?v`fCEeQg9Bb%ybzrJXu;YLE{D-g7))F?vh&x*s7Bo(ttQMdjZAT(klB zkC{rsV*%5S2Pr{Ht`QK}xe$}2t5r<@Hza1j=PDWym6!pmRV;xm5;Ncc{<4&68L(Yq z1~B|(8PyC}DbawfDvkl)NGyR86*oY4NHpLP6*FL*L<39}SAyjb*a`^-Y-rlFX(d(9 z0nU-o`&VkJww5hhRz#3-f$%GkX*IHmg)Nv|m&F2|S){NBi%j#ePlr{MH5Lp(u=_+T zevn}kQvELg%d%L(3>GbXj>QUBLF`Y8ntNHyq|h~NexR-BQaDk70p~e_V?_u!0ilvgXqSt0-;MkGQXPWwLCvYoy(ntll$pl65vM{Q;_+q& z=2Xxt>J= z^)y8r;Qg%;$(-~)++;0~6mEL(=HmOh(o6<`3D9u6MmJPn$+O3Z-o zv{Vg2z5p?CBI}G$pvK<}SZMm?)xUYQbMJ?&b{Mb@h&6zh!g+r)VE&Y9JT;}%zrVY4 z?^ALU4^q5hDazmx3BCVq>hz~1BFO+|gbwZOxEsXbrr6#u7~=@vICOAbS@2vmc&z*- zvH4=^d7lOc$ut1tz|D>Zd=sdIK&b!&5?KD$PLuw@>2eJqPo|0mr@<}wfoSe_e`~Su z>5zWqM~h}iHNdu>P8rPa2crveV8Eh`@Z5l6GE(jsK<>;GQ}W~nnedDU_!oHEXVY5P zMY_}s2wSJQ*eValxbS(_;QX@%BQ>|pN3Au|48Wl4Ha@n%-wtM+1HB5+dAMK0_4DJ` zp>sT44%2PxF*)^5HfXrmsov%9ur*B58sH91)n-ugy;yi_Pjb9b)&O6a4E+5RNPxoR zMosmGEVy3K++WfZD?Ls5_ClZxOn5WLE58*=r@r%1IC&*U@Cp6L!`f{u@Bjb+ 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";