Conversations can be collapsed.

This commit is contained in:
default 2022-12-18 06:10:50 +01:00
parent 294e183ec7
commit e31734c06a

9
html.c
View File

@ -758,13 +758,17 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, int local, int level, cons
if (left) { if (left) {
char *p, *cmd5; char *p, *cmd5;
s = xs_str_cat(s, "<details open><summary>...</summary><p>\n");
if (level < 4) if (level < 4)
s = xs_str_cat(s, "<div class=\"snac-children\">\n"); s = xs_str_cat(s, "<div class=\"snac-children\">\n");
else else
s = xs_str_cat(s, "<div>\n"); s = xs_str_cat(s, "<div>\n");
if (left > 3) if (left > 3) {
s = xs_str_cat(s, "<details><summary>...</summary>\n"); xs *s1 = xs_fmt("<details><summary>%s</summary>\n", L("Older..."));
s = xs_str_cat(s, s1);
}
p = children; p = children;
while (xs_list_iter(&p, &cmd5)) { while (xs_list_iter(&p, &cmd5)) {
@ -783,6 +787,7 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, int local, int level, cons
} }
s = xs_str_cat(s, "</div>\n"); s = xs_str_cat(s, "</div>\n");
s = xs_str_cat(s, "</details>\n");
} }
s = xs_str_cat(s, "</div>\n</div>\n"); s = xs_str_cat(s, "</div>\n</div>\n");