mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
Use xs_html in html_footer().
This commit is contained in:
parent
bc5d0d4ed0
commit
7dd1c8a1ba
1 changed files with 17 additions and 14 deletions
31
html.c
31
html.c
|
@ -144,11 +144,9 @@ xs_str *html_actor_icon(xs_str *os, char *actor,
|
||||||
if (!xs_is_null(udate)) {
|
if (!xs_is_null(udate)) {
|
||||||
xs *sd = xs_crop_i(xs_dup(udate), 0, 10);
|
xs *sd = xs_crop_i(xs_dup(udate), 0, 10);
|
||||||
|
|
||||||
date_label = xs_str_cat(date_label, " / ");
|
date_label = xs_str_cat(date_label, " / ", sd);
|
||||||
date_label = xs_str_cat(date_label, sd);
|
|
||||||
|
|
||||||
date_title = xs_str_cat(date_title, " / ");
|
date_title = xs_str_cat(date_title, " / ", udate);
|
||||||
date_title = xs_str_cat(date_title, udate);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
xs *edt = encode_html(date_title);
|
xs *edt = encode_html(date_title);
|
||||||
|
@ -1531,17 +1529,22 @@ xs_str *html_entry(snac *user, xs_str *os, const xs_dict *msg, int local,
|
||||||
|
|
||||||
xs_str *html_footer(xs_str *s)
|
xs_str *html_footer(xs_str *s)
|
||||||
{
|
{
|
||||||
xs *s1 = xs_fmt(
|
xs_html *footer = xs_html_tag("div",
|
||||||
"<div class=\"snac-footer\">\n"
|
xs_html_attr("class", "snac-footer"),
|
||||||
"<a href=\"%s\">%s</a> - "
|
xs_html_tag("a",
|
||||||
"powered by <a href=\"%s\">"
|
xs_html_attr("href", srv_baseurl),
|
||||||
"<abbr title=\"Social Networks Are Crap\">snac</abbr></a></div>\n",
|
xs_html_text(L("about this site"))),
|
||||||
srv_baseurl,
|
xs_html_text(" - "),
|
||||||
L("about this site"),
|
xs_html_text(L("powered by ")),
|
||||||
WHAT_IS_SNAC_URL
|
xs_html_tag("a",
|
||||||
);
|
xs_html_attr("href", WHAT_IS_SNAC_URL),
|
||||||
|
xs_html_tag("abbr",
|
||||||
|
xs_html_attr("title", "Social Network Are Crap"),
|
||||||
|
xs_html_text("snac"))));
|
||||||
|
|
||||||
return xs_str_cat(s, s1);
|
xs *s1 = xs_html_render(footer);
|
||||||
|
|
||||||
|
return xs_str_cat(s, s1, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue