From 2696f62dc5ec772c0a5ae3bfaf58c2e8cb1a5306 Mon Sep 17 00:00:00 2001 From: default Date: Mon, 14 Aug 2023 15:00:46 +0200 Subject: [PATCH] If the user has a header image, show it the public page. --- html.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/html.c b/html.c index 1b0e7c7..79b833a 100644 --- a/html.c +++ b/html.c @@ -459,8 +459,19 @@ xs_str *html_user_header(snac *snac, xs_str *s, int local) /* user info */ { - char *_tmpl = - "
\n" + s = xs_str_cat(s, "
\n"); + + if (local) { + const char *header = xs_dict_get(snac->config, "header"); + if (header && *header) { + xs *h = encode_html(header); + xs *s1 = xs_fmt("
" + "
\n", h); + s = xs_str_cat(s, s1); + } + } + + const char *_tmpl = "

%s

\n" "

@%s@%s

\n";