# HG changeset patch # User Anton Shestakov # Date 1443155900 -28800 # Node ID f29ee23bf361f023a129796cabf8e466bce75b61 # Parent 3bfc473f4d336a6cb3f50760079c20a256f97461 gitweb, monoblue: port highlighting linked lines from paper This is adapted from 41c4bdd1d585, fbfe5748ef3e and f3393d458bf5. diff -r 3bfc473f4d33 -r f29ee23bf361 mercurial/templates/gitweb/map --- a/mercurial/templates/gitweb/map Fri Sep 25 03:02:38 2015 +0800 +++ b/mercurial/templates/gitweb/map Fri Sep 25 12:38:20 2015 +0800 @@ -95,12 +95,12 @@ fileline = ' {strip(line|escape, '\r\n')}' annotateline = ' - + {author|user}@{rev} -
{linenumber}
+
{linenumber}
{line|escape}
' difflineplus = ' @@ -117,9 +117,9 @@ {lines} ' comparisonline = ' - -
{leftlinenumber} {leftline|escape}
-
{rightlinenumber} {rightline|escape}
+ +
{leftlinenumber} {leftline|escape}
+
{rightlinenumber} {rightline|escape}
' changelogparent = ' diff -r 3bfc473f4d33 -r f29ee23bf361 mercurial/templates/monoblue/map --- a/mercurial/templates/monoblue/map Fri Sep 25 03:02:38 2015 +0800 +++ b/mercurial/templates/monoblue/map Fri Sep 25 12:38:20 2015 +0800 @@ -91,13 +91,13 @@ fileline = ' {strip(line|escape, '\r\n')}' annotateline = ' - + {author|user}@{rev} - {linenumber} + {linenumber} {line|escape} ' @@ -115,9 +115,9 @@ {lines} ' comparisonline = ' - - {leftlinenumber} {leftline|escape} - {rightlinenumber} {rightline|escape} + + {leftlinenumber} {leftline|escape} + {rightlinenumber} {rightline|escape} ' changesetlink = '{node|short}' diff -r 3bfc473f4d33 -r f29ee23bf361 mercurial/templates/static/style-gitweb.css --- a/mercurial/templates/static/style-gitweb.css Fri Sep 25 03:02:38 2015 +0800 +++ b/mercurial/templates/static/style-gitweb.css Fri Sep 25 12:38:20 2015 +0800 @@ -119,6 +119,11 @@ width: 4em; height: 1em; } +tr:target td, +pre.sourcelines > span:target, +pre.sourcelines.stripes > span:target { + background-color: #bfdfff; +} /* Graph */ div#wrapper { diff -r 3bfc473f4d33 -r f29ee23bf361 mercurial/templates/static/style-monoblue.css --- a/mercurial/templates/static/style-monoblue.css Fri Sep 25 03:02:38 2015 +0800 +++ b/mercurial/templates/static/style-monoblue.css Fri Sep 25 12:38:20 2015 +0800 @@ -300,6 +300,11 @@ pre.sourcelines.stripes > :nth-child(4n+3) { background-color: #FFFFFF; } pre.sourcelines.stripes > :nth-child(4n+1):hover, pre.sourcelines.stripes > :nth-child(4n+3):hover { background-color: #D5E1E6; } +tr:target td, +pre.sourcelines > span:target, +pre.sourcelines.stripes > span:target { + background-color: #bfdfff; +} td.source { white-space: pre; diff -r 3bfc473f4d33 -r f29ee23bf361 tests/test-hgweb.t --- a/tests/test-hgweb.t Fri Sep 25 03:02:38 2015 +0800 +++ b/tests/test-hgweb.t Fri Sep 25 12:38:20 2015 +0800 @@ -340,7 +340,7 @@ $ get-with-headers.py --twice localhost:$HGPORT 'static/style-gitweb.css' - date etag server 200 Script output follows - content-length: 6264 + content-length: 6379 content-type: text/css body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; } @@ -464,6 +464,11 @@ width: 4em; height: 1em; } + tr:target td, + pre.sourcelines > span:target, + pre.sourcelines.stripes > span:target { + background-color: #bfdfff; + } /* Graph */ div#wrapper {