summaryrefslogtreecommitdiff
path: root/src/pages.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-02-13 19:48:42 +0100
committermetamuffin <metamuffin@disroot.org>2023-02-13 19:48:42 +0100
commitc4d99ef7307c238244c975e45ae1e24c923538b6 (patch)
treea80ce5de4547fff8347aeaa3e4b9cf48adfe75b2 /src/pages.rs
parentba4d782687b5eb8d91fd881a7cb9d0adce7dd9f0 (diff)
downloadmetamuffin-website-c4d99ef7307c238244c975e45ae1e24c923538b6.tar
metamuffin-website-c4d99ef7307c238244c975e45ae1e24c923538b6.tar.bz2
metamuffin-website-c4d99ef7307c238244c975e45ae1e24c923538b6.tar.zst
prepare for blog stuff
Diffstat (limited to 'src/pages.rs')
-rw-r--r--src/pages.rs19
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" }