X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/905dbaef5aa33ea11d385b82de0188fee73dd655..6102bcfce46fd357566941d565b95f78510af79b:/ui-shared.c diff --git a/ui-shared.c b/ui-shared.c index d08ede9..cd98387 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -114,7 +114,7 @@ char *cgit_currurl() return fmt("%s/", ctx.cfg.virtual_root); } -static void site_url(char *page, char *search) +static void site_url(char *page, char *search, int ofs) { char *delim = "?"; @@ -133,11 +133,16 @@ static void site_url(char *page, char *search) html(delim); html("q="); html_attr(search); + delim = "&"; + } + if (ofs) { + html(delim); + htmlf("ofs=%d", ofs); } } static void site_link(char *page, char *name, char *title, char *class, - char *search) + char *search, int ofs) { html(""); html_txt(name); html(""); } +void cgit_index_link(char *name, char *title, char *class, char *pattern, + int ofs) +{ + site_link(NULL, name, title, class, pattern, ofs); +} + static char *repolink(char *title, char *class, char *page, char *head, char *path) { @@ -432,6 +443,9 @@ void cgit_print_docstart(struct cgit_context *ctx) void cgit_print_docend() { + html("
\n