mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
Show the avatar in the nav menu.
This commit is contained in:
parent
188d224e35
commit
9d02e70a2f
1 changed files with 14 additions and 0 deletions
14
html.c
14
html.c
|
@ -210,6 +210,20 @@ d_char *html_user_header(snac *snac, d_char *s, int local)
|
|||
/* top nav */
|
||||
s = xs_str_cat(s, "<nav class=\"snac-top-nav\">");
|
||||
|
||||
{
|
||||
xs *s1;
|
||||
xs *avatar = xs_dup(xs_dict_get(snac->config, "avatar"));
|
||||
|
||||
if (avatar == NULL || *avatar == '\0') {
|
||||
xs_free(avatar);
|
||||
avatar = xs_fmt("data:image/png;base64, %s", default_avatar_base64());
|
||||
}
|
||||
|
||||
s1 = xs_fmt("<img src=\"%s\" class=\"snac-avatar\" alt=\"\"/> ", avatar);
|
||||
|
||||
s = xs_str_cat(s, s1);
|
||||
}
|
||||
|
||||
{
|
||||
xs *s1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue