commit c50e6c4
default
·
2023-11-27 13:15:36 +0000 UTC
parent 3ac738b
New function html_instance_head().
1 files changed,
+14,
-4
M
html.c
M
html.c
+14,
-4
1@@ -427,7 +427,7 @@ static xs_html *html_base_head(void)
2 }
3
4
5-xs_str *html_instance_header(xs_str *s, char *tag)
6+xs_html *html_instance_head(void)
7 {
8 xs_html *head = html_base_head();
9
10@@ -447,14 +447,24 @@ xs_str *html_instance_header(xs_str *s, char *tag)
11
12 char *host = xs_dict_get(srv_config, "host");
13 char *title = xs_dict_get(srv_config, "title");
14- char *sdesc = xs_dict_get(srv_config, "short_description");
15- char *email = xs_dict_get(srv_config, "admin_email");
16- char *acct = xs_dict_get(srv_config, "admin_account");
17
18 xs_html_add(head,
19 xs_html_tag("title",
20 xs_html_text(title && *title ? title : host)));
21
22+ return head;
23+}
24+
25+
26+xs_str *html_instance_header(xs_str *s, char *tag)
27+{
28+ xs_html *head = html_instance_head();
29+
30+ char *host = xs_dict_get(srv_config, "host");
31+ char *sdesc = xs_dict_get(srv_config, "short_description");
32+ char *email = xs_dict_get(srv_config, "admin_email");
33+ char *acct = xs_dict_get(srv_config, "admin_account");
34+
35 {
36 xs *s1 = xs_html_render(head);
37 s = xs_str_cat(s, "<!DOCTYPE html><html>\n", s1);