hgweb: use separate CSS class for navigation links in footer
authorGregory Szorc <gregory.szorc@gmail.com>
Tue, 20 Jun 2017 20:53:29 -0700
changeset 32992 816a4fa7d5f8
parent 32991 03608e8d09e9
child 32993 d8b40230c8e8
hgweb: use separate CSS class for navigation links in footer 2d93d2159e30 changed the styling of the "page_nav" CSS class to use flexbox to separate elements within the <div>. I didn't realize that this class was used outside of the links in the header. So this resulted in incorrectly formatting links in the footer of various pages. Fix that by introducing a new CSS class that preserves the old CSS behavior.
mercurial/templates/gitweb/changelog.tmpl
mercurial/templates/gitweb/filelog.tmpl
mercurial/templates/gitweb/graph.tmpl
mercurial/templates/gitweb/shortlog.tmpl
mercurial/templates/static/style-gitweb.css
tests/test-hgweb-commands.t
tests/test-hgweb.t
--- a/mercurial/templates/gitweb/changelog.tmpl	Sat Jun 17 13:25:42 2017 +0200
+++ b/mercurial/templates/gitweb/changelog.tmpl	Tue Jun 20 20:53:29 2017 -0700
@@ -31,7 +31,7 @@
 
 {entries%changelogentry}
 
-<div class="page_nav">
+<div class="extra_nav">
 {changenav%nav}<br/>
 </div>
 
--- a/mercurial/templates/gitweb/filelog.tmpl	Sat Jun 17 13:25:42 2017 +0200
+++ b/mercurial/templates/gitweb/filelog.tmpl	Tue Jun 20 20:53:29 2017 -0700
@@ -43,7 +43,7 @@
 {entries%filelogentry}
 </table>
 
-<div class="page_nav">
+<div class="extra_nav">
 <a href="{url|urlescape}log/{symrev}/{file|urlescape}{lessvars%urlparameter}">less</a>
 <a href="{url|urlescape}log/{symrev}/{file|urlescape}{morevars%urlparameter}">more</a>
 {nav%filenav}
--- a/mercurial/templates/gitweb/graph.tmpl	Sat Jun 17 13:25:42 2017 +0200
+++ b/mercurial/templates/gitweb/graph.tmpl	Tue Jun 20 20:53:29 2017 -0700
@@ -99,7 +99,7 @@
 // stop hiding script -->
 </script>
 
-<div class="page_nav">
+<div class="extra_nav">
 <a href="{url|urlescape}graph/{symrev}{lessvars%urlparameter}">less</a>
 <a href="{url|urlescape}graph/{symrev}{morevars%urlparameter}">more</a>
 | {changenav%navgraph}
--- a/mercurial/templates/gitweb/shortlog.tmpl	Sat Jun 17 13:25:42 2017 +0200
+++ b/mercurial/templates/gitweb/shortlog.tmpl	Tue Jun 20 20:53:29 2017 -0700
@@ -33,7 +33,7 @@
 {entries%shortlogentry}
 </table>
 
-<div class="page_nav">
+<div class="extra_nav">
 {changenav%navshort}
 </div>
 
--- a/mercurial/templates/static/style-gitweb.css	Sat Jun 17 13:25:42 2017 +0200
+++ b/mercurial/templates/static/style-gitweb.css	Tue Jun 20 20:53:29 2017 -0700
@@ -11,6 +11,12 @@
     align-items: center;
 }
 div.page_nav a:visited { color:#0000cc; }
+div.extra_nav {
+    padding: 8px;
+}
+div.extra_nav a:visited {
+    color: #0000cc;
+}
 div.page_path { padding:8px; border:solid #d9d8d1; border-width:0px 0px 1px}
 div.page_footer { padding:4px 8px; background-color: #d9d8d1; }
 div.page_footer_text { float:left; color:#555555; font-style:italic; }
--- a/tests/test-hgweb-commands.t	Sat Jun 17 13:25:42 2017 +0200
+++ b/tests/test-hgweb-commands.t	Tue Jun 20 20:53:29 2017 -0700
@@ -1832,7 +1832,7 @@
   // stop hiding script -->
   </script>
   
-  <div class="page_nav">
+  <div class="extra_nav">
   <a href="/graph/tip?revcount=30&style=gitweb">less</a>
   <a href="/graph/tip?revcount=120&style=gitweb">more</a>
   | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/tip?style=gitweb">tip</a> 
--- a/tests/test-hgweb.t	Sat Jun 17 13:25:42 2017 +0200
+++ b/tests/test-hgweb.t	Tue Jun 20 20:53:29 2017 -0700
@@ -340,7 +340,7 @@
 
   $ get-with-headers.py --twice localhost:$HGPORT 'static/style-gitweb.css' - date etag server
   200 Script output follows
-  content-length: 8265
+  content-length: 8349
   content-type: text/css
   
   body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; background: white; color: black; }
@@ -356,6 +356,12 @@
       align-items: center;
   }
   div.page_nav a:visited { color:#0000cc; }
+  div.extra_nav {
+      padding: 8px;
+  }
+  div.extra_nav a:visited {
+      color: #0000cc;
+  }
   div.page_path { padding:8px; border:solid #d9d8d1; border-width:0px 0px 1px}
   div.page_footer { padding:4px 8px; background-color: #d9d8d1; }
   div.page_footer_text { float:left; color:#555555; font-style:italic; }