From: e at 80x24.org (Eric Wong)
Subject: [PATCH 5/4] ui-{tree,repolist}: improve button spacing for browsers w/o CSS
Date: Fri, 4 Jan 2019 22:23:24 +0000 [thread overview]
Message-ID: <20190104222324.GA25415@dcvr> (raw)
In-Reply-To: <20190101114453.4876-1-e@80x24.org>
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.
---
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 6fcd984..d4f2418 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 41424c0..6187101 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("<td>");
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("</td>");
}
diff --git a/ui-tree.c b/ui-tree.c
index df8ad82..436c2b3 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.cfg.enable_blame)
+ }
+ if (!S_ISDIR(mode) && ctx.cfg.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);
--
EW
next prev parent reply other threads:[~2019-01-04 22:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-01 11:44 [PATCH 0/4] improve rendering w/o CSS reliance e
2019-01-01 11:44 ` [PATCH 1/4] ui-shared: improve pageheader display on text-based browsers e
2019-01-01 11:44 ` [PATCH 2/4] ui-{commit,tag}: use <pre> for commit-msg e
2019-01-01 11:44 ` [PATCH 3/4] ui-log: improve decoration display for browsers without CSS e
2019-01-01 11:44 ` [PATCH 4/4] ui-diff: preserve spaces w/o CSS on context lines e
2019-01-04 10:32 ` e
2019-01-04 22:23 ` e [this message]
2020-02-08 18:44 ` [PATCH 0/4] improve rendering w/o CSS reliance e
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190104222324.GA25415@dcvr \
--to=cgit@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).