}
diff --git a/src/pages/about.rs b/src/pages/about.rs
index e5cb014..b90cedc 100644
--- a/src/pages/about.rs
+++ b/src/pages/about.rs
@@ -47,7 +47,7 @@ impl Component for About {
font-weight: bold !important;
font-style: italic !important;
font-size: xx-large !important;
- ">{r"intro"}{r">intro_"}
{r"hobbies"}
{r">hobbies_"}
{author.name.clone()}
-- { for author.keywords.iter().map(|tag| html! {
{ tag }
}) } - --
{r#"about me"#}
-{ "about me" }
+{ "my posts" }
+{*keyword}
+ }).collect::(); html! { - <> -{ &author.name }
-- { "I like " } - { author.keywords.join(", ") } -
-+ to={Route::Author { id: author.id }}> + { &*author.name } + > +
+ { keywords }meow
", "mrrp", "meow"] - .iter() - .map(|s| s.to_string()) - .collect(), - }, - _ => Self { + *Self::POSTS + .get(entry.id as usize) + .cloned() + .unwrap_or(&Self { id: u8::MAX, - author: Author::from_id(u8::MAX), - title: "not found".parse().unwrap(), - content: vec![], - }, - }; + authors: &[u8::MAX], + title: "not found", + utcdate: "1970-01-01", + content: "", + }) } } @@ -65,10 +55,170 @@ impl Entry { Self { id: seed } } } - pub trait BlogEntry: Sized { fn from_entry(entry: &mut Entry) -> Self; fn from_id(id: u8) -> Self { Self::from_entry(&mut Entry::from_id(id)) } + + const AUTHORS: [&'static Author; 2] = [ + &Author { + id: 0, + image_url: "profile.avif", + name: "lia", + keywords: &[ + "certified catgirl™", + "software engineer", + "professional yapper", + "neurospicy and disabled" + ], + about: "", + }, + &Author { + id: 1, + image_url: "", + name: "mreowww", + keywords: &["meow", "mrrp", "mew"], + about: "", + }, + ]; + + const POSTS: [&'static Post; 1] = [ + /*&Post { + id: 0, + authors: &[0], + title: "sweet little poison", + utcdate: "1970-01-01", + content: r#" +### this will be a future write-up how i set up iocaine with caddy and docker. +### here's my docker-compose.yml: + +```yml +services: + caddy: + image: caddy:alpine + container_name: proxy.caddy + hostname: proxy.caddy + restart: unless-stopped + cap_add: + - NET_ADMIN + ports: + - "80:80" + - "443:443" + - "443:443/udp" + networks: + - nginx + volumes: + - ./socks:/run/iocaine:ro + - ./nginx/pages:/var/www/html + - ./caddy/data:/data + - ./caddy/config:/config + - ./caddy/proxy:/etc/caddy/Caddyfile:ro + depends_on: + - iocaine + iocaine: + image: git.madhouse-project.org/iocaine/iocaine:2 + container_name: proxy.iocaine + hostname: proxy.iocaine + restart: unless-stopped + ports: + - "42069:42069" + networks: + - nginx + volumes: + - ./iocaine:/data + - ./socks:/run/iocaine:rw + # - iocainesocket:/run/iocaine/waow.socket:rw + environment: + # - IOCAINE__SERVER__BIND="0.0.0.0:42069" + - IOCAINE__SERVER__BIND="/run/iocaine/waow.socket" + - IOCAINE__SERVER__UNIX_LISTEN_ACCESS="everybody" + - IOCAINE__SERVER__REQUEST_HANDLER__PATH="/data" + - IOCAINE__SERVER__REQUEST_HANDLER__LANGUAGE="roto" + - IOCAINE__SERVER__CONTROL__BIND="/run/iocaine/listen.socket" + - IOCAINE__SERVER__CONTROL__UNIX_LISTEN_ACCESS="owner" + - IOCAINE__SOURCES__WORDS="/data/words.txt" + - IOCAINE__SOURCES__MARKOV=["/data/1984.txt", "/data/brave-new-world.txt"] + - IOCAINE__METRICS__ENABLE=false + command: --config-file /data/config.toml +networks: + nginx: + external: true +``` + +### my file-tree: + +```sh +services/proxy » tree iocaine +iocaine +├── 1984.txt +├── brave-new-world.txt +├── nam_shub_of_enki +│ ├── classify +│ │ └── mod.roto +│ ├── config.roto +│ ├── detect +│ │ └── mod.roto +│ ├── mod.roto +│ └── tests +│ └── mod.roto +├── nam-shub-of-enki-20250711.0.tar.zst +├── nam-shub-of-enki-latest.tar.zst +├── pkg.roto +├── robots.json +└── words.txt +``` + +### and my caddy-snippet with example: + + +```txt +(iocaine) { + @read method GET HEAD + @not-read not { + method GET HEAD + } + reverse_proxy @read unix//run/iocaine/waow.socket { + #reverse_proxy @read proxy.iocaine:42069 { + @fallback status 421 + handle_response @fallback { + {blocks.handler} + } + } + handle @not-read { + {blocks.default} + } +} + +example.com { + import iocaine { + handler { + reverse_proxy http://example:8080 + } + default { + respond 405 + } + } +} + +``` + "#, + }, + */&Post { + id: 0, + authors: &[0], + title: "haj, world!", + utcdate: "2025-08-24", + content: r#" +### my first blogpost +haj! and welcome to my first blogpost. +this blogpost won't have that much content. +fun fact: this post generates html from markdown :3 +so i can include images, formatted text, code and content much easier. +i also added a too overcomplicated blog backend that allows authors and posts by u8::MAX, cause why not. +won't post that much either way, so why bother with higher values. /srs +nonetheless... have a great day, evening, whatever daytime it's for you rn and stay safe. ♡s +"#, + }, + ]; } diff --git a/src/pages/blog/entries.rs b/src/pages/blog/entries.rs index dc76198..7d71134 100644 --- a/src/pages/blog/entries.rs +++ b/src/pages/blog/entries.rs @@ -1,7 +1,7 @@ use yew::prelude::*; -use crate::pages::blog::content::{Author, Post}; use crate::pages::blog::content::BlogEntry; +use crate::pages::blog::content::Post; use crate::pages::blog::entrycard::EntryCard; pub struct Entries {} @@ -10,15 +10,18 @@ impl Component for Entries { type Message = (); type Properties = (); - fn create(ctx: &Context{ "entries" }
-{ "here are some things i yapped about" }
+{ "entries" }
+{ "here are some things i yapped about" }
{ self.view_posts(ctx) }- { &post.title } -
-- { "by " } - to={Route::Author { id: post.author.id }}> - { &post.author.name } - > -
-{ &*post.title }
++ { "written by " } { + post.authors.iter().map(|id| { + let author = Author::from_id(*id); + html! { + to={crate::Route::Author { id: author.id }}> + { &*author.name } + > + } + }).intersperse(html! { ", " }).collect::() + } { format!(" on {}", &post.utcdate) } +
{ &*post.title }
> ++ { format!("published {}", post.utcdate) } +
++ { "written by " } + { + post.authors.iter().map(|id| { + let author = Author::from_id(*id); + html! { + to={crate::Route::Author { id: author.id }}> + { &*author.name } + > + } + }).intersperse(html! { ", " }).collect::() + } +
+{r"follow us"}
{" × "}{r"fediverse"}
- {" × "}{r"bluesky"}
-
{r" × matrix » @iouring:hi.stellaris.fyi"}
- {r" × telegr » @luc1ell3"}
- {r" × ewcord » @donotusedisc0rdkthxbye"}
-
{" × "}{r"my own!!!"}
- {" × "}{r"the gay one"}
- {" × "}{r"git of fren"}
- {" × "}{r"a mountain what"}
-
{r"follow us"}
+{" × "}{r"fediverse"}
+ {" × "}{r"bluesky"}
+
{r"write us"}
+
+ {"× "}
+
+
+ {"× "}
+
+
+ {"× "}
+
+
{r"git gud"}
+{" × "}{r"my own!!!"}
+ {" × "}{r"the gay one"}
+ {" × "}{r"git of fren"}
+ {" × "}{r"a mountain what"}
+
{r#"ongoing projects"#}
-{r#"all-rounder ide in the making"#}
-{r#"my planned matrix client"#}
-{r#"finished projects"#}
-{r#"a java seventeen (and up) event-sys that is able to be scaled in large systems."#}
-{r#"my personal set of configurations for different things"#}
-{r#"my java swing wrapper to simplify window creation for bogus-brains."#}
-{r#"fabric mod that adds experimental iouring and kqueue support."#}
-