fix,feat: mention behavior and page titles

This commit is contained in:
Robert Perce 2026-02-14 13:35:59 -06:00
parent 7e2f5d0a18
commit 79a054ab40
22 changed files with 314 additions and 140 deletions

View file

@ -61,11 +61,16 @@ impl FromRequestParts<AppState> for Layout {
}
impl Layout {
pub fn render(&self, css: Option<Vec<&str>>, content: Markup) -> Markup {
pub fn render(&self, title: impl AsRef<str>, css: Option<Vec<&str>>, content: Markup) -> Markup {
html! {
(DOCTYPE)
html {
head {
title { (format!("{} | Mascarpone CRM", title.as_ref())) }
link rel="apple-touch-icon" sizes="180x180" href=(format!("/static/{}", asset!("apple-touch-icon.png")));
link rel="icon" type="image/png" sizes="32x32" href=(format!("/static/{}", asset!("favicon-32x32.png")));
link rel="icon" type="image/png" sizes="16x16" href=(format!("/static/{}", asset!("favicon-16x16.png")));
link rel="manifest" href=(format!("/static/{}", asset!("site.webmanifest")));
link rel="stylesheet" type="text/css" href=(format!("/static/{}", asset!("index.css")));
meta name="viewport" content="width=device-width";
script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.7/dist/htmx.min.js" {}
@ -102,6 +107,7 @@ impl Layout {
(content)
}
}
template #alpine-loaded x-cloak {}
}
}
}