commit d3e0f7a
Yonle
·
2023-07-18 14:16:22 +0000 UTC
parent fe0d820
html.c: custom emoji <img>: Resize height to 2em, and put veritcal-align to middle. Signed-off-by: Yonle <yonle@lecturify.net>
1 files changed,
+2,
-2
M
html.c
M
html.c
+2,
-2
1@@ -66,7 +66,7 @@ xs_str *actor_name(xs_dict *actor)
2
3 if (n && i) {
4 char *u = xs_dict_get(i, "url");
5- xs *img = xs_fmt("<img src=\"%s\" style=\"height: 1em\" loading=\"lazy\"/>", u);
6+ xs *img = xs_fmt("<img src=\"%s\" style=\"height: 1em; vertical-align: middle;\" loading=\"lazy\"/>", u);
7
8 name = xs_replace_i(name, n, img);
9 }
10@@ -1037,7 +1037,7 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
11
12 if (n && i) {
13 char *u = xs_dict_get(i, "url");
14- xs *img = xs_fmt("<img src=\"%s\" style=\"height: 1em\" "
15+ xs *img = xs_fmt("<img src=\"%s\" style=\"height: 2em; vertical-align: middle;\" "
16 "loading=\"lazy\" title=\"%s\"/>", u, n);
17
18 c = xs_replace_i(c, n, img);