mirror of
https://git.zx2c4.com/cgit
synced 2024-11-26 02:18:42 +00:00
Add fixed link to index page from repo header
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>
This commit is contained in:
parent
89aa3c0d0a
commit
7c0d2d9fbd
10
ui-shared.c
10
ui-shared.c
@ -478,14 +478,20 @@ void cgit_print_pageheader(struct cgit_context *ctx)
|
|||||||
html("<table id='header'>\n");
|
html("<table id='header'>\n");
|
||||||
html("<tr>\n");
|
html("<tr>\n");
|
||||||
html("<td class='logo' rowspan='2'><a href='");
|
html("<td class='logo' rowspan='2'><a href='");
|
||||||
|
if (ctx->cfg.logo_link)
|
||||||
|
html_attr(ctx->cfg.logo_link);
|
||||||
|
else
|
||||||
html_attr(cgit_rooturl());
|
html_attr(cgit_rooturl());
|
||||||
html("'><img src='");
|
html("'><img src='");
|
||||||
html_attr(ctx->cfg.logo);
|
html_attr(ctx->cfg.logo);
|
||||||
html("'/></a></td>\n");
|
html("'/></a></td>\n");
|
||||||
html("<td class='main'>");
|
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);
|
html_txt(ctx->repo->name);
|
||||||
else
|
} else
|
||||||
html_txt(ctx->cfg.root_title);
|
html_txt(ctx->cfg.root_title);
|
||||||
html("</td></tr>\n");
|
html("</td></tr>\n");
|
||||||
html("<tr><td class='sub'>");
|
html("<tr><td class='sub'>");
|
||||||
|
Loading…
Reference in New Issue
Block a user