about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-01-01 11:44:52 +0000
committerRory& <root@rory.gay>2026-02-06 14:09:56 +0100
commitbbf54ab70d8d895aee79e7b3bb25086a9f63c5be (patch)
tree101b120d34186d3f49728431376568fad6abbec3
parentUse <pre> for commit-msg (diff)
downloadcgit-magenta-bbf54ab70d8d895aee79e7b3bb25086a9f63c5be.tar.xz
Improve decoration display for browsers without CSS
Text-based browsers without CSS support show all the decorations
bunched together without spacing.  Rely on a whitespace instead
of CSS support.
-rw-r--r--cgit.css6
-rw-r--r--ui-log.c4
2 files changed, 4 insertions, 6 deletions
diff --git a/cgit.css b/cgit.css

index 7f832db..7dd043c 100644 --- a/cgit.css +++ b/cgit.css
@@ -670,7 +670,6 @@ div#cgit div.footer a:hover { div#cgit a.branch-deco { color: #000; - margin: 0px 0.5em; padding: 0px 0.25em; background-color: #88ff88; border: solid 1px #007700; @@ -678,7 +677,6 @@ div#cgit a.branch-deco { div#cgit a.tag-deco { color: #000; - margin: 0px 0.5em; padding: 0px 0.25em; background-color: #ffff88; border: solid 1px #777700; @@ -686,7 +684,6 @@ div#cgit a.tag-deco { div#cgit a.tag-annotated-deco { color: #000; - margin: 0px 0.5em; padding: 0px 0.25em; background-color: #ffcc88; border: solid 1px #777700; @@ -694,7 +691,6 @@ div#cgit a.tag-annotated-deco { div#cgit a.remote-deco { color: #000; - margin: 0px 0.5em; padding: 0px 0.25em; background-color: #ccccff; border: solid 1px #000077; @@ -702,7 +698,6 @@ div#cgit a.remote-deco { div#cgit a.deco { color: #000; - margin: 0px 0.5em; padding: 0px 0.25em; background-color: #ff8888; border: solid 1px #770000; @@ -713,7 +708,6 @@ div#cgit div.commit-subject a.tag-deco, div#cgit div.commit-subject a.tag-annotated-deco, div#cgit div.commit-subject a.remote-deco, div#cgit div.commit-subject a.deco { - margin-left: 1em; font-size: 75%; } diff --git a/ui-log.c b/ui-log.c
index 31fb783..15207e8 100644 --- a/ui-log.c +++ b/ui-log.c
@@ -77,11 +77,13 @@ void show_commit_decorations(struct commit *commit) * don't display anything. */ break; case DECORATION_REF_LOCAL: + html(" "); cgit_log_link(buf, NULL, "branch-deco", buf, NULL, ctx.qry.vpath, 0, NULL, NULL, ctx.qry.showmsg, 0); break; case DECORATION_REF_TAG: + html(" "); if (!refs_read_ref(get_main_ref_store(the_repository), deco->name, &oid_tag) && !peel_object(the_repository, &oid_tag, &peeled, PEEL_OBJECT_VERIFY_TAGGED_OBJECT_TYPE)) is_annotated = !oideq(&oid_tag, &peeled); @@ -90,12 +92,14 @@ void show_commit_decorations(struct commit *commit) case DECORATION_REF_REMOTE: if (!ctx.repo->enable_remote_branches) break; + html(" "); cgit_log_link(buf, NULL, "remote-deco", NULL, oid_to_hex(&commit->object.oid), ctx.qry.vpath, 0, NULL, NULL, ctx.qry.showmsg, 0); break; default: + html(" "); cgit_commit_link(buf, NULL, "deco", ctx.qry.head, oid_to_hex(&commit->object.oid), ctx.qry.vpath);