From e1b24b557d00407fb96755c34a8956afff56a51a Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 26 Sep 2026 08:38:40 -1000 Subject: Add stable markup hooks for site themes --- source/ui-refs.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'source/ui-refs.c') diff --git a/source/ui-refs.c b/source/ui-refs.c index d89e3ea..e4a0dd0 100644 --- a/source/ui-refs.c +++ b/source/ui-refs.c @@ -79,10 +79,11 @@ static void collect_branches(struct reflist *list) static void print_branch_header(void) { html( - "Branch" - "Commit message" - "Author" - "Age\n" + "\n" + "Branch" + "Commit message" + "Author" + "Age\n" ); } @@ -93,7 +94,7 @@ static int print_branch(struct refinfo *ref) if (!info) return 1; - html(""); + html(""); cgit_log_link(name, NULL, NULL, name, NULL, NULL, 0, NULL, NULL, ctx.qry.showmsg, 0); html(""); @@ -128,10 +129,11 @@ static void collect_tags(struct reflist *list) static void print_tag_header(void) { html( - "Tag" - "Download" - "Author" - "Age\n" + "\n" + "Tag" + "Download" + "Author" + "Age\n" ); } @@ -152,7 +154,7 @@ static int print_tag(struct refinfo *ref) return 1; } - html(""); + html(""); cgit_tag_link(name, NULL, NULL, name); html(""); if (ctx.repo->snapshots && (obj->type == OBJ_COMMIT)) @@ -255,6 +257,7 @@ static void print_branches_page(int pagesize) if (page.size < list.count) print_ref_pager(page.start, page.size, list.count, "heads"); + html("\n"); cgit_free_reflist_inner(&list); } @@ -278,6 +281,7 @@ static void print_tags_page(int pagesize) if (page.size < list.count) print_ref_pager(page.start, page.size, list.count, "tags"); + html("\n"); cgit_free_reflist_inner(&list); } @@ -305,6 +309,7 @@ void cgit_print_branches(int maxcount) if (maxcount < list.count) print_refs_link("heads"); + html("\n"); cgit_free_reflist_inner(&list); } @@ -328,6 +333,7 @@ void cgit_print_tags(int maxcount) if (maxcount < list.count) print_refs_link("tags"); + html("\n"); cgit_free_reflist_inner(&list); } @@ -335,7 +341,7 @@ void cgit_print_tags(int maxcount) void cgit_print_refs(void) { cgit_print_layout_start(); - html("\n"); + html("
\n"); if (ctx.qry.path && starts_with(ctx.qry.path, "heads")) { print_branches_page(ctx.cfg.max_ref_count); @@ -343,7 +349,6 @@ void cgit_print_refs(void) print_tags_page(ctx.cfg.max_ref_count); } else { cgit_print_branches(ctx.cfg.max_ref_count); - html("\n"); cgit_print_tags(ctx.cfg.max_ref_count); } html("
\n"); -- cgit v2.8.0