use simple styling
This commit is contained in:
parent
0f3fb34d85
commit
a94d23bc2c
6 changed files with 55 additions and 8 deletions
12
src/css_handler.rs
Normal file
12
src/css_handler.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
use axum::http::StatusCode;
|
||||
use axum::{http::Response, response::IntoResponse};
|
||||
|
||||
static STYLESHEET: &str = include_str!("../static/styles.css");
|
||||
|
||||
pub async fn stylesheet_handler() -> Result<impl IntoResponse, StatusCode> {
|
||||
let response = Response::builder()
|
||||
.header("Content-Type", "text/css")
|
||||
.body(STYLESHEET.to_string());
|
||||
|
||||
response.map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue