More HTML simplification.

This commit is contained in:
default 2024-05-08 04:15:36 +02:00
parent 2322de4900
commit fa8b401927

13
html.c
View file

@ -509,7 +509,7 @@ xs_html *html_instance_head(void)
} }
static xs_html *html_instance_body(char *title) static xs_html *html_instance_body(void)
{ {
char *host = xs_dict_get(srv_config, "host"); char *host = xs_dict_get(srv_config, "host");
char *sdesc = xs_dict_get(srv_config, "short_description"); char *sdesc = xs_dict_get(srv_config, "short_description");
@ -560,13 +560,6 @@ static xs_html *html_instance_body(char *title)
xs_html_text(handle))))); xs_html_text(handle)))));
} }
if (title != NULL) {
xs_html_add(body,
xs_html_tag("h2",
xs_html_attr("class", "snac-header"),
xs_html_text(title)));
}
return body; return body;
} }
@ -2023,7 +2016,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only,
} }
else { else {
head = html_instance_head(); head = html_instance_head();
body = html_instance_body(title); body = html_instance_body();
} }
xs_html *html = xs_html_tag("html", xs_html *html = xs_html_tag("html",
@ -2034,7 +2027,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only,
xs_html_add(body, xs_html_add(body,
html_top_controls(user)); html_top_controls(user));
if (user && title) { if (title) {
xs_html_add(body, xs_html_add(body,
xs_html_tag("h2", xs_html_tag("h2",
xs_html_attr("class", "snac-header"), xs_html_attr("class", "snac-header"),