X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/e39d738c39d37cdef115c145027f3eec85a62272..66cacd053ba900c8eb3b7962027370c84a97f990:/ui-shared.c diff --git a/ui-shared.c b/ui-shared.c index b9c1243..bca50aa 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -25,7 +25,7 @@ static char *http_date(time_t t) tm->tm_hour, tm->tm_min, tm->tm_sec); } -static int ttl_seconds(int ttl) +static long ttl_seconds(long ttl) { if (ttl<0) return 60 * 60 * 24 * 365; @@ -40,6 +40,14 @@ void cgit_print_error(char *msg) html("\n"); } +char *cgit_rooturl() +{ + if (cgit_virtual_root) + return fmt("%s/", cgit_virtual_root); + else + return "./cgit.cgi"; +} + char *cgit_repourl(const char *reponame) { if (cgit_virtual_root) { @@ -107,19 +115,39 @@ void cgit_print_docstart(char *title, struct cacheitem *item) void cgit_print_docend() { + html(""); html("\n\n"); } void cgit_print_pageheader(char *title, int show_search) { - html("