mirror of
https://github.com/Noratrieb/oh-oh.git
synced 2026-01-16 09:55:06 +01:00
style
This commit is contained in:
parent
1772e21364
commit
0f46ff5a89
6 changed files with 35 additions and 1 deletions
|
|
@ -54,7 +54,8 @@ async fn main() -> Result<()> {
|
|||
.wrap_err("running migrations")?;
|
||||
|
||||
let app = Router::<Db>::new()
|
||||
.route("/", get::<_, _, Db>(root))
|
||||
.route("/style.css", get(style_css))
|
||||
.route("/", get(root))
|
||||
.route("/signup", get(signup).post(signup_post))
|
||||
.route("/login", get(login).post(login_post))
|
||||
.route("/users", get(users))
|
||||
|
|
@ -68,6 +69,14 @@ async fn main() -> Result<()> {
|
|||
axum::serve(listener, app).await.wrap_err("serving app")
|
||||
}
|
||||
|
||||
async fn style_css() -> impl IntoResponse {
|
||||
let header = [(
|
||||
axum::http::header::CONTENT_TYPE,
|
||||
axum::http::HeaderValue::from_static("text/css; charset=utf-8"),
|
||||
)];
|
||||
(header, include_str!("../templates/style.css"))
|
||||
}
|
||||
|
||||
async fn root(session: UserSession) -> impl IntoResponse {
|
||||
#[derive(askama::Template)]
|
||||
#[template(path = "index.html")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue