mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 14:35:04 +00:00
Conversations can be collapsed.
This commit is contained in:
parent
294e183ec7
commit
e31734c06a
1 changed files with 7 additions and 2 deletions
9
html.c
9
html.c
|
@ -758,13 +758,17 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, int local, int level, cons
|
|||
if (left) {
|
||||
char *p, *cmd5;
|
||||
|
||||
s = xs_str_cat(s, "<details open><summary>...</summary><p>\n");
|
||||
|
||||
if (level < 4)
|
||||
s = xs_str_cat(s, "<div class=\"snac-children\">\n");
|
||||
else
|
||||
s = xs_str_cat(s, "<div>\n");
|
||||
|
||||
if (left > 3)
|
||||
s = xs_str_cat(s, "<details><summary>...</summary>\n");
|
||||
if (left > 3) {
|
||||
xs *s1 = xs_fmt("<details><summary>%s</summary>\n", L("Older..."));
|
||||
s = xs_str_cat(s, s1);
|
||||
}
|
||||
|
||||
p = children;
|
||||
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, "</details>\n");
|
||||
}
|
||||
|
||||
s = xs_str_cat(s, "</div>\n</div>\n");
|
||||
|
|
Loading…
Reference in a new issue