all repos — cgit @ 7c0d2d9fbd3a29d295c8067f7798507853759eae

a hyperfast web frontend for git written in c

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>
Lars Hjemli hjemli@gmail.com
Sat, 12 Apr 2008 19:59:41 +0200
commit

7c0d2d9fbd3a29d295c8067f7798507853759eae

parent

89aa3c0d0a4c6d9885272602005975b763ea1604

1 files changed, 9 insertions(+), 3 deletions(-)

jump to
M ui-shared.cui-shared.c

@@ -478,14 +478,20 @@

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'>");