commit 8b4ae8b
default
·
2023-11-23 21:05:31 +0000 UTC
parent cac1ce0
html_footer() is pure xs_html.
1 files changed,
+17,
-9
M
html.c
M
html.c
+17,
-9
1@@ -1702,9 +1702,9 @@ xs_str *html_entry(snac *user, xs_str *os, const xs_dict *msg, int local,
2 }
3
4
5-xs_str *html_footer(xs_str *s)
6+xs_html *html_footer(void)
7 {
8- xs_html *footer = xs_html_tag("div",
9+ return xs_html_tag("div",
10 xs_html_attr("class", "snac-footer"),
11 xs_html_tag("a",
12 xs_html_attr("href", srv_baseurl),
13@@ -1716,10 +1716,6 @@ xs_str *html_footer(xs_str *s)
14 xs_html_tag("abbr",
15 xs_html_attr("title", "Social Network Are Crap"),
16 xs_html_text("snac"))));
17-
18- xs *s1 = xs_html_render(footer);
19-
20- return xs_str_cat(s, s1, "\n");
21 }
22
23
24@@ -1840,7 +1836,11 @@ xs_str *html_timeline(snac *user, const xs_list *list, int local,
25 s = xs_str_cat(s, s1);
26 }
27
28- s = html_footer(s);
29+ {
30+ xs_html *h = html_footer();
31+ xs *s1 = xs_html_render(h);
32+ s = xs_str_cat(s, s1);
33+ }
34
35 s = xs_str_cat(s, "</body>\n</html>\n");
36
37@@ -1989,7 +1989,11 @@ xs_str *html_people(snac *snac)
38 s = xs_str_cat(s, s1);
39 }
40
41- s = html_footer(s);
42+ {
43+ xs_html *h = html_footer();
44+ xs *s1 = xs_html_render(h);
45+ s = xs_str_cat(s, s1);
46+ }
47
48 s = xs_str_cat(s, "</body>\n</html>\n");
49
50@@ -2116,7 +2120,11 @@ xs_str *html_notifications(snac *snac)
51 else
52 s = xs_str_cat(s, "</div>\n");
53
54- s = html_footer(s);
55+ {
56+ xs_html *h = html_footer();
57+ xs *s1 = xs_html_render(h);
58+ s = xs_str_cat(s, s1);
59+ }
60
61 s = xs_str_cat(s, "</body>\n</html>\n");
62