From: e at 80x24.org (Eric Wong) Subject: [PATCH 1/4] ui-shared: improve pageheader display on text-based browsers Date: Tue, 1 Jan 2019 11:44:50 +0000 [thread overview] Message-ID: <20190101114453.4876-2-e@80x24.org> (raw) In-Reply-To: <20190101114453.4876-1-e@80x24.org> Text-based browsers (and some GUI browsers such as dillo) display the pageheader as: "summaryrefslogtreecommitdiff" This is difficult-to-read. Improve accessibility for users who cannot run memory-hungry browsers by using whitespace instead of relying on CSS. --- cgit.css | 1 - ui-shared.c | 15 ++++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/cgit.css b/cgit.css index d4aadbf..8c313e2 100644 --- a/cgit.css +++ b/cgit.css @@ -75,7 +75,6 @@ div#cgit table.tabs td { } div#cgit table.tabs td a { - padding: 2px 0.75em; color: #777; font-size: 110%; } diff --git a/ui-shared.c b/ui-shared.c index 7a4c726..017fe30 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -1029,32 +1029,41 @@ void cgit_print_pageheader(void) html("<table class='tabs'><tr><td>\n"); if (ctx.env.authenticated && ctx.repo) { - if (ctx.repo->readme.nr) + if (ctx.repo->readme.nr) { reporevlink("about", "about", NULL, hc("about"), ctx.qry.head, NULL, NULL); + html(" "); + } cgit_summary_link("summary", NULL, hc("summary"), ctx.qry.head); + html(" "); cgit_refs_link("refs", NULL, hc("refs"), ctx.qry.head, ctx.qry.sha1, NULL); + html(" "); cgit_log_link("log", NULL, hc("log"), ctx.qry.head, NULL, ctx.qry.vpath, 0, NULL, NULL, ctx.qry.showmsg, ctx.qry.follow); + html(" "); if (ctx.qry.page && !strcmp(ctx.qry.page, "blame")) cgit_blame_link("blame", NULL, hc("blame"), ctx.qry.head, ctx.qry.sha1, ctx.qry.vpath); else cgit_tree_link("tree", NULL, hc("tree"), ctx.qry.head, ctx.qry.sha1, ctx.qry.vpath); + html(" "); cgit_commit_link("commit", NULL, hc("commit"), ctx.qry.head, ctx.qry.sha1, ctx.qry.vpath); + html(" "); cgit_diff_link("diff", NULL, hc("diff"), ctx.qry.head, ctx.qry.sha1, ctx.qry.sha2, ctx.qry.vpath); - if (ctx.repo->max_stats) + if (ctx.repo->max_stats) { + html(" "); cgit_stats_link("stats", NULL, hc("stats"), ctx.qry.head, ctx.qry.vpath); + } if (ctx.repo->homepage) { - html("<a href='"); + html(" <a href='"); html_attr(ctx.repo->homepage); html("'>homepage</a>"); } -- EW
next prev parent reply other threads:[~2019-01-01 11:44 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 ` e [this message] 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 ` [PATCH 5/4] ui-{tree,repolist}: improve button spacing for browsers w/o CSS e 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=20190101114453.4876-2-e@80x24.org \ --to=cgit@lists.zx2c4.com \ --subject='Re: [PATCH 1/4] ui-shared: improve pageheader display on text-based browsers' \ /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
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).