site_header start

This commit is contained in:
2024-02-22 20:13:23 +01:00
parent 8892624e9a
commit 0cb8e84666
13 changed files with 673 additions and 10 deletions

View File

@ -1,14 +1,21 @@
use askama::Template;
use crate::components::site_footer::{render_site_footer, SiteFooter};
use crate::components::{
site_footer::{render_site_footer, SiteFooter},
site_header::HeaderProps,
};
#[derive(Template)]
#[template(path = "index.html")]
pub struct IndexTemplate {
site_footer: SiteFooter,
header_props: HeaderProps,
}
pub async fn render_index() -> IndexTemplate {
let site_footer = render_site_footer().await;
IndexTemplate { site_footer }
IndexTemplate {
site_footer,
header_props: HeaderProps::default(),
}
}