diff options
author | metamuffin <metamuffin@disroot.org> | 2023-01-22 13:56:06 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-01-22 13:56:06 +0100 |
commit | ec76bbe5398f51ffa55bfd315b30c0a07245d4e6 (patch) | |
tree | fa0e1723f861de6fee21a35524bb7768fab0b6ce /server/src/routes/ui/home.rs | |
parent | 84e093afa908dc68a7b0ae97ba8dc76aa0901d26 (diff) | |
download | jellything-ec76bbe5398f51ffa55bfd315b30c0a07245d4e6.tar jellything-ec76bbe5398f51ffa55bfd315b30c0a07245d4e6.tar.bz2 jellything-ec76bbe5398f51ffa55bfd315b30c0a07245d4e6.tar.zst |
this is *horrible*
Diffstat (limited to 'server/src/routes/ui/home.rs')
-rw-r--r-- | server/src/routes/ui/home.rs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/server/src/routes/ui/home.rs b/server/src/routes/ui/home.rs index 04a4c7d..88c6cfb 100644 --- a/server/src/routes/ui/home.rs +++ b/server/src/routes/ui/home.rs @@ -1,15 +1,17 @@ -use crate::routes::ui::node::NodePage; +use super::account::session::Session; +use super::layout::LayoutPage; +use crate::routes::ui::layout::DynLayoutPage; use crate::CONF; -use crate::{routes::ui::HtmlTemplate, AppState}; +use crate::{library::Library, routes::ui::node::NodePage}; use rocket::{get, State}; #[get("/")] -pub async fn r_home(state: &State<AppState>) -> HtmlTemplate<markup::DynRender> { - HtmlTemplate( - "Home".to_string(), - markup::new! { +pub async fn r_home(_sess: Session, library: &State<Library>) -> LayoutPage<markup::DynRender> { + LayoutPage { + title: "Home".to_string(), + content: markup::new! { p { "Welcome to " @CONF.brand } - @NodePage { node: state.library.root.clone() } + @NodePage { node: library.root.clone() } }, - ) + } } |