diff options
author | default <nobody@localhost> | 2023-08-14 15:00:46 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-08-14 15:00:46 +0200 |
commit | 2696f62dc5ec772c0a5ae3bfaf58c2e8cb1a5306 (patch) | |
tree | 87f93799f343e83d989fb22d51053f01641204a3 | |
parent | f09340c352c36eceb8befd2466820a6e60aeb9ba (diff) |
If the user has a header image, show it the public page.
-rw-r--r-- | html.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -459,8 +459,19 @@ xs_str *html_user_header(snac *snac, xs_str *s, int local) /* user info */ { - char *_tmpl = - "<div class=\"h-card snac-top-user\">\n" + s = xs_str_cat(s, "<div class=\"h-card snac-top-user\">\n"); + + if (local) { + const char *header = xs_dict_get(snac->config, "header"); + if (header && *header) { + xs *h = encode_html(header); + xs *s1 = xs_fmt("<div class=\"snac-top-user-banner\" style=\"clear: both\">" + "<br><img src=\"%s\"/></div>\n", h); + s = xs_str_cat(s, s1); + } + } + + const char *_tmpl = "<p class=\"p-name snac-top-user-name\">%s</p>\n" "<p class=\"snac-top-user-id\">@%s@%s</p>\n"; |