From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16409 invoked from network); 19 Mar 2021 20:31:20 -0000 Received: from lists.zx2c4.com (165.227.139.114) by inbox.vuxu.org with ESMTPUTF8; 19 Mar 2021 20:31:20 -0000 Received: by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 1047935a; Fri, 19 Mar 2021 20:30:48 +0000 (UTC) Return-Path: Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTPS id 58f5576c (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Fri, 19 Mar 2021 20:30:47 +0000 (UTC) Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 31FEE1FB0E for ; Fri, 19 Mar 2021 20:23:37 +0000 (UTC) From: Eric Wong To: cgit@lists.zx2c4.com Subject: [PATCH 5/5] ui-{tree, repolist}: improve button spacing for browsers w/o CSS Date: Fri, 19 Mar 2021 20:23:37 +0000 Message-Id: <20210319202337.21676-6-e@80x24.org> In-Reply-To: <20210319202337.21676-1-e@80x24.org> References: <20210319202337.21676-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: cgit@lists.zx2c4.com X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: List for cgit developers and users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cgit-bounces@lists.zx2c4.com Sender: "CGit" 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 --- cgit.css | 1 - ui-repolist.c | 2 ++ ui-tree.c | 12 +++++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/cgit.css b/cgit.css index 6ab28a1..4ccd5ad 100644 --- a/cgit.css +++ b/cgit.css @@ -575,7 +575,6 @@ div#cgit table.list td.reposection { div#cgit a.button { font-size: 80%; - padding: 0em 0.5em; } div#cgit a.primary { diff --git a/ui-repolist.c b/ui-repolist.c index 529a203..591929b 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -353,8 +353,10 @@ void cgit_print_repolist(void) if (ctx.cfg.enable_index_links) { html(""); cgit_summary_link("summary", NULL, "button", NULL); + html(" "); cgit_log_link("log", NULL, "button", NULL, NULL, NULL, 0, NULL, NULL, ctx.qry.showmsg, 0); + html(" "); cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL); html(""); } 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("\n"); free(name); strbuf_release(&fullpath);