about summary refs log tree commit
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-01-01 08:27:36 +0000
committerEric Wong <e@80x24.org>2019-04-22 02:34:37 +0000
commitd501a989f82462879e953a537d57d35bc3fff570 (patch)
tree6151db3ebad2f2349685dfa7921fa6ad66abaf89
parent6a0cc29a3a1cfb4caee51e1bae1640375fee7d0e (diff)
downloadcgit-d501a989f82462879e953a537d57d35bc3fff570.tar.gz
ui-shared: 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.
-rw-r--r--cgit.css1
-rw-r--r--ui-shared.c15
2 files changed, 12 insertions, 4 deletions
diff --git a/cgit.css b/cgit.css
index d4aadbf..8c313e2 100644
--- a/cgit.css
+++ b/cgit.css
@@ -75,7 +75,6 @@ div#cgit table.tabs td {
 }
 
 div#cgit table.tabs td a {
-        padding: 2px 0.75em;
         color: #777;
         font-size: 110%;
 }
diff --git a/ui-shared.c b/ui-shared.c
index d27a5fd..a859ab0 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -1029,32 +1029,41 @@ void cgit_print_pageheader(void)
 
         html("<table class='tabs'><tr><td>\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("<a href='");
+                        html(" <a href='");
                         html_attr(ctx.repo->homepage);
                         html("'>homepage</a>");
                 }