Mercurial > hg
changeset 29573:2b42fa1810c4
gitweb: make different blocks of annotated lines have different colors
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 16 Jul 2016 15:00:36 +0800 |
parents | d86b54d9bb0c |
children | 0484dfa1e972 |
files | mercurial/templates/gitweb/map mercurial/templates/static/style-gitweb.css tests/test-hgweb.t |
diffstat | 3 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/templates/gitweb/map Sat Jul 16 14:49:07 2016 +0800 +++ b/mercurial/templates/gitweb/map Sat Jul 16 15:00:36 2016 +0800 @@ -96,7 +96,7 @@ <a href="#{lineid}"></a><span id="{lineid}">{strip(line|escape, '\r\n')}</span>' annotateline = ' <tr id="{lineid}" style="font-family:monospace" class="parity{parity}{ifeq(node, originalnode, ' thisrev')}"> - <td class="annotate linenr" style="text-align: right;"> + <td class="annotate linenr parity{blockparity}" style="text-align: right;"> {if(blockhead, '<a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}"> {rev}
--- a/mercurial/templates/static/style-gitweb.css Sat Jul 16 14:49:07 2016 +0800 +++ b/mercurial/templates/static/style-gitweb.css Sat Jul 16 15:00:36 2016 +0800 @@ -29,6 +29,7 @@ a.list:hover { text-decoration:underline; color:#880000; } table { padding:8px 4px; } th { padding:2px 5px; font-size:12px; text-align:left; } +.parity0 { background-color:#ffffff; } tr.dark, .parity1, pre.sourcelines.stripes > :nth-child(4n+4) { background-color:#f6f6f0; } tr.light:hover, .parity0:hover, tr.dark:hover, .parity1:hover, pre.sourcelines.stripes > :nth-child(4n+2):hover,
--- a/tests/test-hgweb.t Sat Jul 16 14:49:07 2016 +0800 +++ b/tests/test-hgweb.t Sat Jul 16 15:00:36 2016 +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: 6908 + content-length: 6947 content-type: text/css body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; background: white; color: black; } @@ -374,6 +374,7 @@ a.list:hover { text-decoration:underline; color:#880000; } table { padding:8px 4px; } th { padding:2px 5px; font-size:12px; text-align:left; } + .parity0 { background-color:#ffffff; } tr.dark, .parity1, pre.sourcelines.stripes > :nth-child(4n+4) { background-color:#f6f6f0; } tr.light:hover, .parity0:hover, tr.dark:hover, .parity1:hover, pre.sourcelines.stripes > :nth-child(4n+2):hover,