diff options
author | metamuffin <metamuffin@disroot.org> | 2024-04-27 17:17:52 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-04-27 17:17:52 +0200 |
commit | 0a8515ee43e5cbbe23827b27460822ee3cdbc686 (patch) | |
tree | 9cff48f0cbf3ef09fd8613c20c7399d2832eabfa /src/pages.rs | |
parent | 2e5753b2b9c850c52730f5feec2e0d9cec728bc2 (diff) | |
download | metamuffin-website-0a8515ee43e5cbbe23827b27460822ee3cdbc686.tar metamuffin-website-0a8515ee43e5cbbe23827b27460822ee3cdbc686.tar.bz2 metamuffin-website-0a8515ee43e5cbbe23827b27460822ee3cdbc686.tar.zst |
bump deps, john and small refinements
Diffstat (limited to 'src/pages.rs')
-rw-r--r-- | src/pages.rs | 42 |
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())) -} |