From 9c295906ea9e6972c2a77da49c5ad35ee503ce20 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 1 Jan 2019 11:44:50 +0000 Subject: Improve pageheader display on text-based browsers Text-based browsers (and some GUI browsers such as dillo) display the pageheader as: "summaryrefslogtreecommitdiff" This is difficult-to-read. Improve accessibility for users who cannot run memory-hungry browsers by using whitespace instead of relying on CSS. --- www/git.causal.agency/cgit/cgit.css | 2 +- www/git.causal.agency/cgit/ui-shared.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'www') diff --git a/www/git.causal.agency/cgit/cgit.css b/www/git.causal.agency/cgit/cgit.css index d4aadbfa..ba210b41 100644 --- a/www/git.causal.agency/cgit/cgit.css +++ b/www/git.causal.agency/cgit/cgit.css @@ -75,7 +75,7 @@ div#cgit table.tabs td { } div#cgit table.tabs td a { - padding: 2px 0.75em; + padding: 2px 0.25em; color: #777; font-size: 110%; } diff --git a/www/git.causal.agency/cgit/ui-shared.c b/www/git.causal.agency/cgit/ui-shared.c index dd312bb0..14882500 100644 --- a/www/git.causal.agency/cgit/ui-shared.c +++ b/www/git.causal.agency/cgit/ui-shared.c @@ -1043,32 +1043,41 @@ void cgit_print_pageheader(void) html("
\n"); if (ctx.env.authenticated && ctx.repo) { - if (ctx.repo->readme.nr) + if (ctx.repo->readme.nr) { reporevlink("about", "about", NULL, hc("about"), ctx.qry.head, NULL, NULL); + html(" "); + } cgit_summary_link("summary", NULL, hc("summary"), ctx.qry.head); + html(" "); cgit_refs_link("refs", NULL, hc("refs"), ctx.qry.head, ctx.qry.sha1, NULL); + html(" "); cgit_log_link("log", NULL, hc("log"), ctx.qry.head, NULL, ctx.qry.vpath, 0, NULL, NULL, ctx.qry.showmsg, ctx.qry.follow); + html(" "); if (ctx.qry.page && !strcmp(ctx.qry.page, "blame")) cgit_blame_link("blame", NULL, hc("blame"), ctx.qry.head, ctx.qry.sha1, ctx.qry.vpath); else cgit_tree_link("tree", NULL, hc("tree"), ctx.qry.head, ctx.qry.sha1, ctx.qry.vpath); + html(" "); cgit_commit_link("commit", NULL, hc("commit"), ctx.qry.head, ctx.qry.sha1, ctx.qry.vpath); + html(" "); cgit_diff_link("diff", NULL, hc("diff"), ctx.qry.head, ctx.qry.sha1, ctx.qry.sha2, ctx.qry.vpath); - if (ctx.repo->max_stats) + if (ctx.repo->max_stats) { + html(" "); cgit_stats_link("stats", NULL, hc("stats"), ctx.qry.head, ctx.qry.vpath); + } if (ctx.repo->homepage) { - html("homepage); html("'>homepage"); } -- cgit 1.4.1