feat: load curtain image

This commit is contained in:
Aravinth Manivannan 2024-03-20 12:59:13 +05:30
parent eede0cbdc0
commit 60dd9eeeae
Signed by untrusted user: realaravinth
GPG key ID: F8F50389936984FF
2 changed files with 11 additions and 1 deletions

View file

@ -80,6 +80,15 @@ async fn open_post(ctx: web::Data<Args>) -> impl Responder {
.finish()
}
#[get("/curtain.jpeg")]
async fn curtain_jpeg() -> impl Responder {
let curtain = include_bytes!("./curatain.jpeg");
let curtain = actix_web::web::Bytes::from_static(curtain);
HttpResponse::Ok().content_type("image/jpeg").body(curtain)
}
#[get("/")]
async fn open_get() -> impl Responder {
let open = include_str!("./open.html");
@ -92,6 +101,7 @@ async fn open_get() -> impl Responder {
fn services(cfg: &mut ServiceConfig) {
cfg.service(reset_get);
cfg.service(reset_post);
cfg.service(curtain_jpeg);
cfg.service(open_get);
cfg.service(open_post);
}

View file

@ -79,7 +79,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
width: 50%;
height: 100%;
filter: brightness(180%);
background-image: url("./curatain.jpeg");
background-image: url("./curtain.jpeg");
background-size: cover;
background-repeat: no-repeat;
}