2024-03-23 19:35:31 +00:00
|
|
|
use actix_web_lab::respond::Html;
|
|
|
|
use actix_web::{Result, Responder};
|
2024-03-23 19:42:02 +00:00
|
|
|
use askama::Template;
|
|
|
|
|
2024-03-23 19:35:31 +00:00
|
|
|
|
|
|
|
mod templates;
|
|
|
|
|
2024-03-23 19:42:02 +00:00
|
|
|
pub async fn index() -> Result<impl Responder> {
|
2024-03-23 19:35:31 +00:00
|
|
|
let html = templates::IndexTemplate {
|
|
|
|
placeholder: "hewwo world"
|
|
|
|
}.render().expect("Failed to render index.html");
|
|
|
|
|
|
|
|
Ok(Html(html))
|
|
|
|
}
|
|
|
|
|