diff options
| -rw-r--r-- | html.c | 38 |
1 files changed, 38 insertions, 0 deletions
| @@ -3363,6 +3363,44 @@ xs_html *html_people_list(snac *user, xs_list *list, const char *header, const c | |||
| 3363 | xs_html_attr("class", "snac-metadata")); | 3363 | xs_html_attr("class", "snac-metadata")); |
| 3364 | 3364 | ||
| 3365 | int count = 0; | 3365 | int count = 0; |
| 3366 | const xs_val *address = xs_dict_get(actor, "vcard:Address"); | ||
| 3367 | if (xs_is_string(address)) { | ||
| 3368 | xs_html_add(snac_metadata, | ||
| 3369 | xs_html_tag("span", | ||
| 3370 | xs_html_attr("class", "snac-property-name"), | ||
| 3371 | xs_html_raw("📍 Location")), | ||
| 3372 | xs_html_text(":"), | ||
| 3373 | xs_html_raw(" "), | ||
| 3374 | xs_html_tag("span", | ||
| 3375 | xs_html_attr("class", "snac-property-value p-adr"), | ||
| 3376 | xs_html_text(address)), | ||
| 3377 | xs_html_sctag("br", NULL)); | ||
| 3378 | |||
| 3379 | count++; | ||
| 3380 | } | ||
| 3381 | |||
| 3382 | const xs_val *birthday = xs_dict_get(actor, "vcard:bday"); | ||
| 3383 | if (xs_is_string(birthday)) { | ||
| 3384 | xs_html_add(snac_metadata, | ||
| 3385 | xs_html_tag("span", | ||
| 3386 | xs_html_attr("class", "snac-property-name"), | ||
| 3387 | xs_html_raw("🎂 Birthday")), | ||
| 3388 | xs_html_text(":"), | ||
| 3389 | xs_html_raw(" "), | ||
| 3390 | xs_html_tag("time", | ||
| 3391 | xs_html_attr("class", "snac-property-value dt-bday"), | ||
| 3392 | xs_html_text(birthday)), | ||
| 3393 | xs_html_sctag("br", NULL)); | ||
| 3394 | |||
| 3395 | count++; | ||
| 3396 | } | ||
| 3397 | |||
| 3398 | if (count > 0) { | ||
| 3399 | xs_html_add(snac_metadata, | ||
| 3400 | xs_html_sctag("hr", | ||
| 3401 | xs_html_attr("class", "snac-property-divider"))); | ||
| 3402 | } | ||
| 3403 | |||
| 3366 | const xs_val *v; | 3404 | const xs_val *v; |
| 3367 | const xs_list *attachment = xs_dict_get(actor, "attachment"); | 3405 | const xs_list *attachment = xs_dict_get(actor, "attachment"); |
| 3368 | xs_list_foreach(attachment, v) { | 3406 | xs_list_foreach(attachment, v) { |