about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2016-06-29 09:37:57 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2016-07-05 16:14:47 +0200
commit4fb49864db51affddf37ab2a563b0eb4b33e155d (patch)
treec913982a2026dbf8b3ecca28849144f665b4b23f
parentAvoid ambiguities when prettifying snapshot names (diff)
downloadcgit-pink-4fb49864db51affddf37ab2a563b0eb4b33e155d.tar.gz
cgit-pink-4fb49864db51affddf37ab2a563b0eb4b33e155d.zip
ui-log: color line changes
Signed-off-by: Christian Hesse <mail@eworm.de>
-rw-r--r--cgit.css9
-rw-r--r--ui-log.c3
2 files changed, 11 insertions, 1 deletions
diff --git a/cgit.css b/cgit.css
index 66c6d53..983eac5 100644
--- a/cgit.css
+++ b/cgit.css
@@ -590,6 +590,15 @@ div#cgit span.age-months {
 div#cgit span.age-years {
 	color: #bbb;
 }
+
+div#cgit span.insertions {
+	color: #080;
+}
+
+div#cgit span.deletions {
+	color: #800;
+}
+
 div#cgit div.footer {
 	margin-top: 0.5em;
 	text-align: center;
diff --git a/ui-log.c b/ui-log.c
index d6d94f6..c97b8e0 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -258,7 +258,8 @@ static void print_commit(struct commit *commit, struct rev_info *revs)
 	if (ctx.repo->enable_log_filecount)
 		htmlf("</td><td>%d", files);
 	if (ctx.repo->enable_log_linecount)
-		htmlf("</td><td>-%d/+%d", rem_lines, add_lines);
+		htmlf("</td><td><span class='deletions'>-%d</span>/"
+			"<span class='insertions'>+%d</span>", rem_lines, add_lines);
 
 	html("</td></tr>\n");
 
acd620003743d25c9017468f2e&follow=1'>Swap root window coloursJune McEnroe 2021-02-07Add -X flag to install X stuff on OpenBSDJune McEnroe 2021-02-07Adjust brightness by smaller incrementsJune McEnroe 2021-02-07Fix cwm window cycling, move big by defaultJune McEnroe 2021-02-07Use class names for Foreground, Background, BorderColorJune McEnroe 2021-02-07Add simple battery status and clock to xsessionJune McEnroe 2021-02-07Set cursor theme and sizeJune McEnroe 2021-02-07Use scrot for up -s if no screencaptureJune McEnroe 2021-02-07Enable mouse acceleration in XJune McEnroe 2021-02-07Set colours for Xt and cwmJune McEnroe 2021-02-07Set urgency on bell in xtermJune McEnroe 2021-02-07Add bindings for brightness controlJune McEnroe 2021-02-07Set X key repeat rateJune McEnroe 2021-02-07Bump font size to 12June McEnroe 2021-02-07Fully configure and rebind cwmJune McEnroe 2021-02-07Add BintiJune McEnroe 2021-02-07Finish configuring xtermJune McEnroe 2021-02-06Enable tapping, reverse scroll, set scaling in wsconsctlJune McEnroe 2021-02-06Set root window to black on purple snowJune McEnroe 2021-02-06Add xmodmap configurationJune McEnroe 2021-02-06Add initial OpenBSD X configurationJune McEnroe 2021-02-06Add xterm output to schemeJune McEnroe