From c1cd290d1f83d3d1c2d081d734e8d213f12cc06b Mon Sep 17 00:00:00 2001 From: Jeff Smith Date: Sun, 1 Oct 2017 23:39:08 -0500 Subject: ui-blame: add blame UI Implement a page which provides the blame view of a specified file. This feature is controlled by a new config variable, "enable-blame", which is disabled by default. Signed-off-by: Jeff Smith Reviewed-by: John Keeping --- cgit.css | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cgit.css') diff --git a/cgit.css b/cgit.css index 1dc2c11..836f8ae 100644 --- a/cgit.css +++ b/cgit.css @@ -329,6 +329,14 @@ div#cgit table.ssdiff td.lineno a:hover { color: black; } +div#cgit table.blame tr:nth-child(even) { + background: #eee; +} + +div#cgit table.blame tr:nth-child(odd) { + background: white; +} + div#cgit table.bin-blob { margin-top: 0.5em; border: solid 1px black; -- cgit v1.2.3-24-g4f1b From 6b5b655f6d2449fe33d8f48f6e98d5e421bf3ff9 Mon Sep 17 00:00:00 2001 From: Jeff Smith Date: Tue, 17 Oct 2017 23:17:32 -0500 Subject: ui-blame: Distinguish hashes column from lines column Signed-off-by: Jeff Smith Reviewed-by: John Keeping --- cgit.css | 1 + 1 file changed, 1 insertion(+) (limited to 'cgit.css') diff --git a/cgit.css b/cgit.css index 836f8ae..893ebeb 100644 --- a/cgit.css +++ b/cgit.css @@ -300,6 +300,7 @@ div#cgit table.blob { border-top: solid 1px black; } +div#cgit table.blob td.hashes, div#cgit table.blob td.lines { margin: 0; padding: 0 0 0 0.5em; vertical-align: top; -- cgit v1.2.3-24-g4f1b From aafc42d8089437db5105feb12d540c33fe9f9e16 Mon Sep 17 00:00:00 2001 From: Jeff Smith Date: Tue, 17 Oct 2017 23:17:34 -0500 Subject: ui-blame: Make each column into a single table cell Signed-off-by: Jeff Smith Reviewed-by: John Keeping --- cgit.css | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'cgit.css') diff --git a/cgit.css b/cgit.css index 893ebeb..20b7e86 100644 --- a/cgit.css +++ b/cgit.css @@ -330,11 +330,26 @@ div#cgit table.ssdiff td.lineno a:hover { color: black; } -div#cgit table.blame tr:nth-child(even) { +div#cgit table.blame td.hashes, +div#cgit table.blame td.lines, +div#cgit table.blame td.linenumbers { + padding: 0; +} + +div#cgit table.blame td.hashes div.alt, +div#cgit table.blame td.lines div.alt { + padding: 0 0.5em 0 0.5em; +} + +div#cgit table.blame td.linenumbers div.alt { + padding: 0 0.5em 0 0; +} + +div#cgit table.blame div.alt:nth-child(even) { background: #eee; } -div#cgit table.blame tr:nth-child(odd) { +div#cgit table.blame div.alt:nth-child(odd) { background: white; } -- cgit v1.2.3-24-g4f1b From dbaee2672be14374acb17266477c19294c6155f3 Mon Sep 17 00:00:00 2001 From: Jeff Smith Date: Sat, 28 Oct 2017 21:43:26 -0500 Subject: ui-blame: Allow syntax highlighting Place file contents into a single block so that syntax highlighting can be applied in the usual fashion. Place the alternating color bars behind the file contents. Force the default syntax highlighting background to transparent. Signed-off-by: Jeff Smith Reviewed-by: John Keeping --- cgit.css | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cgit.css') diff --git a/cgit.css b/cgit.css index 20b7e86..217a05a 100644 --- a/cgit.css +++ b/cgit.css @@ -353,6 +353,16 @@ div#cgit table.blame div.alt:nth-child(odd) { background: white; } +div#cgit table.blame td.lines > div { + position: relative; +} + +div#cgit table.blame td.lines > div > pre { + padding: 0 0 0 0.5em; + position: absolute; + top: 0; +} + div#cgit table.bin-blob { margin-top: 0.5em; border: solid 1px black; -- cgit v1.2.3-24-g4f1b