X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/9c15f3c6954e43c5ffd36230e666eccf112803f2..9afda36ed72083febca5e1a249b7f9f09205fe16:/ui-shared.c
diff --git a/ui-shared.c b/ui-shared.c
index 03dcc08..770b685 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -12,8 +12,7 @@
#include "html.h"
static const char cgit_doctype[] =
-"\n";
+"\n";
static char *http_date(time_t t)
{
@@ -702,7 +701,6 @@ void cgit_redirect(const char *url, bool permanent)
html("Location: ");
html_url_path(url);
html("\n\n");
- exit(0);
}
static void print_rel_vcs_link(const char *url)
@@ -724,7 +722,7 @@ void cgit_print_docstart(void)
char *host = cgit_hosturl();
html(cgit_doctype);
- html("\n");
+ html("\n");
html("
\n");
html("");
html_txt(ctx.page.title);
@@ -793,13 +791,11 @@ void cgit_print_error_page(int code, const char *msg, const char *fmt, ...)
ctx.page.expires = ctx.cfg.cache_dynamic_ttl;
ctx.page.status = code;
ctx.page.statusmsg = msg;
- cgit_print_http_headers();
- cgit_print_docstart();
- cgit_print_pageheader();
+ cgit_print_layout_start();
va_start(ap, fmt);
cgit_vprint_error(fmt, ap);
va_end(ap);
- cgit_print_docend();
+ cgit_print_layout_end();
}
void cgit_print_layout_start(void)
@@ -948,7 +944,7 @@ static void print_header(void)
if (ctx.repo->enable_remote_branches)
for_each_remote_ref(print_branch_option, ctx.qry.head);
html(" ");
- html("");
+ html("");
html("");
}
} else
@@ -997,6 +993,11 @@ void cgit_print_pageheader(void)
if (ctx.repo->max_stats)
cgit_stats_link("stats", NULL, hc("stats"),
ctx.qry.head, ctx.qry.vpath);
+ if (ctx.repo->homepage) {
+ html("homepage");
+ }
html("");
html(" |