diff options
Diffstat (limited to 'src/index.rs')
| -rw-r--r-- | src/index.rs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/index.rs b/src/index.rs new file mode 100644 index 0000000..6411ff4 --- /dev/null +++ b/src/index.rs @@ -0,0 +1,37 @@ +use axum::{response::IntoResponse, routing::get, Router}; + +pub fn router<S>() -> Router<S> +where + S: Send + Sync + Clone + 'static, +{ + Router::new().route("/", get(index)) +} + +async fn index() -> impl IntoResponse { + templates::index() +} + +mod templates { + use maud::{html, Markup, DOCTYPE}; + pub fn index() -> Markup { + html! { + (DOCTYPE) + head { + title { "hi" } + } + body { + form action="/login" method="post" { + label { + "name" + input name="name" type="text" {} + } + label { + "password" + input name="password" type="password" {} + } + button { "hi" } + } + } + } + } +} |
