summaryrefslogtreecommitdiff
path: root/src/pages.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages.rs')
-rw-r--r--src/pages.rs42
1 files changed, 14 insertions, 28 deletions
diff --git a/src/pages.rs b/src/pages.rs
index a60941d..b9831cc 100644
--- a/src/pages.rs
+++ b/src/pages.rs
@@ -1,17 +1,16 @@
use crate::layout::{DynScaffold, Scaffold};
-use rocket::{
- get,
- http::{ContentType, Cookie, CookieJar},
- post,
- response::Redirect,
- uri,
-};
+use rocket::{get, http::ContentType, response::Redirect, uri};
#[get("/")]
pub fn r_root() -> Redirect {
Redirect::to(uri!(r_about()))
}
+#[get("/hello")]
+pub fn r_hello() -> &'static str {
+ "Hello World!"
+}
+
#[get("/about")]
pub fn r_about() -> DynScaffold<'static> {
Scaffold {
@@ -20,26 +19,24 @@ pub fn r_about() -> DynScaffold<'static> {
p {
"Hi. I am a normal person from planet earth. "
"I enjoy starting projects and never finishing them. "
+ "I do not know what to write here. "
"I am also supporting the free software movement by writing exclusively free software in my spare time. "
}
h2 { "current interests" }
ul {
li { "development of a general-purpose systems programming language" }
+ li { "development of multimedia processing and streaming applications" }
li { "replacing existing software with rust rewrites and rocket emotes" }
li { "stuff" }
}
- h2 { "languages I know" }
+ h2 { "links" }
+ p { "some of my projects if you are here because of boredom: " }
ul {
- li { "Rust" }
- li { "English" }
- li { "Haskell" }
- li { "German" }
- li { "Typescript" }
- li { "C" }
- li { "toki pona" }
- li { "Python" }
- li { "Nim, Zig, some French and others that I don't really care about" }
+ li { a[href="https://meet.metamuffin.org"] { "keks-meet" } }
+ li { a[href="https://s.metamuffin.org/projects/weakpoint/"] { "weakpoint" } }
+ li { a[href="https://meet.metamuffin.org"] { "keks-meet" } }
}
+
},
}
}
@@ -94,14 +91,3 @@ pub fn r_pgp_key() -> &'static str {
pub fn r_style() -> (ContentType, &'static str) {
(ContentType::CSS, include_str!("../assets/style.css"))
}
-
-#[post("/toggle_css")]
-pub fn r_toggle_css(jar: &CookieJar) -> Redirect {
- let has_css = jar.get("css").map(|v| v.value() == "yes").unwrap_or(false);
- jar.add(
- Cookie::build("css", if has_css { "no" } else { "yes" })
- .permanent()
- .finish(),
- );
- Redirect::to(rocket::uri!(r_root()))
-}