Files
packager/rust/src/components/home.rs

29 lines
512 B
Rust
Raw Normal View History

2023-05-08 22:31:01 +02:00
use maud::{html, Markup};
2023-05-08 00:05:45 +02:00
pub struct Home {
2023-05-08 22:31:01 +02:00
doc: Markup,
2023-05-08 00:05:45 +02:00
}
impl Home {
pub fn build() -> Self {
2023-05-08 22:31:01 +02:00
let doc: Markup = html!(
div id="home" class={"p-8" "max-w-xl"} {
p {
a href="/inventory" { "Inventory" }
}
p {
a href="/trips" { "Trips" }
}
}
2023-05-08 00:05:45 +02:00
);
Self { doc }
}
}
2023-05-08 22:31:01 +02:00
impl Into<Markup> for Home {
fn into(self) -> Markup {
2023-05-08 00:05:45 +02:00
self.doc
}
}