From 784557eecfdd1f40a539a0b1dca9d7c09b15d945 Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 17 Apr 2024 15:29:25 +0200 Subject: [PATCH] feat(web): font, emojis, better spacing --- web/index.html | 45 +++++++++++++++++++++++++++++++++++++++++++++ web/src/lib.rs | 18 +++++++++--------- web/src/main.rs | 2 +- 3 files changed, 55 insertions(+), 10 deletions(-) diff --git a/web/index.html b/web/index.html index 8406bb9e..89c07cba 100644 --- a/web/index.html +++ b/web/index.html @@ -12,14 +12,38 @@ + + + diff --git a/web/src/lib.rs b/web/src/lib.rs index c51a6759..615e7b0a 100644 --- a/web/src/lib.rs +++ b/web/src/lib.rs @@ -248,7 +248,7 @@ pub fn UserPage() -> impl IntoView { } }); view! { -
+
view::user
{move || match actor.get() { @@ -304,7 +304,7 @@ pub fn ObjectPage() -> impl IntoView { } }); view! { -
+
view::object
{move || match object.get() { @@ -375,11 +375,11 @@ pub fn InlineActivity(activity: serde_json::Value) -> impl IntoView { None => serde_json::Value::String(actor_id.clone()), }; let privacy = if addressed.iter().any(|x| x == apb::target::PUBLIC) { - "[public]" + "🌐" } else if addressed.iter().any(|x| x.ends_with("/followers")) { - "[followers]" + "👥" } else { - "[private]" + "🔒" }; let date = object.published().map(|x| x.format("%Y/%m/%d %H:%M:%S").to_string()).unwrap_or_else(|| activity.published().map(|x| x.format("%Y/%m/%d %H:%M:%S").to_string()).unwrap_or_default() @@ -393,8 +393,8 @@ pub fn InlineActivity(activity: serde_json::Value) -> impl IntoView { - {privacy} - {kind.as_ref().to_string()} + {kind.as_ref().to_string()} + {privacy} @@ -417,7 +417,7 @@ pub fn InlineActivity(activity: serde_json::Value) -> impl IntoView { #[component] pub fn About() -> impl IntoView { view! { -
+
landing
nothing to see here! pick a timeline to start browsing @@ -433,7 +433,7 @@ struct OmgReqwestErrorIsNotClonable(String); #[component] pub fn TimelinePage(name: &'static str, tl: Timeline) -> impl IntoView { view! { -
+
{name}
diff --git a/web/src/main.rs b/web/src/main.rs index e8d9e081..804407f1 100644 --- a/web/src/main.rs +++ b/web/src/main.rs @@ -37,7 +37,7 @@ fn main() { move || view! {