about summary refs log tree commit diff
path: root/kittybox-rs/templates/src
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2023-06-15 17:03:53 +0300
committerVika <vika@fireburn.ru>2023-06-15 17:03:53 +0300
commited7049048cc4d12422c07ddbaa15fbb3662c0260 (patch)
tree7dc37332b8868a7a7f067056026a8d662bc0571d /kittybox-rs/templates/src
parenteca7687439c2b6f804603de75501b6737a82e5a2 (diff)
Add support for the IndieWeb Webring πŸ•ΈπŸ’
Optional at first. Onboarding UI not yet exposed.
Diffstat (limited to 'kittybox-rs/templates/src')
-rw-r--r--kittybox-rs/templates/src/templates.rs31
1 files changed, 22 insertions, 9 deletions
diff --git a/kittybox-rs/templates/src/templates.rs b/kittybox-rs/templates/src/templates.rs
index ba52af7..10c84a7 100644
--- a/kittybox-rs/templates/src/templates.rs
+++ b/kittybox-rs/templates/src/templates.rs
@@ -63,18 +63,31 @@ markup::define! {
             }
         }
     }
-    MainPage<'a>(feed: &'a serde_json::Value, card: &'a serde_json::Value) {
+    MainPage<'a>(feed: &'a serde_json::Value, card: &'a serde_json::Value, webring: bool) {
         .sidebyside {
             @VCard { card }
             #dynamicstuff {
-                p { "This section will provide interesting statistics or tidbits about my life in this exact moment (with maybe a small delay)." }
-                p { "It will probably require JavaScript to self-update, but I promise to keep this widget lightweight and open-source!" }
-                p { small {
-                    "JavaScript isn't a menace, stop fearing it or I will switch to WebAssembly "
-                    "and knock your nico-nico-kneecaps so fast with its speed you won't even notice that... "
-                    small { "omae ha mou shindeiru" }
-                    @markup::raw("<!-- NANI?!!! -->")
-                } }
+                div {
+                    p { "This section will provide interesting statistics or tidbits about my life in this exact moment (with maybe a small delay)." }
+                    p { "It will probably require JavaScript to self-update, but I promise to keep this widget lightweight and open-source!" }
+                    p { small {
+                        "JavaScript isn't a menace, stop fearing it or I will switch to WebAssembly "
+                        "and knock your nico-nico-kneecaps so fast with its speed you won't even notice that... "
+                        small { "omae ha mou shindeiru" }
+                        @markup::raw("<!-- NANI?!!! -->")
+                    } }
+                }
+                @if *webring {
+                    #webring {
+                        a[href="https://xn--sr8hvo.ws/previous"] { "←" }
+                        " An "
+                        a[href="https://xn--sr8hvo.ws"] {
+                            "IndieWeb Webring"
+                        }
+                        " πŸ•ΈπŸ’ "
+                        a[href="https://xn--sr8hvo.ws/next"] { "β†’" }
+                    }
+                }
             }
         }
         @Feed { feed }