Added web ui with templates
This commit is contained in:
parent
d2cb5b3031
commit
90b02eef79
24 changed files with 1403 additions and 78 deletions
12
webserver/src/routes/static_routes.rs
Normal file
12
webserver/src/routes/static_routes.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
use std::fs;
|
||||
|
||||
use axum::response::IntoResponse;
|
||||
use hyper::{header::CONTENT_TYPE, StatusCode};
|
||||
|
||||
pub async fn styles() -> impl IntoResponse {
|
||||
(
|
||||
StatusCode::OK,
|
||||
[(CONTENT_TYPE, "text/css")],
|
||||
fs::read_to_string("static/styles.css").unwrap(),
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue