diff options
| author | 2023-07-18 21:16:22 +0700 | |
|---|---|---|
| committer | 2023-07-18 21:16:22 +0700 | |
| commit | d3e0f7a84be573ee28ff1dd6ceb58677e653e178 (patch) | |
| tree | 985dfe4b16fe465f28b13cc6f275093a38d79617 | |
| parent | html.c / UX: Give admin page more space (diff) | |
| download | snac2-d3e0f7a84be573ee28ff1dd6ceb58677e653e178.tar.gz snac2-d3e0f7a84be573ee28ff1dd6ceb58677e653e178.tar.xz snac2-d3e0f7a84be573ee28ff1dd6ceb58677e653e178.zip | |
html.c: custom emoji <img>: Resize height to 2em, and put veritcal-align to middle.
Signed-off-by: Yonle <yonle@lecturify.net>
| -rw-r--r-- | html.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -66,7 +66,7 @@ xs_str *actor_name(xs_dict *actor) | |||
| 66 | 66 | ||
| 67 | if (n && i) { | 67 | if (n && i) { |
| 68 | char *u = xs_dict_get(i, "url"); | 68 | char *u = xs_dict_get(i, "url"); |
| 69 | xs *img = xs_fmt("<img src=\"%s\" style=\"height: 1em\" loading=\"lazy\"/>", u); | 69 | xs *img = xs_fmt("<img src=\"%s\" style=\"height: 1em; vertical-align: middle;\" loading=\"lazy\"/>", u); |
| 70 | 70 | ||
| 71 | name = xs_replace_i(name, n, img); | 71 | name = xs_replace_i(name, n, img); |
| 72 | } | 72 | } |
| @@ -1037,7 +1037,7 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local, | |||
| 1037 | 1037 | ||
| 1038 | if (n && i) { | 1038 | if (n && i) { |
| 1039 | char *u = xs_dict_get(i, "url"); | 1039 | char *u = xs_dict_get(i, "url"); |
| 1040 | xs *img = xs_fmt("<img src=\"%s\" style=\"height: 1em\" " | 1040 | xs *img = xs_fmt("<img src=\"%s\" style=\"height: 2em; vertical-align: middle;\" " |
| 1041 | "loading=\"lazy\" title=\"%s\"/>", u, n); | 1041 | "loading=\"lazy\" title=\"%s\"/>", u, n); |
| 1042 | 1042 | ||
| 1043 | c = xs_replace_i(c, n, img); | 1043 | c = xs_replace_i(c, n, img); |