refacto: move home code into a dedicated file and rename index to home everywhere

This commit is contained in:
2024-08-27 10:55:17 +02:00
committed by florian_briand
parent ab908f2664
commit b7fcfe3792
4 changed files with 17 additions and 14 deletions

View File

@ -0,0 +1,12 @@
use askama_axum::Template;
use axum_htmx::HxRequest;
#[derive(Template)]
#[template(path = "home.html")]
pub struct GetHomeTemplate {
hx_request: bool,
}
pub async fn home(HxRequest(hx_request): HxRequest) -> GetHomeTemplate {
GetHomeTemplate { hx_request }
}