aboutsummaryrefslogtreecommitdiff
path: root/ui-shared.c
diff options
context:
space:
mode:
authorNaïm Favier <fnaim42@gmail.com>2019-12-09 18:38:14 +0000
committerChristian Hesse <mail@eworm.de>2022-12-19 17:02:52 +0000
commitecd9c584ce5894f4a06d23eec5678a642c2f7020 (patch)
treebafdc6b4f72be20c28dcbaddc3b9b67061c8c24d /ui-shared.c
parent907134b7a29177cb45aa461c549c004b1ae875af (diff)
downloadcgit-ecd9c584ce5894f4a06d23eec5678a642c2f7020.tar
cgit-ecd9c584ce5894f4a06d23eec5678a642c2f7020.tar.gz
cgit-ecd9c584ce5894f4a06d23eec5678a642c2f7020.zip
Make default pages configurablech/default-pages
Signed-off-by: Christian Hesse <mail@eworm.de>
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 11aed19..bf35a61 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -328,10 +328,16 @@ static void reporevlink(const char *page, const char *name, const char *title,
html("</a>");
}
+void cgit_repo_link(const char *name, const char *title, const char *class,
+ const char *head)
+{
+ reporevlink(NULL, name, title, class, head, NULL, NULL);
+}
+
void cgit_summary_link(const char *name, const char *title, const char *class,
const char *head)
{
- reporevlink(NULL, name, title, class, head, NULL, NULL);
+ reporevlink("summary", name, title, class, head, NULL, NULL);
}
void cgit_tag_link(const char *name, const char *title, const char *class,
@@ -1027,7 +1033,7 @@ static void print_header(void)
if (ctx.repo) {
cgit_index_link("index", NULL, NULL, NULL, NULL, 0, 1);
html(" : ");
- cgit_summary_link(ctx.repo->name, NULL, NULL, NULL);
+ cgit_repo_link(ctx.repo->name, NULL, NULL, NULL);
if (ctx.env.authenticated) {
html("</td><td class='form'>");
html("<form method='get'>\n");
@@ -1122,7 +1128,7 @@ void cgit_print_pageheader(void)
html("</form>\n");
} else if (ctx.env.authenticated) {
char *currenturl = cgit_currenturl();
- site_link(NULL, "index", NULL, hc("repolist"), NULL, NULL, 0, 1);
+ site_link("repolist", "index", NULL, hc("repolist"), NULL, NULL, 0, 1);
if (ctx.cfg.root_readme)
site_link("about", "about", NULL, hc("about"),
NULL, NULL, 0, 1);