about summary refs log tree commit
path: root/ui-tree.c
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-01-04 22:05:51 +0000
committerEric Wong <e@80x24.org>2021-03-19 20:17:01 +0000
commitab8ff5295cfed27f6c827600fed28376b4540bb4 (patch)
treeee7ad08d6da4bf038ca76954b7abc421b89eb830 /ui-tree.c
parentd2c4d3fc02b71a0cb473f3a0ec5357ea6b42e4a3 (diff)
downloadcgit-no-css.tar.gz
ui-{tree,repolist}: improve button spacing for browsers w/o CSS no-css
For browsers on low-end machines running browsers without CSS
support, the default tree view displayed "logplain" when it
should be "log plain".  Stop relying on CSS and add a space
in between elements to improve accessibility.

Signed-off-by: Eric Wong <e@80x24.org>
Diffstat (limited to 'ui-tree.c')
-rw-r--r--ui-tree.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/ui-tree.c b/ui-tree.c
index 1e4efb2..f561d8b 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -245,15 +245,21 @@ static int ls_item(const struct object_id *oid, struct strbuf *base,
         cgit_log_link("log", NULL, "button", ctx.qry.head,
                       walk_tree_ctx->curr_rev, fullpath.buf, 0, NULL, NULL,
                       ctx.qry.showmsg, 0);
-        if (ctx.repo->max_stats)
+        if (ctx.repo->max_stats) {
+                html(" ");
                 cgit_stats_link("stats", NULL, "button", ctx.qry.head,
                                 fullpath.buf);
-        if (!S_ISGITLINK(mode))
+        }
+        if (!S_ISGITLINK(mode)) {
+                html(" ");
                 cgit_plain_link("plain", NULL, "button", ctx.qry.head,
                                 walk_tree_ctx->curr_rev, fullpath.buf);
-        if (!S_ISDIR(mode) && ctx.repo->enable_blame)
+        }
+        if (!S_ISDIR(mode) && ctx.repo->enable_blame) {
+                html(" ");
                 cgit_blame_link("blame", NULL, "button", ctx.qry.head,
                                 walk_tree_ctx->curr_rev, fullpath.buf);
+        }
         html("</td></tr>\n");
         free(name);
         strbuf_release(&fullpath);