all repos — elgit @ 6a7024290eab538e85a9f68fe88864953926158e

fork of legit: web frontend for git, written in go

add space and background to diff hunk headers

Alan Pearce
commit

6a7024290eab538e85a9f68fe88864953926158e

parent

6a6fbe78d84d9d93d1ea88e480188c31fc40bc0b

2 files changed, 6 insertions(+), 1 deletion(-)

jump to
M static/style.cssstatic/style.css
@@ -221,6 +221,7 @@ }
.diff pre { overflow: scroll; + margin-top: 1ex; } .diff-stat {
@@ -264,6 +265,10 @@ }
.diff-noop { color: var(--gray); +} + +.diff-hunk-header { + background-color: var(--light); } .ref {
M templates/commit.gotemplates/commit.go
@@ -89,7 +89,7 @@ Pre(
g.Group(g.Map(d.TextFragments, func(tf git.TextFragment) g.Node { return g.Group( []g.Node{ - Span(g.Attr("style", "display: block"), g.Text(tf.Header)), + Header(Class("diff-hunk-header"), g.Text(tf.Header)), g.Map(tf.Lines, func(line gitdiff.Line) g.Node { switch line.Op.String() { case "+":