1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use crate::{ frontend::pages::{layout::Layout, HtmlTemplate}, AppState, }; use rocket::{get, State}; #[get("/")] pub async fn page_home(state: &State<AppState>) -> HtmlTemplate<impl markup::Render> { HtmlTemplate(Layout { title: String::from("Home"), main: markup::new! { h1 { "It works!" } }, }) }