[PATCH] hgweb: add RSS and Atom subscribe buttons to the main paper template pages

Angel Ezquerra angel.ezquerra at gmail.com
Mon Dec 3 17:41:56 CST 2012


# HG changeset patch
# User Angel Ezquerra <angel.ezquerra at gmail.com>
# Date 1354578089 -3600
# Node ID 62f1adcd73969f967098c08000ca50f129bcfd59
# Parent  41d3a5a1c8495cd599e5b422fddcdf93609b8101
hgweb: add RSS and Atom subscribe buttons to the main paper template pages

The buttons are found at the bottom of each page. They are similar to the
monoblue template buttons, but their colors have been changed to better match
the patper black, grey and white color palette of the paper style.

diff --git a/mercurial/templates/paper/bookmarks.tmpl b/mercurial/templates/paper/bookmarks.tmpl
--- a/mercurial/templates/paper/bookmarks.tmpl
+++ b/mercurial/templates/paper/bookmarks.tmpl
@@ -43,6 +43,12 @@
 </tr>
 {entries%bookmarkentry}
 </table>
+<div class="page-footer">
+<ul class="rss-logo">
+    <li><a href="{url}rss-bookmarks">RSS</a></li>
+    <li><a href="{url}atom-bookmarks">Atom</a></li>
+</ul>
+</div>
 </div>
 </div>
 
diff --git a/mercurial/templates/paper/branches.tmpl b/mercurial/templates/paper/branches.tmpl
--- a/mercurial/templates/paper/branches.tmpl
+++ b/mercurial/templates/paper/branches.tmpl
@@ -54,6 +54,12 @@
   </tr>'
 }
 </table>
+<div class="page-footer">
+<ul class="rss-logo">
+    <li><a href="{url}rss-branches">RSS</a></li>
+    <li><a href="{url}atom-branches">Atom</a></li>
+</ul>
+</div>
 </div>
 </div>
 
diff --git a/mercurial/templates/paper/graph.tmpl b/mercurial/templates/paper/graph.tmpl
--- a/mercurial/templates/paper/graph.tmpl
+++ b/mercurial/templates/paper/graph.tmpl
@@ -117,6 +117,13 @@
 | rev {rev}: {changenav%navgraph}
 </div>
 
+<div class="page-footer">
+<ul class="rss-logo">
+    <li><a href="{url}rss-log">RSS</a></li>
+    <li><a href="{url}atom-log">Atom</a></li>
+</ul>
+</div>
+
 </div>
 </div>
 
diff --git a/mercurial/templates/paper/shortlog.tmpl b/mercurial/templates/paper/shortlog.tmpl
--- a/mercurial/templates/paper/shortlog.tmpl
+++ b/mercurial/templates/paper/shortlog.tmpl
@@ -64,6 +64,13 @@
 | rev {rev}: {changenav%navshort}
 </div>
 
+<div class="page-footer">
+<ul class="rss-logo">
+    <li><a href="{url}rss-log">RSS</a></li>
+    <li><a href="{url}atom-log">Atom</a></li>
+</ul>
+</div>
+
 </div>
 </div>
 
diff --git a/mercurial/templates/paper/tags.tmpl b/mercurial/templates/paper/tags.tmpl
--- a/mercurial/templates/paper/tags.tmpl
+++ b/mercurial/templates/paper/tags.tmpl
@@ -43,7 +43,16 @@
 </tr>
 {entries%tagentry}
 </table>
-</div>
+
+<div class="page-footer">
+<ul class="rss-logo">
+    <li><a href="{url}rss-tags">RSS</a></li>
+    <li><a href="{url}atom-tags">Atom</a></li>
+</ul>
 </div>
 
+</div>
+</div>
+
+
 {footer}
diff --git a/mercurial/templates/static/style-paper.css b/mercurial/templates/static/style-paper.css
--- a/mercurial/templates/static/style-paper.css
+++ b/mercurial/templates/static/style-paper.css
@@ -312,3 +312,40 @@
 .block {
     border-top: 1px solid #999;
 }
+
+div.page-footer {
+  margin: 50px 0 0;
+  position: relative;
+}
+  div.page-footer p {
+    position: relative;
+    left: 20px;
+    bottom: 5px;
+    font-size: 1.2em;
+  }
+  ul.rss-logo {
+    position: absolute;
+    top: -10px;
+    right: 20px;
+    height: 20px;
+    list-style-type: none;
+  }
+  ul.rss-logo li {
+    display: inline;
+  }
+  ul.rss-logo li a {
+    padding: 3px 6px;
+    line-height: 10px;
+    border:1px solid;
+    border-color:#999999 #555555 #555555 #999999;
+    color:#333333;
+    background-color:#ffffff;
+    font-weight:bold;
+    font-family:sans-serif;
+    font-size:10px;
+    text-align:center;
+    text-decoration:none;
+  }
+  div.rss-logo li a:hover {
+    background-color:#ee5500;
+  }


More information about the Mercurial-devel mailing list