mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-29 07:53:37 +00:00
Added a title to list timelines.
This commit is contained in:
parent
3355d5559d
commit
d3cdbf1702
1 changed files with 10 additions and 1 deletions
11
html.c
11
html.c
|
@ -2034,6 +2034,13 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only,
|
||||||
xs_html_add(body,
|
xs_html_add(body,
|
||||||
html_top_controls(user));
|
html_top_controls(user));
|
||||||
|
|
||||||
|
if (user && title) {
|
||||||
|
xs_html_add(body,
|
||||||
|
xs_html_tag("h2",
|
||||||
|
xs_html_attr("class", "snac-header"),
|
||||||
|
xs_html_text(title)));
|
||||||
|
}
|
||||||
|
|
||||||
xs_html_add(body,
|
xs_html_add(body,
|
||||||
xs_html_tag("a",
|
xs_html_tag("a",
|
||||||
xs_html_attr("name", "snac-posts")));
|
xs_html_attr("name", "snac-posts")));
|
||||||
|
@ -2666,9 +2673,11 @@ int html_get_handler(const xs_dict *req, const char *q_path,
|
||||||
|
|
||||||
if (list != NULL) {
|
if (list != NULL) {
|
||||||
xs *base = xs_fmt("/list/%s", lid);
|
xs *base = xs_fmt("/list/%s", lid);
|
||||||
|
xs *name = list_maint(&snac, lid, 3);
|
||||||
|
xs *title = xs_fmt(L("Showing timeline for list %s"), name);
|
||||||
|
|
||||||
*body = html_timeline(&snac, list, 0, skip, show,
|
*body = html_timeline(&snac, list, 0, skip, show,
|
||||||
xs_list_len(next), NULL, base, 1);
|
xs_list_len(next), title, base, 1);
|
||||||
*b_size = strlen(*body);
|
*b_size = strlen(*body);
|
||||||
status = 200;
|
status = 200;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue