diff options
author | Eric Wong | 2019-01-01 11:44:50 +0000 |
---|---|---|
committer | June McEnroe | 2022-02-13 11:53:45 -0500 |
commit | 122f7a9be6f41e90e198da8283d5630f217b251c (patch) | |
tree | 7e281f96c5d558ff3fa642f82eed54441205d79f | |
parent | Use git raw note format (diff) | |
download | cgit-122f7a9be6f41e90e198da8283d5630f217b251c.tar.gz cgit-122f7a9be6f41e90e198da8283d5630f217b251c.zip |
Improve pageheader display on text-based browsers
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.
-rw-r--r-- | cgit.css | 2 | ||||
-rw-r--r-- | ui-shared.c | 15 |
2 files changed, 13 insertions, 4 deletions
diff --git a/cgit.css b/cgit.css index d4aadbf..ba210b4 100644 --- a/cgit.css +++ b/cgit.css | |||
@@ -75,7 +75,7 @@ div#cgit table.tabs td { | |||
75 | } | 75 | } |
76 | 76 | ||
77 | div#cgit table.tabs td a { | 77 | div#cgit table.tabs td a { |
78 | padding: 2px 0.75em; | 78 | padding: 2px 0.25em; |
79 | color: #777; | 79 | color: #777; |
80 | font-size: 110%; | 80 | font-size: 110%; |
81 | } | 81 | } |
diff --git a/ui-shared.c b/ui-shared.c index dd312bb..1488250 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -1043,32 +1043,41 @@ void cgit_print_pageheader(void) | |||
1043 | 1043 | ||
1044 | html("<table class='tabs'><tr><td>\n"); | 1044 | html("<table class='tabs'><tr><td>\n"); |
1045 | if (ctx.env.authenticated && ctx.repo) { | 1045 | if (ctx.env.authenticated && ctx.repo) { |
1046 | if (ctx.repo->readme.nr) | 1046 | if (ctx.repo->readme.nr) { |
1047 | reporevlink("about", "about", NULL, | 1047 | reporevlink("about", "about", NULL, |
1048 | hc("about"), ctx.qry.head, NULL, | 1048 | hc("about"), ctx.qry.head, NULL, |
1049 | NULL); | 1049 | NULL); |
1050 | html(" "); | ||
1051 | } | ||
1050 | cgit_summary_link("summary", NULL, hc("summary"), | 1052 | cgit_summary_link("summary", NULL, hc("summary"), |
1051 | ctx.qry.head); | 1053 | ctx.qry.head); |
1054 | html(" "); | ||
1052 | cgit_refs_link("refs", NULL, hc("refs"), ctx.qry.head, | 1055 | cgit_refs_link("refs", NULL, hc("refs"), ctx.qry.head, |
1053 | ctx.qry.sha1, NULL); | 1056 | ctx.qry.sha1, NULL); |
1057 | html(" "); | ||
1054 | cgit_log_link("log", NULL, hc("log"), ctx.qry.head, | 1058 | cgit_log_link("log", NULL, hc("log"), ctx.qry.head, |
1055 | NULL, ctx.qry.vpath, 0, NULL, NULL, | 1059 | NULL, ctx.qry.vpath, 0, NULL, NULL, |
1056 | ctx.qry.showmsg, ctx.qry.follow); | 1060 | ctx.qry.showmsg, ctx.qry.follow); |
1061 | html(" "); | ||
1057 | if (ctx.qry.page && !strcmp(ctx.qry.page, "blame")) | 1062 | if (ctx.qry.page && !strcmp(ctx.qry.page, "blame")) |
1058 | cgit_blame_link("blame", NULL, hc("blame"), ctx.qry.head, | 1063 | cgit_blame_link("blame", NULL, hc("blame"), ctx.qry.head, |
1059 | ctx.qry.sha1, ctx.qry.vpath); | 1064 | ctx.qry.sha1, ctx.qry.vpath); |
1060 | else | 1065 | else |
1061 | cgit_tree_link("tree", NULL, hc("tree"), ctx.qry.head, | 1066 | cgit_tree_link("tree", NULL, hc("tree"), ctx.qry.head, |
1062 | ctx.qry.sha1, ctx.qry.vpath); | 1067 | ctx.qry.sha1, ctx.qry.vpath); |
1068 | html(" "); | ||
1063 | cgit_commit_link("commit", NULL, hc("commit"), | 1069 | cgit_commit_link("commit", NULL, hc("commit"), |
1064 | ctx.qry.head, ctx.qry.sha1, ctx.qry.vpath); | 1070 | ctx.qry.head, ctx.qry.sha1, ctx.qry.vpath); |
1071 | html(" "); | ||
1065 | cgit_diff_link("diff", NULL, hc("diff"), ctx.qry.head, | 1072 | cgit_diff_link("diff", NULL, hc("diff"), ctx.qry.head, |
1066 | ctx.qry.sha1, ctx.qry.sha2, ctx.qry.vpath); | 1073 | ctx.qry.sha1, ctx.qry.sha2, ctx.qry.vpath); |
1067 | if (ctx.repo->max_stats) | 1074 | if (ctx.repo->max_stats) { |
1075 | html(" "); | ||
1068 | cgit_stats_link("stats", NULL, hc("stats"), | 1076 | cgit_stats_link("stats", NULL, hc("stats"), |
1069 | ctx.qry.head, ctx.qry.vpath); | 1077 | ctx.qry.head, ctx.qry.vpath); |
1078 | } | ||
1070 | if (ctx.repo->homepage) { | 1079 | if (ctx.repo->homepage) { |
1071 | html("<a href='"); | 1080 | html(" <a href='"); |
1072 | html_attr(ctx.repo->homepage); | 1081 | html_attr(ctx.repo->homepage); |
1073 | html("'>homepage</a>"); | 1082 | html("'>homepage</a>"); |
1074 | } | 1083 | } |