add ssr rust

This commit is contained in:
2023-05-08 00:05:45 +02:00
parent a923372997
commit 38d8e51975
13 changed files with 2757 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
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
}
}