-rw-r--r-- | ui-shared.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ui-shared.c b/ui-shared.c index 7287956..03d147f 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -465,40 +465,46 @@ void add_hidden_formfields(int incl_head, int incl_search, char *page) html_hidden("q", ctx.qry.search); } } char *hc(struct cgit_cmd *cmd, const char *page) { return (strcmp(cmd->name, page) ? NULL : "active"); } void cgit_print_pageheader(struct cgit_context *ctx) { struct cgit_cmd *cmd = cgit_get_cmd(ctx); html("<table id='header'>\n"); html("<tr>\n"); html("<td class='logo' rowspan='2'><a href='"); - html_attr(cgit_rooturl()); + if (ctx->cfg.logo_link) + html_attr(ctx->cfg.logo_link); + else + html_attr(cgit_rooturl()); html("'><img src='"); html_attr(ctx->cfg.logo); html("'/></a></td>\n"); html("<td class='main'>"); - if (ctx->repo) + if (ctx->repo) { + html("<a href='"); + html_attr(cgit_rooturl()); + html("'>index</a> / "); html_txt(ctx->repo->name); - else + } else html_txt(ctx->cfg.root_title); html("</td></tr>\n"); html("<tr><td class='sub'>"); if (ctx->repo) html_txt(ctx->repo->desc); else html_txt(ctx->cfg.index_info); html("</td></tr>\n"); html("</table>\n"); html("<table class='tabs'><tr><td>\n"); if (ctx->repo) { reporevlink(NULL, "summary", NULL, hc(cmd, "summary"), ctx->qry.head, NULL, NULL); cgit_refs_link("refs", NULL, hc(cmd, "refs"), ctx->qry.head, ctx->qry.sha1, NULL); |