This makes it easier to get back to the index page, and also re-enables
the usage of logo-link in cgitrc.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
html("<table id='header'>\n");
html("<tr>\n");
html("<td class='logo' rowspan='2'><a href='");
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'>");
html("'><img src='");
html_attr(ctx->cfg.logo);
html("'/></a></td>\n");
html("<td class='main'>");
+ if (ctx->repo) {
+ html("<a href='");
+ html_attr(cgit_rooturl());
+ html("'>index</a> / ");
html_txt(ctx->repo->name);
html_txt(ctx->repo->name);
html_txt(ctx->cfg.root_title);
html("</td></tr>\n");
html("<tr><td class='sub'>");
html_txt(ctx->cfg.root_title);
html("</td></tr>\n");
html("<tr><td class='sub'>");