This commit is contained in:
2023-08-29 21:33:59 +02:00
parent 0ddeac69e6
commit 859299f4ce
8 changed files with 142 additions and 221 deletions

View File

@@ -1,12 +1,10 @@
use maud::{html, Markup};
pub struct Home {
doc: Markup,
}
pub struct Home;
impl Home {
pub fn build() -> Self {
let doc: Markup = html!(
pub fn build() -> Markup {
html!(
div id="home" class={"p-8" "max-w-xl"} {
p {
a href="/inventory/" { "Inventory" }
@@ -15,14 +13,6 @@ impl Home {
a href="/trips/" { "Trips" }
}
}
);
Self { doc }
}
}
impl From<Home> for Markup {
fn from(val: Home) -> Self {
val.doc
)
}
}