summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorGravatar default2023-11-27 14:15:36 +0100
committerGravatar default2023-11-27 14:15:36 +0100
commitc50e6c41ea04c14604b87a5698156afb30cb3b94 (patch)
tree793b3a7ef53d7348e058c54ceb39a7ad11d458bf /html.c
parentMore HTML tweaks. (diff)
downloadsnac2-c50e6c41ea04c14604b87a5698156afb30cb3b94.tar.gz
snac2-c50e6c41ea04c14604b87a5698156afb30cb3b94.tar.xz
snac2-c50e6c41ea04c14604b87a5698156afb30cb3b94.zip
New function html_instance_head().
Diffstat (limited to 'html.c')
-rw-r--r--html.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/html.c b/html.c
index a399bd1..aec8afc 100644
--- a/html.c
+++ b/html.c
@@ -427,7 +427,7 @@ static xs_html *html_base_head(void)
427} 427}
428 428
429 429
430xs_str *html_instance_header(xs_str *s, char *tag) 430xs_html *html_instance_head(void)
431{ 431{
432 xs_html *head = html_base_head(); 432 xs_html *head = html_base_head();
433 433
@@ -447,14 +447,24 @@ xs_str *html_instance_header(xs_str *s, char *tag)
447 447
448 char *host = xs_dict_get(srv_config, "host"); 448 char *host = xs_dict_get(srv_config, "host");
449 char *title = xs_dict_get(srv_config, "title"); 449 char *title = xs_dict_get(srv_config, "title");
450 char *sdesc = xs_dict_get(srv_config, "short_description");
451 char *email = xs_dict_get(srv_config, "admin_email");
452 char *acct = xs_dict_get(srv_config, "admin_account");
453 450
454 xs_html_add(head, 451 xs_html_add(head,
455 xs_html_tag("title", 452 xs_html_tag("title",
456 xs_html_text(title && *title ? title : host))); 453 xs_html_text(title && *title ? title : host)));
457 454
455 return head;
456}
457
458
459xs_str *html_instance_header(xs_str *s, char *tag)
460{
461 xs_html *head = html_instance_head();
462
463 char *host = xs_dict_get(srv_config, "host");
464 char *sdesc = xs_dict_get(srv_config, "short_description");
465 char *email = xs_dict_get(srv_config, "admin_email");
466 char *acct = xs_dict_get(srv_config, "admin_account");
467
458 { 468 {
459 xs *s1 = xs_html_render(head); 469 xs *s1 = xs_html_render(head);
460 s = xs_str_cat(s, "<!DOCTYPE html><html>\n", s1); 470 s = xs_str_cat(s, "<!DOCTYPE html><html>\n", s1);