diff --git a/src/curatain-min.jpeg b/src/curtain.jpeg similarity index 100% rename from src/curatain-min.jpeg rename to src/curtain.jpeg diff --git a/src/main.rs b/src/main.rs index 06be71a..9c2089f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -98,7 +98,7 @@ async fn open_post(ctx: web::Data) -> impl Responder { #[get("/curtain.jpeg")] async fn curtain_jpeg() -> impl Responder { - let curtain = include_bytes!("./curatain.jpeg"); + let curtain = include_bytes!("./curtain.jpeg"); let curtain = actix_web::web::Bytes::from_static(curtain); diff --git a/src/open.html b/src/open.html index d07419b..9314b47 100644 --- a/src/open.html +++ b/src/open.html @@ -81,7 +81,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later width: 50%; height: 100%; filter: brightness(180%); - background-image: url("./curatain-min.jpeg"); + background-image: url("./curtain.jpeg"); background-size: cover; background-repeat: no-repeat; } @@ -283,13 +283,13 @@ SPDX-License-Identifier: AGPL-3.0-or-later function detectSpaceKey(event) { if(event.keyCode == 13) { - showTime(); - var form = document.createElement("form"); - form.setAttribute("action", "/"); - form.setAttribute("method", "post"); + showTime(); + + fetch("/", {method: "post"}).then(() => + startCountdown() + ); } - // startCountdown(); } function showTime() {