mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
Show the "Search results for #tag" title.
This commit is contained in:
parent
8417a80fec
commit
42629c9742
1 changed files with 11 additions and 8 deletions
15
html.c
15
html.c
|
@ -241,7 +241,7 @@ xs_str *html_base_header(xs_str *s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
xs_str *html_instance_header(xs_str *s)
|
xs_str *html_instance_header(xs_str *s, char *tag)
|
||||||
{
|
{
|
||||||
s = html_base_header(s);
|
s = html_base_header(s);
|
||||||
|
|
||||||
|
@ -304,8 +304,10 @@ xs_str *html_instance_header(xs_str *s)
|
||||||
s = xs_str_cat(s, "</div>\n");
|
s = xs_str_cat(s, "</div>\n");
|
||||||
|
|
||||||
{
|
{
|
||||||
xs *s1 = xs_fmt("<h2 class=\"snac-header\">%s</h2>\n",
|
xs *l = tag ? xs_fmt(L("Search results for #%s"), tag) :
|
||||||
L("Recent posts by users in this instance"));
|
xs_dup(L("Recent posts by users in this instance"));
|
||||||
|
|
||||||
|
xs *s1 = xs_fmt("<h2 class=\"snac-header\">%s</h2>\n", l);
|
||||||
s = xs_str_cat(s, s1);
|
s = xs_str_cat(s, s1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1554,7 +1556,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int local,
|
||||||
if (user)
|
if (user)
|
||||||
s = html_user_header(user, s, local);
|
s = html_user_header(user, s, local);
|
||||||
else
|
else
|
||||||
s = html_instance_header(s);
|
s = html_instance_header(s, tag);
|
||||||
|
|
||||||
if (user && !local)
|
if (user && !local)
|
||||||
s = html_top_controls(user, s);
|
s = html_top_controls(user, s);
|
||||||
|
@ -1631,14 +1633,15 @@ xs_str *html_timeline(snac *user, const xs_list *list, int local,
|
||||||
if (show_more) {
|
if (show_more) {
|
||||||
xs *t = NULL;
|
xs *t = NULL;
|
||||||
xs *m = NULL;
|
xs *m = NULL;
|
||||||
|
xs *ss = xs_fmt("skip=%d&show=%d", skip + show, show);
|
||||||
|
|
||||||
if (tag) {
|
if (tag) {
|
||||||
t = xs_fmt("%s?t=%s", srv_baseurl, tag);
|
t = xs_fmt("%s?t=%s", srv_baseurl, tag);
|
||||||
m = xs_fmt("%s&skip=%d&show=%d", t, skip + show, show);
|
m = xs_fmt("%s&%s", t, ss);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
t = xs_fmt("%s%s", user ? user->actor : srv_baseurl, local ? "" : "/admin");
|
t = xs_fmt("%s%s", user ? user->actor : srv_baseurl, local ? "" : "/admin");
|
||||||
m = xs_fmt("%s?&skip=%d&show=%d", t, skip + show, show);
|
m = xs_fmt("%s?%s", t, ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
xs *s1 = xs_fmt(
|
xs *s1 = xs_fmt(
|
||||||
|
|
Loading…
Reference in a new issue