Mercurial > hg-stable
changeset 26245:d53212d70893
hgweb: replace .sourcelast with .bottomline that does the same
In paper and Coal, basically, div.sourcelast was only used to make a 1px border
on the bottom of file source view (and only there). It's better to use
bottomline class, that also exists for the same purpose (visually), but is used
more widely and works without needing an empty <div>.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Mon, 14 Sep 2015 18:41:09 +0800 |
parents | 399e970e35c8 |
children | bf81b696b8f4 |
files | mercurial/templates/paper/filerevision.tmpl mercurial/templates/static/style-coal.css mercurial/templates/static/style-paper.css tests/test-hgweb-commands.t tests/test-highlight.t |
diffstat | 5 files changed, 6 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/templates/paper/filerevision.tmpl Sun Sep 13 21:01:34 2015 +0800 +++ b/mercurial/templates/paper/filerevision.tmpl Mon Sep 14 18:41:09 2015 +0800 @@ -71,8 +71,7 @@ <div class="overflow"> <div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div> <div class="sourcefirst"> line source</div> -<pre class="sourcelines stripes4 wrap">{text%fileline}</pre> -<div class="sourcelast"></div> +<pre class="sourcelines stripes4 wrap bottomline">{text%fileline}</pre> </div> </div> </div>
--- a/mercurial/templates/static/style-coal.css Sun Sep 13 21:01:34 2015 +0800 +++ b/mercurial/templates/static/style-coal.css Mon Sep 14 18:41:09 2015 +0800 @@ -208,14 +208,13 @@ .bigtable td.annotate { font-size: smaller; } .bigtable td.source { font-size: inherit; } -.source, .sourcefirst, .sourcelast { +.source, .sourcefirst { font-family: monospace; white-space: pre; padding: 1px 4px; font-size: 90%; } .sourcefirst { border-bottom: 1px solid #999; font-weight: bold; } -.sourcelast { border-top: 1px solid #999; } .source a { color: #999; font-size: smaller; font-family: monospace;} .bottomline { border-bottom: 1px solid #999; }
--- a/mercurial/templates/static/style-paper.css Sun Sep 13 21:01:34 2015 +0800 +++ b/mercurial/templates/static/style-paper.css Mon Sep 14 18:41:09 2015 +0800 @@ -209,14 +209,13 @@ .bigtable td.annotate { font-size: smaller; } .bigtable td.source { font-size: inherit; } -.source, .sourcefirst, .sourcelast { +.source, .sourcefirst { font-family: monospace; white-space: pre; padding: 1px 4px; font-size: 90%; } .sourcefirst { border-bottom: 1px solid #999; font-weight: bold; } -.sourcelast { border-top: 1px solid #999; } .source a { color: #999; font-size: smaller; font-family: monospace;} .bottomline { border-bottom: 1px solid #999; }
--- a/tests/test-hgweb-commands.t Sun Sep 13 21:01:34 2015 +0800 +++ b/tests/test-hgweb-commands.t Mon Sep 14 18:41:09 2015 +0800 @@ -1335,9 +1335,8 @@ <div class="overflow"> <div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div> <div class="sourcefirst"> line source</div> - <pre class="sourcelines stripes4 wrap"> + <pre class="sourcelines stripes4 wrap bottomline"> <span id="l1">foo</span><a href="#l1"></a></pre> - <div class="sourcelast"></div> </div> </div> </div> @@ -1462,9 +1461,8 @@ <div class="overflow"> <div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div> <div class="sourcefirst"> line source</div> - <pre class="sourcelines stripes4 wrap"> + <pre class="sourcelines stripes4 wrap bottomline"> <span id="l1">another</span><a href="#l1"></a></pre> - <div class="sourcelast"></div> </div> </div> </div>
--- a/tests/test-highlight.t Sun Sep 13 21:01:34 2015 +0800 +++ b/tests/test-highlight.t Mon Sep 14 18:41:09 2015 +0800 @@ -142,7 +142,7 @@ <div class="overflow"> <div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div> <div class="sourcefirst"> line source</div> - <pre class="sourcelines stripes4 wrap"> + <pre class="sourcelines stripes4 wrap bottomline"> <span id="l1"><span class="c">#!/usr/bin/env python</span></span><a href="#l1"></a> <span id="l2"></span><a href="#l2"></a> <span id="l3"><span class="sd">"""Fun with generators. Corresponding Haskell implementation:</span></span><a href="#l3"></a> @@ -176,7 +176,6 @@ <span id="l31"> <span class="n">p</span> <span class="o">=</span> <span class="n">primes</span><span class="p">()</span></span><a href="#l31"></a> <span id="l32"> <span class="kn">print</span> <span class="s">"The first </span><span class="si">%d</span><span class="s"> primes: </span><span class="si">%s</span><span class="s">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="nb">list</span><span class="p">(</span><span class="n">islice</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">n</span><span class="p">)))</span></span><a href="#l32"></a> <span id="l33"></span><a href="#l33"></a></pre> - <div class="sourcelast"></div> </div> </div> </div>