diff options
author | Ashelyn Rose <git@ashen.earth> | 2025-04-26 21:06:00 -0600 |
---|---|---|
committer | Ashelyn Rose <git@ashen.earth> | 2025-04-26 21:06:00 -0600 |
commit | 2dacece4eedc8af2ccde3be6918371293350cc4e (patch) | |
tree | 81364da50cad615cd387f38d1abcc62102939033 /src/routes/mod.rs | |
parent | 619373a261ad18c51cd09bc61d116f585c8295ec (diff) |
Convert to rocket and morgana no-leptos
Diffstat (limited to 'src/routes/mod.rs')
-rw-r--r-- | src/routes/mod.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/routes/mod.rs b/src/routes/mod.rs new file mode 100644 index 0000000..935bab0 --- /dev/null +++ b/src/routes/mod.rs @@ -0,0 +1,17 @@ +use std::path::PathBuf; + +use morgana::{morx, render_tree_blocking}; +use rocket::response::content::RawHtml; +use crate::components::{Layout}; + +#[get("/<page_path..>")] +pub fn render_page(page_path: PathBuf) -> RawHtml<String> { + RawHtml(render_tree_blocking(morx! { + Layout page_title="Test page" site_title="Stormscribe" + })) +} + +#[get("/<page_path..>?edit")] +pub fn render_editor(page_path: PathBuf) -> String { + "not implemented".to_string() +} |