summaryrefslogtreecommitdiffstats
path: root/src/components/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/mod.rs')
-rw-r--r--src/components/mod.rs23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/components/mod.rs b/src/components/mod.rs
index e3cd604..9527972 100644
--- a/src/components/mod.rs
+++ b/src/components/mod.rs
@@ -226,11 +226,18 @@ pub fn HTPage<'a, Children: render::Render>(
<>
<a
href={"/notifications"}
- class={if login.user.has_unread_notifications { "notification-indicator unread" } else { "notification-indicator" }}
>
- {"🔔︎"}
+ {
+ if login.user.has_unread_notifications {
+ hitide_icons::NOTIFICATIONS_SOME.img()
+ } else {
+ hitide_icons::NOTIFICATIONS.img()
+ }
+ }
+ </a>
+ <a href={format!("/users/{}", login.user.id)}>
+ {hitide_icons::PERSON.img()}
</a>
- <a href={format!("/users/{}", login.user.id)}>{"👤︎"}</a>
</>
})
} else {
@@ -501,3 +508,13 @@ impl<'a> render::Render for NotificationItem<'a> {
write!(writer, "</li>")
}
}
+
+trait IconExt {
+ fn img(&self) -> render::SimpleElement<()>;
+}
+
+impl IconExt for hitide_icons::Icon {
+ fn img(&self) -> render::SimpleElement<()> {
+ render::rsx! { <img src={format!("/static/{}", self.path)} class={"icon"} /> }
+ }
+}