aboutsummaryrefslogtreecommitdiffhomepage
path: root/ui-shared.c
diff options
context:
space:
mode:
authorNaïm Favier <fnaim42@gmail.com>2019-12-09 19:38:14 +0100
committerBlake Romero <blake@blkrom.com>2024-10-17 19:37:52 +0100
commitb61c03dbed3fa22ea18b00b3ac62a01d04c9c9d0 (patch)
tree0e95529d1c8ac7ddf60707b57b73fba6aaae7e1a /ui-shared.c
parent09d24d7cd0b7e85633f2f43808b12871bb209d69 (diff)
Make default pages configurable
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 6fae72d..b0ffedd 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -330,10 +330,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,
@@ -1037,7 +1043,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");
@@ -1134,7 +1140,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);