diff options
| author | 2023-11-27 21:14:27 +0100 | |
|---|---|---|
| committer | 2023-11-27 21:14:27 +0100 | |
| commit | 800bb0123df6abb20e5b06f739ba3917ba3a0b86 (patch) | |
| tree | d6d73dbda472cfd0945602ea4f369b1b50adaf9c /html.c | |
| parent | New function html_user_head(). (diff) | |
| download | snac2-800bb0123df6abb20e5b06f739ba3917ba3a0b86.tar.gz snac2-800bb0123df6abb20e5b06f739ba3917ba3a0b86.tar.xz snac2-800bb0123df6abb20e5b06f739ba3917ba3a0b86.zip | |
Minor html_entry() tweaks.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 17 |
1 files changed, 9 insertions, 8 deletions
| @@ -500,6 +500,7 @@ xs_html *html_instance_body(char *tag) | |||
| 500 | 500 | ||
| 501 | 501 | ||
| 502 | static xs_str *html_instance_header(xs_str *s, char *tag) | 502 | static xs_str *html_instance_header(xs_str *s, char *tag) |
| 503 | /* TO BE REPLACED BY html_instance_body() */ | ||
| 503 | { | 504 | { |
| 504 | xs_html *head = html_instance_head(); | 505 | xs_html *head = html_instance_head(); |
| 505 | 506 | ||
| @@ -1249,14 +1250,6 @@ xs_str *html_entry(snac *user, xs_str *os, const xs_dict *msg, int local, | |||
| 1249 | if (level >= 256) | 1250 | if (level >= 256) |
| 1250 | return os; | 1251 | return os; |
| 1251 | 1252 | ||
| 1252 | xs *s = xs_str_new("<div>\n"); | ||
| 1253 | |||
| 1254 | { | ||
| 1255 | xs *s1 = xs_fmt("<a name=\"%s_entry\"></a>\n", md5); | ||
| 1256 | |||
| 1257 | s = xs_str_cat(s, s1); | ||
| 1258 | } | ||
| 1259 | |||
| 1260 | if (strcmp(type, "Follow") == 0) { | 1253 | if (strcmp(type, "Follow") == 0) { |
| 1261 | xs_html *h = xs_html_tag("div", | 1254 | xs_html *h = xs_html_tag("div", |
| 1262 | xs_html_attr("class", "snac-post"), | 1255 | xs_html_attr("class", "snac-post"), |
| @@ -1292,6 +1285,14 @@ xs_str *html_entry(snac *user, xs_str *os, const xs_dict *msg, int local, | |||
| 1292 | && !valid_status(actor_get(actor, NULL))) | 1285 | && !valid_status(actor_get(actor, NULL))) |
| 1293 | return os; | 1286 | return os; |
| 1294 | 1287 | ||
| 1288 | xs *s = xs_str_new("<div>\n"); | ||
| 1289 | |||
| 1290 | { | ||
| 1291 | xs *s1 = xs_fmt("<a name=\"%s_entry\"></a>\n", md5); | ||
| 1292 | |||
| 1293 | s = xs_str_cat(s, s1); | ||
| 1294 | } | ||
| 1295 | |||
| 1295 | if (level == 0) | 1296 | if (level == 0) |
| 1296 | s = xs_str_cat(s, "<div class=\"snac-post\">\n"); /** **/ | 1297 | s = xs_str_cat(s, "<div class=\"snac-post\">\n"); /** **/ |
| 1297 | else | 1298 | else |