diff options
Diffstat (limited to 'src/pages.rs')
-rw-r--r-- | src/pages.rs | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/pages.rs b/src/pages.rs index 720bfba..00626e3 100644 --- a/src/pages.rs +++ b/src/pages.rs @@ -1,15 +1,14 @@ +use crate::layout::{DynScaffold, Scaffold}; use rocket::{catch, get, http::Status, response::Redirect, uri, Request}; -use crate::layout::{DynLayoutPage, LayoutPage}; - #[get("/")] pub fn r_root() -> Redirect { Redirect::to(uri!(r_about())) } #[get("/about")] -pub fn r_about() -> DynLayoutPage<'static> { - LayoutPage { +pub fn r_about() -> DynScaffold<'static> { + Scaffold { title: "about".to_string(), content: markup::new! { p { @@ -40,8 +39,8 @@ pub fn r_about() -> DynLayoutPage<'static> { } #[get("/projects")] -pub fn r_projects() -> DynLayoutPage<'static> { - LayoutPage { +pub fn r_projects() -> DynScaffold<'static> { + Scaffold { title: "projects".to_string(), content: markup::new! { p { "I am starting a lot of projects - here are a few selected ones:" } @@ -77,8 +76,8 @@ pub fn r_projects() -> DynLayoutPage<'static> { } #[get("/contact")] -pub fn r_contact() -> DynLayoutPage<'static> { - LayoutPage { +pub fn r_contact() -> DynScaffold<'static> { + Scaffold { title: "contact".to_string(), content: markup::new! { p { "You can reach out to me in a bunch of ways. I am also generally looking for nice software ideas to implement." } @@ -98,8 +97,8 @@ pub fn r_pgp_key() -> &'static str { } #[catch(default)] -pub fn r_catch<'a>(status: Status, _request: &Request) -> DynLayoutPage<'a> { - LayoutPage { +pub fn r_catch<'a>(status: Status, _request: &Request) -> DynScaffold<'a> { + Scaffold { title: "Error".to_string(), content: markup::new! { h2 { "Error" } |