From a2bb7a9c44500342b99b274fce0a7b725b608f48 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 4 Jan 2019 22:23:24 +0000 Subject: 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. --- www/git.causal.agency/cgit/ui-tree.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'www/git.causal.agency/cgit/ui-tree.c') diff --git a/www/git.causal.agency/cgit/ui-tree.c b/www/git.causal.agency/cgit/ui-tree.c index 438b0011..34e7e63a 100644 --- a/www/git.causal.agency/cgit/ui-tree.c +++ b/www/git.causal.agency/cgit/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("\n"); cleanup: -- cgit 1.4.1