diff options
| author | 2025-06-18 09:40:10 +0200 | |
|---|---|---|
| committer | 2025-06-18 09:40:10 +0200 | |
| commit | 0e30411f5890bfbe578a196a54ad46b72e3e49d7 (patch) | |
| tree | 6bcf92051fc3def01260765730fb2a2c21f1487a /html.c | |
| parent | Added 'alias' and 'alias_raw' as forced update in user_persist(). (diff) | |
| download | penes-snac2-0e30411f5890bfbe578a196a54ad46b72e3e49d7.tar.gz penes-snac2-0e30411f5890bfbe578a196a54ad46b72e3e49d7.tar.xz penes-snac2-0e30411f5890bfbe578a196a54ad46b72e3e49d7.zip | |
New field 'favicon_url' in server.json.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 13 |
1 files changed, 9 insertions, 4 deletions
| @@ -636,13 +636,18 @@ static xs_html *html_base_head(void) | |||
| 636 | xs_html_attr("content", USER_AGENT))); | 636 | xs_html_attr("content", USER_AGENT))); |
| 637 | 637 | ||
| 638 | /* add server CSS and favicon */ | 638 | /* add server CSS and favicon */ |
| 639 | xs *f; | 639 | xs *f = NULL; |
| 640 | f = xs_fmt("%s/favicon.ico", srv_baseurl); | 640 | const char *favicon = xs_dict_get(srv_config, "favicon_url"); |
| 641 | |||
| 642 | if (xs_is_string(favicon)) | ||
| 643 | f = xs_dup(favicon); | ||
| 644 | else | ||
| 645 | f = xs_fmt("%s/favicon.ico", srv_baseurl); | ||
| 646 | |||
| 641 | const xs_list *p = xs_dict_get(srv_config, "cssurls"); | 647 | const xs_list *p = xs_dict_get(srv_config, "cssurls"); |
| 642 | const char *v; | 648 | const char *v; |
| 643 | int c = 0; | ||
| 644 | 649 | ||
| 645 | while (xs_list_next(p, &v, &c)) { | 650 | xs_list_foreach(p, v) { |
| 646 | xs_html_add(head, | 651 | xs_html_add(head, |
| 647 | xs_html_sctag("link", | 652 | xs_html_sctag("link", |
| 648 | xs_html_attr("rel", "stylesheet"), | 653 | xs_html_attr("rel", "stylesheet"), |