diff options
| author | 2025-03-23 02:32:47 +0100 | |
|---|---|---|
| committer | 2025-04-13 14:58:24 +0200 | |
| commit | 1a6c3c5e815933e42f1b0be0e0fa2d44ac78036b (patch) | |
| tree | 089366cc2ac85f6cb0e33bfca9ed64e1921b0b67 /html.c | |
| parent | emoji: refactor + emoji in display names on front page (diff) | |
| download | snac2-1a6c3c5e815933e42f1b0be0e0fa2d44ac78036b.tar.gz snac2-1a6c3c5e815933e42f1b0be0e0fa2d44ac78036b.tar.xz snac2-1a6c3c5e815933e42f1b0be0e0fa2d44ac78036b.zip | |
better control over the emoji class
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -69,6 +69,7 @@ xs_str *replace_shortnames(xs_str *s, const xs_list *tag, int ems, const char *p | |||
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | xs *style = xs_fmt("height: %dem; width: %dem; vertical-align: middle;", ems, ems); | 71 | xs *style = xs_fmt("height: %dem; width: %dem; vertical-align: middle;", ems, ems); |
| 72 | xs *class = xs_fmt("snac-emoji snac-emoji-%d-em", ems); | ||
| 72 | 73 | ||
| 73 | const xs_dict *v; | 74 | const xs_dict *v; |
| 74 | int c = 0; | 75 | int c = 0; |
| @@ -108,7 +109,7 @@ xs_str *replace_shortnames(xs_str *s, const xs_list *tag, int ems, const char *p | |||
| 108 | xs_html_attr("src", url), | 109 | xs_html_attr("src", url), |
| 109 | xs_html_attr("alt", n), | 110 | xs_html_attr("alt", n), |
| 110 | xs_html_attr("title", n), | 111 | xs_html_attr("title", n), |
| 111 | xs_html_attr("class", "snac-emoji"), | 112 | xs_html_attr("class", class), |
| 112 | xs_html_attr("style", style)); | 113 | xs_html_attr("style", style)); |
| 113 | 114 | ||
| 114 | xs *s1 = xs_html_render(img); | 115 | xs *s1 = xs_html_render(img); |