fix: form submission
This commit is contained in:
parent
1a0b35d615
commit
7f85686d93
3 changed files with 7 additions and 7 deletions
Before Width: | Height: | Size: 428 KiB After Width: | Height: | Size: 428 KiB |
|
@ -98,7 +98,7 @@ async fn open_post(ctx: web::Data<Args>) -> 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);
|
||||
|
||||
|
|
|
@ -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");
|
||||
fetch("/", {method: "post"}).then(() =>
|
||||
startCountdown()
|
||||
);
|
||||
}
|
||||
// startCountdown();
|
||||
}
|
||||
|
||||
function showTime() {
|
||||
|
|
Reference in a new issue