diff options
author | Florian Paul Azim Hoberg <gyptazy@gyptazy.ch> | 2024-01-27 18:35:21 +0100 |
---|---|---|
committer | Florian Paul Azim Hoberg <gyptazy@gyptazy.ch> | 2024-01-28 08:09:44 +0100 |
commit | fe892622d33e45dd110abb8e6251b672ae1181d0 (patch) | |
tree | 0834b0ff130bda2fa0e1c1f433d9a475d4b1a439 /html.c | |
parent | d5c2c442b162da388ae3fa274b44ec676cbca2c4 (diff) |
feature(favicon): Add favicon support (#107)
Diffstat (limited to 'html.c')
-rw-r--r-- | html.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -427,7 +427,9 @@ static xs_html *html_base_head(void) xs_html_attr("name", "generator"), xs_html_attr("content", USER_AGENT))); - /* add server CSS */ + /* add server CSS and favicon */ + xs *f; + f = xs_fmt("%s/favicon.ico", srv_baseurl); xs_list *p = xs_dict_get(srv_config, "cssurls"); char *v; while (xs_list_iter(&p, &v)) { @@ -436,6 +438,11 @@ static xs_html *html_base_head(void) xs_html_attr("rel", "stylesheet"), xs_html_attr("type", "text/css"), xs_html_attr("href", v))); + xs_html_add(head, + xs_html_sctag("link", + xs_html_attr("rel", "icon"), + xs_html_attr("type", "image/x-icon"), + xs_html_attr("href", f))); } return head; |