[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cgit
Subject:    [PATCH 1/2] ui-log: color line changes
From:       Christian Hesse <list () eworm ! de>
Date:       2016-06-29 7:37:57
Message-ID: 20160629073758.29304-1-list () eworm ! de
[Download RAW message or body]

From: Christian Hesse <mail@eworm.de>

Signed-off-by: Christian Hesse <mail@eworm.de>
---
 cgit.css | 9 +++++++++
 ui-log.c | 3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)

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");
 
-- 
2.9.0

_______________________________________________
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic