mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 14:35:04 +00:00
New function html_instance_head().
This commit is contained in:
parent
3ac738b0b9
commit
c50e6c41ea
1 changed files with 14 additions and 4 deletions
18
html.c
18
html.c
|
@ -427,7 +427,7 @@ static xs_html *html_base_head(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
xs_str *html_instance_header(xs_str *s, char *tag)
|
xs_html *html_instance_head(void)
|
||||||
{
|
{
|
||||||
xs_html *head = html_base_head();
|
xs_html *head = html_base_head();
|
||||||
|
|
||||||
|
@ -447,14 +447,24 @@ xs_str *html_instance_header(xs_str *s, char *tag)
|
||||||
|
|
||||||
char *host = xs_dict_get(srv_config, "host");
|
char *host = xs_dict_get(srv_config, "host");
|
||||||
char *title = xs_dict_get(srv_config, "title");
|
char *title = xs_dict_get(srv_config, "title");
|
||||||
char *sdesc = xs_dict_get(srv_config, "short_description");
|
|
||||||
char *email = xs_dict_get(srv_config, "admin_email");
|
|
||||||
char *acct = xs_dict_get(srv_config, "admin_account");
|
|
||||||
|
|
||||||
xs_html_add(head,
|
xs_html_add(head,
|
||||||
xs_html_tag("title",
|
xs_html_tag("title",
|
||||||
xs_html_text(title && *title ? title : host)));
|
xs_html_text(title && *title ? title : host)));
|
||||||
|
|
||||||
|
return head;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
xs_str *html_instance_header(xs_str *s, char *tag)
|
||||||
|
{
|
||||||
|
xs_html *head = html_instance_head();
|
||||||
|
|
||||||
|
char *host = xs_dict_get(srv_config, "host");
|
||||||
|
char *sdesc = xs_dict_get(srv_config, "short_description");
|
||||||
|
char *email = xs_dict_get(srv_config, "admin_email");
|
||||||
|
char *acct = xs_dict_get(srv_config, "admin_account");
|
||||||
|
|
||||||
{
|
{
|
||||||
xs *s1 = xs_html_render(head);
|
xs *s1 = xs_html_render(head);
|
||||||
s = xs_str_cat(s, "<!DOCTYPE html><html>\n", s1);
|
s = xs_str_cat(s, "<!DOCTYPE html><html>\n", s1);
|
||||||
|
|
Loading…
Reference in a new issue