Replace the title by the milli logo

This commit is contained in:
Kerollmops 2020-07-15 23:51:12 +02:00
parent 9ade00e27b
commit ee305c9284
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4
5 changed files with 52 additions and 3 deletions

6
public/logo-black.svg Normal file
View File

@ -0,0 +1,6 @@
<svg width="277" height="236" viewBox="0 0 277 236" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M213.085 190L242.907 86H276.196L246.375 190H213.085Z" fill="#494949"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 190L29.8215 86H63.1111L33.2896 190H0Z" fill="#494949"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M124.986 0L57.5772 235.083L60.7752 236H90.6038L158.276 0H124.986Z" fill="#494949"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M195.273 0L127.601 236H160.891L228.563 0H195.273Z" fill="#494949"/>
</svg>

After

Width:  |  Height:  |  Size: 585 B

6
public/logo-white.svg Normal file
View File

@ -0,0 +1,6 @@
<svg width="277" height="236" viewBox="0 0 277 236" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M213.508 190L243.33 86H276.619L246.798 190H213.508Z" fill="#B5B5B5"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.422791 190L30.2443 86H63.5339L33.7124 190H0.422791Z" fill="#B5B5B5"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M125.409 0L58 235.083L61.198 236H91.0266L158.699 0H125.409Z" fill="#B5B5B5"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M195.696 0L128.024 236H161.313L228.985 0H195.696Z" fill="#B5B5B5"/>
</svg>

After

Width:  |  Height:  |  Size: 592 B

View File

@ -4,6 +4,14 @@
padding: 0; padding: 0;
} }
#logo-white {
display: none;
}
#logo-black {
display: inherit;
}
.notification { .notification {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -79,6 +87,14 @@
} }
@media (prefers-color-scheme:dark) { @media (prefers-color-scheme:dark) {
#logo-white {
display: inherit;
}
#logo-black {
display: none;
}
.hero.is-light { .hero.is-light {
background-color: #242424; background-color: #242424;
color: inherit; color: inherit;

View File

@ -138,6 +138,20 @@ async fn main() -> anyhow::Result<()> {
.body(include_str!("../../public/script.js")) .body(include_str!("../../public/script.js"))
); );
let dash_logo_white_route = warp::filters::method::get()
.and(warp::path!("logo-white.svg"))
.map(|| Response::builder()
.header("content-type", "image/svg+xml")
.body(include_str!("../../public/logo-white.svg"))
);
let dash_logo_black_route = warp::filters::method::get()
.and(warp::path!("logo-black.svg"))
.map(|| Response::builder()
.header("content-type", "image/svg+xml")
.body(include_str!("../../public/logo-black.svg"))
);
#[derive(Deserialize)] #[derive(Deserialize)]
struct QueryBody { struct QueryBody {
query: String, query: String,
@ -197,6 +211,8 @@ async fn main() -> anyhow::Result<()> {
.or(dash_papaparse_route) .or(dash_papaparse_route)
.or(dash_filesize_route) .or(dash_filesize_route)
.or(dash_script_route) .or(dash_script_route)
.or(dash_logo_white_route)
.or(dash_logo_black_route)
.or(query_route); .or(query_route);
let addr = SocketAddr::from_str(&opt.http_listen_addr).unwrap(); let addr = SocketAddr::from_str(&opt.http_listen_addr).unwrap();

View File

@ -16,9 +16,14 @@
<section class="hero is-light"> <section class="hero is-light">
<div class="hero-body"> <div class="hero-body">
<div class="container"> <div class="container">
<h1 class="title has-text-centered">
Welcome to milli <div class="columns is-flex is-centered">
</h1> <figure class="image is-128x128">
<img id="logo-white" src="logo-white.svg" alt="milli logo in white">
<img id="logo-black" src="logo-black.svg" alt="milli logo in black">
</figure>
</div>
<nav class="level"> <nav class="level">
<div class="level-item has-text-centered"> <div class="level-item has-text-centered">
<div> <div>