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-log.c | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) (limited to 'source/ui-log.c') diff --git a/source/ui-log.c b/source/ui-log.c index 86cb756..9f21114 100644 --- a/source/ui-log.c +++ b/source/ui-log.c @@ -227,7 +227,7 @@ static void print_commit(struct commit *commit, struct rev_info *revs) print_graph_above(revs, &graphbuf, columns); info = cgit_parse_commit(commit); - htmlf("", ctx.qry.showmsg ? " class='logheader'" : ""); + htmlf("", ctx.qry.showmsg ? " logheader" : ""); if (revs->graph) { html(""); @@ -372,11 +372,11 @@ static void print_pager(struct rev_info *revs, int ofs, int cnt) { struct commit *more = get_revision(revs); - html("\n"); + html("\n\n"); // A single page needs no pager, and an empty list has nothing to page. if (ofs <= 0 && !more) return; - html(""); } /* @@ -562,15 +562,15 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern if (pager) { cgit_print_layout_start(); - html("\n"); + html("
\n"); } - html(""); + html("\n"); if (commit_graph) html(""); else - html(""); - html(""); + html(""); + html(""); if (rev.graph) - html(""); + html(""); if (ctx.repo->enable_log_filecount) { - html(""); + html(""); columns++; } if (ctx.repo->enable_log_linecount) { - html(""); + html(""); columns++; } html("\n"); @@ -617,13 +617,16 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern if (pager) { print_pager(&rev, ofs, cnt); cgit_print_layout_end(); - } else if ((commit = get_revision(&rev))) { - htmlf("\n"); + } else { + if ((commit = get_revision(&rev))) { + htmlf("\n"); + } + html("\n"); } if (must_free_tip) -- cgit v2.8.0
AgeCommit message"); + html("AgeCommit message"); if (pager) { html(" ("); cgit_log_link( @@ -580,15 +580,15 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern ); html(")"); } - html("AuthorAuthorAgeAgeFilesFilesLinesLines
", columns); - cgit_log_link( - "[...]", NULL, NULL, ctx.qry.head, NULL, ctx.qry.vpath, 0, - NULL, NULL, ctx.qry.showmsg, ctx.qry.follow - ); - html("
", columns); + cgit_log_link( + "[...]", NULL, NULL, ctx.qry.head, NULL, ctx.qry.vpath, 0, + NULL, NULL, ctx.qry.showmsg, ctx.qry.follow + ); + html("