diff --git a/src/main.rs b/src/main.rs index c5e3b50..f172479 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,7 +30,7 @@ use std::net::SocketAddr; use tower_http::services::{ServeDir, ServeFile}; use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; -use crate::templates::shift_reports_html; +use crate::templates::*; include!(concat!(env!("OUT_DIR"), "/templates.rs")); @@ -77,6 +77,7 @@ async fn main() { let app = Router::new() .nest("/api", api::router()) .route("/", get(root)) + .route("/ada", get(ada)) .route("/shift_reports", get(shift_reports)) .route("/shifts/:id/drinks", get(drinks)) .route("/shifts/:id/report", get(shift_report)) @@ -141,3 +142,7 @@ async fn shift_reports(State(state): State) -> impl IntoResponse { render!(shift_reports_html, shifts) } + +async fn ada() -> impl IntoResponse { + render!(ada_html) +} diff --git a/templates/ada.rs.html b/templates/ada.rs.html new file mode 100644 index 0000000..e485ba6 --- /dev/null +++ b/templates/ada.rs.html @@ -0,0 +1,12 @@ +@use super::base_html; +@use super::components::ada_list_html; + +@() + +@:base_html({ + +
+ @:ada_list_html() +
+ +}) diff --git a/templates/components/ada_list.rs.html b/templates/components/ada_list.rs.html new file mode 100644 index 0000000..3318a4c --- /dev/null +++ b/templates/components/ada_list.rs.html @@ -0,0 +1,5 @@ +@() + +
+ Oops, there should be a list here! +