From c4d99ef7307c238244c975e45ae1e24c923538b6 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 13 Feb 2023 19:48:42 +0100 Subject: prepare for blog stuff --- src/pages.rs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/pages.rs') 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" } -- cgit v1.2.3-70-g09d2