aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgreen <dandelions@disroot.org>2025-06-16 19:41:14 +0200
committergreen <dandelions@disroot.org>2025-11-14 17:22:00 +0100
commit380e5b397ef070061cd4393d529bd6d0f0d3eb0b (patch)
tree65682f8cd06d135964a66c70bf94d1e5b32ce716
parentcda6bc96a57b0829425af96bba28368f70c184e4 (diff)
metadata: location and bday properties
-rw-r--r--html.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/html.c b/html.c
index 1c0530f..f8e34f2 100644
--- a/html.c
+++ b/html.c
@@ -3363,6 +3363,44 @@ xs_html *html_people_list(snac *user, xs_list *list, const char *header, const c
xs_html_attr("class", "snac-metadata"));
int count = 0;
+ const xs_val *address = xs_dict_get(actor, "vcard:Address");
+ if (xs_is_string(address)) {
+ xs_html_add(snac_metadata,
+ xs_html_tag("span",
+ xs_html_attr("class", "snac-property-name"),
+ xs_html_raw("&#x1F4CD; Location")),
+ xs_html_text(":"),
+ xs_html_raw("&nbsp;"),
+ xs_html_tag("span",
+ xs_html_attr("class", "snac-property-value p-adr"),
+ xs_html_text(address)),
+ xs_html_sctag("br", NULL));
+
+ count++;
+ }
+
+ const xs_val *birthday = xs_dict_get(actor, "vcard:bday");
+ if (xs_is_string(birthday)) {
+ xs_html_add(snac_metadata,
+ xs_html_tag("span",
+ xs_html_attr("class", "snac-property-name"),
+ xs_html_raw("&#x1F382; Birthday")),
+ xs_html_text(":"),
+ xs_html_raw("&nbsp;"),
+ xs_html_tag("time",
+ xs_html_attr("class", "snac-property-value dt-bday"),
+ xs_html_text(birthday)),
+ xs_html_sctag("br", NULL));
+
+ count++;
+ }
+
+ if (count > 0) {
+ xs_html_add(snac_metadata,
+ xs_html_sctag("hr",
+ xs_html_attr("class", "snac-property-divider")));
+ }
+
const xs_val *v;
const xs_list *attachment = xs_dict_get(actor, "attachment");
xs_list_foreach(attachment, v) {