X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/3295155a0caf68d33fecb15f499d205c8e87cd41..aee39b4e9a45e1ba507c0017de50bb9dbbae7af8:/ui-shared.c
diff --git a/ui-shared.c b/ui-shared.c
index fbf5a2d..c50b3e6 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -768,6 +768,30 @@ static void print_rel_vcs_link(const char *url)
html(" Git repository'/>\n");
}
+static int emit_css_link(struct string_list_item *s, void *arg)
+{
+ html("\n");
+
+ return 0;
+}
+
+static int emit_js_link(struct string_list_item *s, void *arg)
+{
+ html("\n");
+
+ return 0;
+}
+
void cgit_print_docstart(void)
{
char *host = cgit_hosturl();
@@ -787,9 +811,17 @@ void cgit_print_docstart(void)
htmlf("\n", cgit_version);
if (ctx.cfg.robots && *ctx.cfg.robots)
htmlf("\n", ctx.cfg.robots);
- html("\n");
+
+ if (ctx.cfg.css.items)
+ for_each_string_list(&ctx.cfg.css, emit_css_link, NULL);
+ else
+ emit_css_link(NULL, "/cgit.css");
+
+ if (ctx.cfg.js.items)
+ for_each_string_list(&ctx.cfg.js, emit_js_link, NULL);
+ else
+ emit_js_link(NULL, "/cgit.js");
+
if (ctx.cfg.favicon) {
html("