From 8b4ae8b1a08a758eae5f4487d5a9207d422f4e5b Mon Sep 17 00:00:00 2001 From: default Date: Thu, 23 Nov 2023 22:05:31 +0100 Subject: [PATCH] html_footer() is pure xs_html. --- html.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/html.c b/html.c index c88952c..a8c0bdf 100644 --- a/html.c +++ b/html.c @@ -1702,9 +1702,9 @@ xs_str *html_entry(snac *user, xs_str *os, const xs_dict *msg, int local, } -xs_str *html_footer(xs_str *s) +xs_html *html_footer(void) { - xs_html *footer = xs_html_tag("div", + return xs_html_tag("div", xs_html_attr("class", "snac-footer"), xs_html_tag("a", xs_html_attr("href", srv_baseurl), @@ -1716,10 +1716,6 @@ xs_str *html_footer(xs_str *s) xs_html_tag("abbr", xs_html_attr("title", "Social Network Are Crap"), xs_html_text("snac")))); - - xs *s1 = xs_html_render(footer); - - return xs_str_cat(s, s1, "\n"); } @@ -1840,7 +1836,11 @@ xs_str *html_timeline(snac *user, const xs_list *list, int local, s = xs_str_cat(s, s1); } - s = html_footer(s); + { + xs_html *h = html_footer(); + xs *s1 = xs_html_render(h); + s = xs_str_cat(s, s1); + } s = xs_str_cat(s, "\n\n"); @@ -1989,7 +1989,11 @@ xs_str *html_people(snac *snac) s = xs_str_cat(s, s1); } - s = html_footer(s); + { + xs_html *h = html_footer(); + xs *s1 = xs_html_render(h); + s = xs_str_cat(s, s1); + } s = xs_str_cat(s, "\n\n"); @@ -2116,7 +2120,11 @@ xs_str *html_notifications(snac *snac) else s = xs_str_cat(s, "\n"); - s = html_footer(s); + { + xs_html *h = html_footer(); + xs *s1 = xs_html_render(h); + s = xs_str_cat(s, s1); + } s = xs_str_cat(s, "\n\n");