Files
zero2prod/src/routes/home.rs
Alphonse Paix 8a977df948 Askama + htmx for frontend
Server-side rendering with htmx and Tailwind CSS for the styling
2025-09-16 01:47:18 +02:00

12 lines
246 B
Rust

use askama::Template;
use axum::response::Html;
#[derive(Template)]
#[template(path = "../templates/home.html")]
struct HomeTemplate;
pub async fn home() -> Html<String> {
let template = HomeTemplate;
Html(template.render().unwrap())
}