Files
packager/rust/src/components/home.rs
2023-05-08 00:05:45 +02:00

26 lines
446 B
Rust

use super::Tree;
use axohtml::html;
pub struct Home {
doc: Tree,
}
impl Home {
pub fn build() -> Self {
let doc = html!(
<div id="home" class=["p-8", "max-w-xl"]>
<p><a href="/inventory">"Inventory"</a></p>
<p><a href="/trips">"Trips"</a></p>
</div>
);
Self { doc }
}
}
impl Into<Tree> for Home {
fn into(self) -> Tree {
self.doc
}
}