about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--kittybox-rs/templates/assets/style.css20
-rw-r--r--kittybox-rs/templates/src/mf2.rs8
2 files changed, 27 insertions, 1 deletions
diff --git a/kittybox-rs/templates/assets/style.css b/kittybox-rs/templates/assets/style.css
index a8ef6e4..b46dbf8 100644
--- a/kittybox-rs/templates/assets/style.css
+++ b/kittybox-rs/templates/assets/style.css
@@ -199,3 +199,23 @@ article.h-card img.u-photo {
     margin: 1.25rem;
     padding: .75rem;
 }
+
+/* Rainbow hearts */
+/* TODO make toggleable by splitting into separate CSS file */
+@counter-style rainbow-hearts {
+    system: cyclic;
+    symbols: "โค๏ธ" "๐Ÿงก" "๐Ÿ’›" "๐Ÿ’š" "๐Ÿ’™" "๐Ÿ’œ";
+}
+body {
+    counter-reset: like-icons;
+}
+span.like-icon::before {
+    counter-increment: like-icons;
+    content: "" counter(like-icons, rainbow-hearts);
+}
+span.like-icon-label {
+    display: none;
+}
+ul.h-feed {
+    list-style: none;
+}
diff --git a/kittybox-rs/templates/src/mf2.rs b/kittybox-rs/templates/src/mf2.rs
index 67d1f87..fd7eb1e 100644
--- a/kittybox-rs/templates/src/mf2.rs
+++ b/kittybox-rs/templates/src/mf2.rs
@@ -41,7 +41,13 @@ markup::define! {
                     }
                 }
                 @if let Some(likeof) = post["properties"]["like-of"][0].as_str() {
-                    " โค๏ธ "
+                    " "
+                    span."like-icon"["aria-label"="liked"] {
+                        span."like-icon-label"["aria-hidden"="true"] {
+                            "โค๏ธ"
+                        }
+                    }
+                    " "
                     a."u-like-of"[href=likeof] { @likeof }
                 } else if let Some(likeof) = post["properties"]["like-of"][0].as_object() {
                     a."u-like-of"[href=likeof["properties"]["url"][0].as_str().unwrap()] {