summary refs log tree commit diff
path: root/www
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-01-01 11:44:52 +0000
committerJune McEnroe <june@causal.agency>2021-01-17 20:03:45 +0000
commit4a8b1306ec3b86ce59a6a0c2eb0ca99405adfc3f (patch)
treeb32976edee3e86c6240fa12dc7c6a8011da03520 /www
parentUse <pre> for commit-msg (diff)
downloadsrc-4a8b1306ec3b86ce59a6a0c2eb0ca99405adfc3f.tar.gz
src-4a8b1306ec3b86ce59a6a0c2eb0ca99405adfc3f.zip
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.
Diffstat (limited to '')
-rw-r--r--www/git.causal.agency/cgit/cgit.css6
-rw-r--r--www/git.causal.agency/cgit/ui-log.c5
2 files changed, 5 insertions, 6 deletions
diff --git a/www/git.causal.agency/cgit/cgit.css b/www/git.causal.agency/cgit/cgit.css
index 67e1ed36..b88db616 100644
--- a/www/git.causal.agency/cgit/cgit.css
+++ b/www/git.causal.agency/cgit/cgit.css
@@ -666,7 +666,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;
@@ -674,7 +673,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;
@@ -682,7 +680,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;
@@ -690,7 +687,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;
@@ -698,7 +694,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;
@@ -709,7 +704,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/www/git.causal.agency/cgit/ui-log.c b/www/git.causal.agency/cgit/ui-log.c
index 2939c016..773950cd 100644
--- a/www/git.causal.agency/cgit/ui-log.c
+++ b/www/git.causal.agency/cgit/ui-log.c
@@ -67,6 +67,7 @@ void show_commit_decorations(struct commit *commit)
 	while (deco) {
 		struct object_id peeled;
 		int is_annotated = 0;
+
 		strlcpy(buf, prettify_refname(deco->name), sizeof(buf));
 		switch(deco->type) {
 		case DECORATION_NONE:
@@ -74,11 +75,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 (!peel_ref(deco->name, &peeled))
 				is_annotated = !oidcmp(&commit->object.oid, &peeled);
 			cgit_tag_link(buf, NULL, is_annotated ? "tag-annotated-deco" : "tag-deco", buf);
@@ -86,12 +89,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);