Moved templates to be embedded in executable
This commit is contained in:
parent
b676be8cb2
commit
1c1a9589b7
25 changed files with 957 additions and 256 deletions
|
|
@ -3,11 +3,13 @@ use std::fs;
|
|||
use axum::response::IntoResponse;
|
||||
use hyper::{header::CONTENT_TYPE, StatusCode};
|
||||
|
||||
use crate::static_values;
|
||||
|
||||
pub async fn styles() -> impl IntoResponse {
|
||||
(
|
||||
StatusCode::OK,
|
||||
[(CONTENT_TYPE, "text/css")],
|
||||
fs::read_to_string("static/styles.css").unwrap(),
|
||||
static_values::STYLES,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -15,6 +17,6 @@ pub async fn csv() -> impl IntoResponse {
|
|||
(
|
||||
StatusCode::OK,
|
||||
[(CONTENT_TYPE, "application/javascript")],
|
||||
fs::read_to_string("static/csv.js").unwrap(),
|
||||
static_values::CSV,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue