diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Add stable markup hooks for site themes
Diffstat (limited to '')
| -rw-r--r-- | source/ui-summary.c | 20 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 10 insertions, 10 deletions
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("<tr class='nohover'><td colspan='%d'></td></tr>\n", columns); - htmlf("<tr class='nohover'><th colspan='%d' class='left'>Clone</th></tr>\n", columns); + html("<tbody class='clone'>\n"); + htmlf("<tr class='nohover'><th colspan='%d' class='left' scope='col'>Clone</th></tr>\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("<table class='list'>\n"); + // One table, so the columns line up across the sections, each of + // which is a body of its own. + html("<table class='list summary' aria-label='Summary'>\n"); cgit_print_branches(ctx.cfg.summary_branches); - htmlf("<tr class='nohover'><td colspan='%d'></td></tr>\n", columns); cgit_print_tags(ctx.cfg.summary_tags); - if (ctx.cfg.summary_log > 0) { - htmlf("<tr class='nohover'><td colspan='%d'></td></tr>\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("</tbody>\n"); html("</table>\n"); cgit_print_layout_end(); } @@ -159,7 +159,7 @@ void cgit_print_repo_readme(const char *path) goto done; } - html("<div id='summary'>"); + html("<div id='about'>"); 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. |
