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-summary.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source/ui-summary.c') diff --git a/source/ui-summary.c b/source/ui-summary.c index 0b33a96..eb04ecd 100644 --- a/source/ui-summary.c +++ b/source/ui-summary.c @@ -44,8 +44,9 @@ static void print_clone_url(const char *url) // cgit_add_clone_urls may call back no times at all, so the heading // waits for a first url rather than being printed ahead of the walk. if (clone_urls_printed++ == 0) { - htmlf("\n", columns); - htmlf("Clone\n", columns); + html("\n"); + htmlf("Clone\n", + columns); } cgit_print_clone_row(url, columns); @@ -113,19 +114,18 @@ static char *resolve_about_path(const char *filename, const char *ref, const cha void cgit_print_summary(void) { - int columns = log_columns(); - cgit_print_layout_start(); - html("\n"); + // One table, so the columns line up across the sections, each of + // which is a body of its own. + html("
\n"); cgit_print_branches(ctx.cfg.summary_branches); - htmlf("\n", columns); cgit_print_tags(ctx.cfg.summary_tags); - if (ctx.cfg.summary_log > 0) { - htmlf("\n", columns); + if (ctx.cfg.summary_log > 0) cgit_print_log(ctx.qry.head, 0, ctx.cfg.summary_log, NULL, NULL, NULL, 0, 0, 0); - } clone_urls_printed = 0; cgit_add_clone_urls(print_clone_url); + if (clone_urls_printed) + html("\n"); html("
\n"); cgit_print_layout_end(); } @@ -159,7 +159,7 @@ void cgit_print_repo_readme(const char *path) goto done; } - html("
"); + html("
"); if (!ctx.repo->about_filter) { // With no about-filter there is nothing to turn the readme // into safe HTML, so it is escaped rather than served raw. -- cgit v2.8.0