From 7c14130b61d806b42e7c0d1c8cf846b964caadff Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Thu, 1 Jan 2026 21:34:04 +0100 Subject: about page --- TODO.md | 11 +++++------ resources/de/base.ftl | 1 + resources/en/about.ftl | 5 +++++ resources/fr/base.ftl | 1 + resources/ja/base.ftl | 1 + resources/pt/base.ftl | 1 + resources/zh/base.ftl | 1 + src/main.rs | 9 +++++++++ src/templates.rs | 7 +++++++ templates/about.html | 21 +++++++++++++++++++++ templates/base.html | 1 + 11 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 resources/en/about.ftl create mode 100644 templates/about.html diff --git a/TODO.md b/TODO.md index 5776af6..1e74629 100644 --- a/TODO.md +++ b/TODO.md @@ -1,17 +1,16 @@ # TODO: -[ ] new main font +[x] new main font [x] update contact -[ ] about page +[x] about page [x] capitalisation [ ] new badge(s) [ ] replace homepage with blog post feed [x] remove dead links (in navbar) -[ ] projects page [x] remove latest update thing [ ] fix atom feed stuff [ ] migrate to ructe -[ ] finger link/widget/iframe (like a terminal...)? +[ ] opengraph [x] make sure posts are organised in date order [x] atom feed [x] tags @@ -23,7 +22,7 @@ [x] fix update font [x] localisation [x] site translations -[ ] opengraph +[ ] projects page [ ] more badges [ ] harbor valorant [ ] update serving https badges better thumb LOL @@ -34,7 +33,7 @@ [ ] clean up css [ ] move routes to own file [ ] credits -[ ] homepage revamp +[ ] finger link/widget/iframe (like a terminal...)? [ ] more atom feeds [ ] comments [ ] brush font PLZ diff --git a/resources/de/base.ftl b/resources/de/base.ftl index 69699de..aba1193 100644 --- a/resources/de/base.ftl +++ b/resources/de/base.ftl @@ -1,4 +1,5 @@ title = Celestes Festplatte +title-about = Über Celeste title-blog = Celestes Blog title-poetry = Celestes Poesie branch = Kirschblütenzweig diff --git a/resources/en/about.ftl b/resources/en/about.ftl new file mode 100644 index 0000000..37a2129 --- /dev/null +++ b/resources/en/about.ftl @@ -0,0 +1,5 @@ +title-about = About Celeste +about-content = +

Celeste P. Blossom is a writer of text, code, poetry, and sometimes all three at the same time. Glossier + pseudo-pseudo-intellectual, hi-5, member of the blogosphere, advocate for the D.I.Y. web and libre software. She is + currently having the most insufferable conversation in a bus somewhere.

diff --git a/resources/fr/base.ftl b/resources/fr/base.ftl index 92a4284..894ebec 100644 --- a/resources/fr/base.ftl +++ b/resources/fr/base.ftl @@ -1,4 +1,5 @@ title = Disque Dur de Céleste +title-about = À propos de Céleste title-blog = Blog de Céleste title-poetry = Poésie de Céleste branch = Branche de cerisier en fleurs diff --git a/resources/ja/base.ftl b/resources/ja/base.ftl index 5ec8286..4ed6620 100644 --- a/resources/ja/base.ftl +++ b/resources/ja/base.ftl @@ -1,4 +1,5 @@ title = しゅんらいのハードドライブ +title-about = しゅんらいについて title-blog = しゅんらいのブログ title-poetry = しゅんらいの詩 branch = 桜の枝 diff --git a/resources/pt/base.ftl b/resources/pt/base.ftl index d58fa66..12b54ae 100644 --- a/resources/pt/base.ftl +++ b/resources/pt/base.ftl @@ -1,4 +1,5 @@ title = Disco Rígido da Celeste +title-about = Sobre Celeste title-blog = Blog da Celeste title-poetry = Poesia da Celeste branch = Ramo de cerejeira em flor diff --git a/resources/zh/base.ftl b/resources/zh/base.ftl index 3a4700a..e1b2b2b 100644 --- a/resources/zh/base.ftl +++ b/resources/zh/base.ftl @@ -1,4 +1,5 @@ title = 春雷的硬盘 +title-about = 关于春雷 title-blog = 春雷的博客 title-poetry = 春雷的诗歌 branch = 樱花枝 diff --git a/src/main.rs b/src/main.rs index 7253a16..0f14e3c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -159,6 +159,14 @@ async fn contact(locale: Locale) -> templates::Contact { } } +#[handler] +async fn about(locale: Locale) -> templates::About { + templates::About { + title: locale.text("title-about").unwrap(), + locale, + } +} + #[handler] async fn plants() -> Result<()> { Err(BlossomError::Unimplemented) @@ -229,6 +237,7 @@ async fn main() -> std::result::Result<(), std::io::Error> { .at("/poetry/:poem", get(get_poem)) .at("/feed", get(feed)) .at("/contact", get(contact)) + .at("/about", get(about)) .at("/plants", get(plants)) .nest("/static/", EmbeddedFilesEndpoint::::new()) .catch_all_error(custom_error) diff --git a/src/templates.rs b/src/templates.rs index 66462eb..b4ea98d 100644 --- a/src/templates.rs +++ b/src/templates.rs @@ -28,6 +28,13 @@ pub struct Home { pub locale: Locale, } +#[derive(Template)] +#[template(path = "about.html")] +pub struct About { + pub title: String, + pub locale: Locale, +} + #[derive(Template)] #[template(path = "blogpost.html")] pub struct Blogpost { diff --git a/templates/about.html b/templates/about.html new file mode 100644 index 0000000..e7226a8 --- /dev/null +++ b/templates/about.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} + +{% block nav_about %}active{% endblock %} + +{% block header %} + +
+
+

{{ locale.text("name").unwrap() }}

+
+
+ +{% endblock header %} + +{% block content %} + +
+ {{ locale.text("about-content").unwrap()|safe }} +
+ +{% endblock content %} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 36cb4c1..6761f83 100644 --- a/templates/base.html +++ b/templates/base.html @@ -47,6 +47,7 @@