diff options
| author | 2023-11-23 22:05:31 +0100 | |
|---|---|---|
| committer | 2023-11-23 22:05:31 +0100 | |
| commit | 8b4ae8b1a08a758eae5f4487d5a9207d422f4e5b (patch) | |
| tree | a9d65bb1d5b5b0054734fb0eb4a9bc86626e17b9 /html.c | |
| parent | html_people_list() returns an xs_html. (diff) | |
| download | snac2-8b4ae8b1a08a758eae5f4487d5a9207d422f4e5b.tar.gz snac2-8b4ae8b1a08a758eae5f4487d5a9207d422f4e5b.tar.xz snac2-8b4ae8b1a08a758eae5f4487d5a9207d422f4e5b.zip | |
html_footer() is pure xs_html.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 26 |
1 files changed, 17 insertions, 9 deletions
| @@ -1702,9 +1702,9 @@ xs_str *html_entry(snac *user, xs_str *os, const xs_dict *msg, int local, | |||
| 1702 | } | 1702 | } |
| 1703 | 1703 | ||
| 1704 | 1704 | ||
| 1705 | xs_str *html_footer(xs_str *s) | 1705 | xs_html *html_footer(void) |
| 1706 | { | 1706 | { |
| 1707 | xs_html *footer = xs_html_tag("div", | 1707 | return xs_html_tag("div", |
| 1708 | xs_html_attr("class", "snac-footer"), | 1708 | xs_html_attr("class", "snac-footer"), |
| 1709 | xs_html_tag("a", | 1709 | xs_html_tag("a", |
| 1710 | xs_html_attr("href", srv_baseurl), | 1710 | xs_html_attr("href", srv_baseurl), |
| @@ -1716,10 +1716,6 @@ xs_str *html_footer(xs_str *s) | |||
| 1716 | xs_html_tag("abbr", | 1716 | xs_html_tag("abbr", |
| 1717 | xs_html_attr("title", "Social Network Are Crap"), | 1717 | xs_html_attr("title", "Social Network Are Crap"), |
| 1718 | xs_html_text("snac")))); | 1718 | xs_html_text("snac")))); |
| 1719 | |||
| 1720 | xs *s1 = xs_html_render(footer); | ||
| 1721 | |||
| 1722 | return xs_str_cat(s, s1, "\n"); | ||
| 1723 | } | 1719 | } |
| 1724 | 1720 | ||
| 1725 | 1721 | ||
| @@ -1840,7 +1836,11 @@ xs_str *html_timeline(snac *user, const xs_list *list, int local, | |||
| 1840 | s = xs_str_cat(s, s1); | 1836 | s = xs_str_cat(s, s1); |
| 1841 | } | 1837 | } |
| 1842 | 1838 | ||
| 1843 | s = html_footer(s); | 1839 | { |
| 1840 | xs_html *h = html_footer(); | ||
| 1841 | xs *s1 = xs_html_render(h); | ||
| 1842 | s = xs_str_cat(s, s1); | ||
| 1843 | } | ||
| 1844 | 1844 | ||
| 1845 | s = xs_str_cat(s, "</body>\n</html>\n"); | 1845 | s = xs_str_cat(s, "</body>\n</html>\n"); |
| 1846 | 1846 | ||
| @@ -1989,7 +1989,11 @@ xs_str *html_people(snac *snac) | |||
| 1989 | s = xs_str_cat(s, s1); | 1989 | s = xs_str_cat(s, s1); |
| 1990 | } | 1990 | } |
| 1991 | 1991 | ||
| 1992 | s = html_footer(s); | 1992 | { |
| 1993 | xs_html *h = html_footer(); | ||
| 1994 | xs *s1 = xs_html_render(h); | ||
| 1995 | s = xs_str_cat(s, s1); | ||
| 1996 | } | ||
| 1993 | 1997 | ||
| 1994 | s = xs_str_cat(s, "</body>\n</html>\n"); | 1998 | s = xs_str_cat(s, "</body>\n</html>\n"); |
| 1995 | 1999 | ||
| @@ -2116,7 +2120,11 @@ xs_str *html_notifications(snac *snac) | |||
| 2116 | else | 2120 | else |
| 2117 | s = xs_str_cat(s, "</div>\n"); | 2121 | s = xs_str_cat(s, "</div>\n"); |
| 2118 | 2122 | ||
| 2119 | s = html_footer(s); | 2123 | { |
| 2124 | xs_html *h = html_footer(); | ||
| 2125 | xs *s1 = xs_html_render(h); | ||
| 2126 | s = xs_str_cat(s, s1); | ||
| 2127 | } | ||
| 2120 | 2128 | ||
| 2121 | s = xs_str_cat(s, "</body>\n</html>\n"); | 2129 | s = xs_str_cat(s, "</body>\n</html>\n"); |
| 2122 | 2130 | ||