feat: load curtain image
This commit is contained in:
parent
eede0cbdc0
commit
60dd9eeeae
2 changed files with 11 additions and 1 deletions
10
src/main.rs
10
src/main.rs
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue