diff options
author | Eric Wong <e@80x24.org> | 2019-01-04 22:23:24 +0000 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2022-02-13 11:55:35 -0500 |
commit | 2d4c893dbdfea6a5ccefa75017113d45b33f2c43 (patch) | |
tree | 81036c21a04b42d38c59274043fb22e84174bb10 /ui-tree.c | |
parent | Improve decoration display for browsers without CSS (diff) | |
download | cgit-pink-2d4c893dbdfea6a5ccefa75017113d45b33f2c43.tar.gz cgit-pink-2d4c893dbdfea6a5ccefa75017113d45b33f2c43.zip |
Improve button spacing for browsers w/o 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.
Diffstat (limited to '')
-rw-r--r-- | ui-tree.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ui-tree.c b/ui-tree.c index 438b001..34e7e63 100644 --- a/ui-tree.c +++ b/ui-tree.c @@ -263,15 +263,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"); cleanup: |