aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/pages/home.rs
blob: 3595c1998a5d9f431f681c90c5ce0e6209db4860 (plain)
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!" }
        },
    })
}