diff --git a/Cargo.lock b/Cargo.lock index 0be6d24..bbc60fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -286,7 +286,7 @@ dependencies = [ "async-io", "async-lock", "async-process", - "crossbeam-utils 0.8.2", + "crossbeam-utils 0.8.3", "futures-channel", "futures-core", "futures-io", @@ -565,14 +565,13 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae8f328835f8f5a6ceb6a7842a7f2d0c03692adb5c889347235d59194731fe3" +checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49" dependencies = [ "autocfg", "cfg-if 1.0.0", "lazy_static", - "loom", ] [[package]] @@ -865,19 +864,6 @@ dependencies = [ "slab", ] -[[package]] -name = "generator" -version = "0.6.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9fed24fd1e18827652b4d55652899a1e9da8e54d91624dc3437a5bc3a9f9a9c" -dependencies = [ - "cc", - "libc", - "log", - "rustversion", - "winapi", -] - [[package]] name = "generic-array" version = "0.14.4" @@ -1050,7 +1036,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2948a0ce43e2c2ef11d7edf6816508998d99e13badd1150be0914205df9388a" dependencies = [ "bytes 0.5.6", - "crossbeam-utils 0.8.2", + "crossbeam-utils 0.8.3", "curl", "curl-sys", "flume", @@ -1173,17 +1159,6 @@ dependencies = [ "value-bag", ] -[[package]] -name = "loom" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d44c73b4636e497b4917eb21c33539efa3816741a2d3ff26c6316f1b529481a4" -dependencies = [ - "cfg-if 1.0.0", - "generator", - "scoped-tls", -] - [[package]] name = "matches" version = "0.1.8" @@ -1478,12 +1453,6 @@ dependencies = [ "semver", ] -[[package]] -name = "rustversion" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd" - [[package]] name = "ryu" version = "1.0.5" @@ -1500,12 +1469,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "scoped-tls" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" - [[package]] name = "scopeguard" version = "1.1.0" diff --git a/src/main.rs b/src/main.rs index baadb94..90d5515 100644 --- a/src/main.rs +++ b/src/main.rs @@ -63,7 +63,7 @@ async fn iphone_logo(_req: Request<()>) -> tide::Result { Ok( Response::builder(200) .content_type("image/png") - .body(include_bytes!("../static/touch-icon-iphone.png").as_ref()) + .body(include_bytes!("../static/apple-touch-icon.png").as_ref()) .build(), ) } @@ -71,9 +71,9 @@ async fn iphone_logo(_req: Request<()>) -> tide::Result { async fn favicon(_req: Request<()>) -> tide::Result { Ok( Response::builder(200) - .content_type("image/vnd.microsoft.icon") + .content_type("image/png") .header("Cache-Control", "public, max-age=1209600, s-maxage=86400") - .body(include_bytes!("../static/favicon.ico").as_ref()) + .body(include_bytes!("../static/favicon.png").as_ref()) .build(), ) } @@ -154,9 +154,11 @@ async fn main() -> tide::Result<()> { // Read static files app.at("/style.css/").get(|_| resource(include_str!("../static/style.css"), "text/css", false)); - app.at("/manifest.json/").get(|_| resource(include_str!("../static/manifest.json"), "application/json", false)); + app + .at("/manifest.json/") + .get(|_| resource(include_str!("../static/manifest.json"), "application/json", false)); app.at("/robots.txt/").get(|_| resource("User-agent: *\nAllow: /", "text/plain", true)); - app.at("/favicon.ico/").get(favicon); + app.at("/favicon.png/").get(favicon); app.at("/logo.png/").get(pwa_logo); app.at("/touch-icon-iphone.png/").get(iphone_logo); app.at("/apple-touch-icon.png/").get(iphone_logo); diff --git a/src/utils.rs b/src/utils.rs index 12e741d..e7a0f55 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -143,7 +143,8 @@ pub struct GalleryMedia { impl GalleryMedia { fn parse(items: &Value, metadata: &Value) -> Vec { - items.as_array() + items + .as_array() .unwrap_or(&Vec::new()) .iter() .map(|item| { @@ -497,7 +498,12 @@ pub fn redirect(path: String) -> Response { } pub async fn error(req: Request<()>, msg: String) -> tide::Result { - let body = ErrorTemplate { msg, prefs: Preferences::new(req) }.render().unwrap_or_default(); + let body = ErrorTemplate { + msg, + prefs: Preferences::new(req), + } + .render() + .unwrap_or_default(); Ok(Response::builder(404).content_type("text/html").body(body).build()) } diff --git a/static/apple-touch-icon.png b/static/apple-touch-icon.png new file mode 100644 index 0000000..3d72dc3 Binary files /dev/null and b/static/apple-touch-icon.png differ diff --git a/static/favicon.ico b/static/favicon.ico deleted file mode 100644 index 4ba6bfc..0000000 Binary files a/static/favicon.ico and /dev/null differ diff --git a/static/favicon.png b/static/favicon.png new file mode 100644 index 0000000..333f706 Binary files /dev/null and b/static/favicon.png differ diff --git a/static/logo.png b/static/logo.png index 2776cc2..8c0d3eb 100644 Binary files a/static/logo.png and b/static/logo.png differ diff --git a/static/manifest.json b/static/manifest.json index dd61eb2..d56cb96 100644 --- a/static/manifest.json +++ b/static/manifest.json @@ -12,8 +12,8 @@ "type": "image/png" }, { - "src": "touch-icon-iphone.png", - "sizes": "152x152" + "src": "apple-touch-icon.png", + "sizes": "180x180" }, { "src": "favicon.ico", diff --git a/static/touch-icon-iphone.png b/static/touch-icon-iphone.png deleted file mode 100644 index 1b9b4d5..0000000 Binary files a/static/touch-icon-iphone.png and /dev/null differ diff --git a/templates/base.html b/templates/base.html index db7d34f..b3d9846 100644 --- a/templates/base.html +++ b/templates/base.html @@ -18,7 +18,7 @@ - + {% endblock %}