Patchwork [2,of,2] hgweb, monoblue: change RSS and Atom buttons into Atom subscribe icon and link

login
register
mail settings
Submitter Angel Ezquerra
Date Dec. 20, 2012, 11:07 p.m.
Message ID <47454b8cdde32bd33f32.1356044844@Angel-PC.localdomain>
Download mbox | patch
Permalink /patch/231/
State Superseded, archived
Headers show

Comments

Angel Ezquerra - Dec. 20, 2012, 11:07 p.m.
# HG changeset patch
# User Angel Ezquerra <angel.ezquerra at gmail.com>
# Date 1354874755 -3600
# Node ID 47454b8cdde32bd33f325aae8a22226ccfc50cc7
# Parent  245fc832b8b2b6405c54e915797114a2d3340e28
hgweb, monoblue: change RSS and Atom buttons into Atom subscribe icon and link

This change is similar to what was recently done for the paper template.

I have not removed the "subscribe" text that is to the right of the feed icon
because I feel that the feed icon without text looks a bit weird at the bottom
right side of the page.

Patch

diff --git a/mercurial/templates/monoblue/bookmarks.tmpl b/mercurial/templates/monoblue/bookmarks.tmpl
--- a/mercurial/templates/monoblue/bookmarks.tmpl
+++ b/mercurial/templates/monoblue/bookmarks.tmpl
@@ -36,10 +36,11 @@ 
     </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 class="atom-logo">
+            <a href="{url}atom-bookmarks" title="subscribe to atom feed">
+                <img class="atom-logo" src="{staticurl}feed-icon-14x14.png" alt="atom feed"> subscribe
+            </a>
+        </div>
     </div>
 
 {footer}
diff --git a/mercurial/templates/monoblue/branches.tmpl b/mercurial/templates/monoblue/branches.tmpl
--- a/mercurial/templates/monoblue/branches.tmpl
+++ b/mercurial/templates/monoblue/branches.tmpl
@@ -36,10 +36,11 @@ 
     </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 class="atom-logo">
+            <a href="{url}atom-branches" title="subscribe to atom feed">
+                <img class="atom-logo" src="{staticurl}feed-icon-14x14.png" alt="atom feed"> subscribe
+            </a>
+        </div>
     </div>
 
 {footer}
diff --git a/mercurial/templates/monoblue/changelog.tmpl b/mercurial/templates/monoblue/changelog.tmpl
--- a/mercurial/templates/monoblue/changelog.tmpl
+++ b/mercurial/templates/monoblue/changelog.tmpl
@@ -40,10 +40,11 @@ 
     </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 class="atom-logo">
+            <a href="{url}atom-log" title="subscribe to atom feed">
+                <img class="atom-logo" src="{staticurl}feed-icon-14x14.png" alt="atom feed"> subscribe
+            </a>
+        </div>
     </div>
 
 {footer}
diff --git a/mercurial/templates/monoblue/filelog.tmpl b/mercurial/templates/monoblue/filelog.tmpl
--- a/mercurial/templates/monoblue/filelog.tmpl
+++ b/mercurial/templates/monoblue/filelog.tmpl
@@ -50,10 +50,11 @@ 
     </div>
 
     <div class="page-footer">
-        <ul class="rss-logo">
-            <li><a href="{url}rss-log/{node|short}/{file|urlescape}">RSS</a></li>
-            <li><a href="{url}atom-log/{node|short}/{file|urlescape}">Atom</a></li>
-        </ul>
+        <div class="atom-logo">
+            <a href="{url}atom-log/{node|short}/{file|urlescape}" title="subscribe to atom feed">
+                <img class="atom-logo" src="{staticurl}feed-icon-14x14.png" alt="atom feed"> subscribe
+            </a>
+        </div>
     </div>
 
 {footer}
diff --git a/mercurial/templates/monoblue/graph.tmpl b/mercurial/templates/monoblue/graph.tmpl
--- a/mercurial/templates/monoblue/graph.tmpl
+++ b/mercurial/templates/monoblue/graph.tmpl
@@ -105,10 +105,11 @@ 
     </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 class="atom-logo">
+            <a href="{url}atom-log" title="subscribe to atom feed">
+                <img class="atom-logo" src="{staticurl}feed-icon-14x14.png" alt="atom feed"> subscribe
+            </a>
+        </div>
     </div>
 
 {footer}
diff --git a/mercurial/templates/monoblue/manifest.tmpl b/mercurial/templates/monoblue/manifest.tmpl
--- a/mercurial/templates/monoblue/manifest.tmpl
+++ b/mercurial/templates/monoblue/manifest.tmpl
@@ -51,10 +51,11 @@ 
     </table>
 
     <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 class="atom-logo">
+            <a href="{url}atom-log" title="subscribe to atom feed">
+                <img class="atom-logo" src="{staticurl}feed-icon-14x14.png" alt="atom feed"> subscribe
+            </a>
+        </div>
     </div>
 
 {footer}
diff --git a/mercurial/templates/monoblue/map b/mercurial/templates/monoblue/map
--- a/mercurial/templates/monoblue/map
+++ b/mercurial/templates/monoblue/map
@@ -248,9 +248,9 @@ 
     <td class="indexlinks">{archives%indexarchiveentry}</td>
     <td>
         {if(isdirectory, '',
-            '<div class="rss_logo">
-                <a href="{url}rss-log">RSS</a> <a href="{url}atom-log">Atom</a>
-            </div>'
+            '<a href="{url}atom-log" title="subscribe to repository atom feed">
+                <img class="atom-logo" src="{staticurl}feed-icon-14x14.png" alt="subscribe to repository atom feed">
+            </a>'
             )}
     </td>
   </tr>\n'
diff --git a/mercurial/templates/monoblue/shortlog.tmpl b/mercurial/templates/monoblue/shortlog.tmpl
--- a/mercurial/templates/monoblue/shortlog.tmpl
+++ b/mercurial/templates/monoblue/shortlog.tmpl
@@ -42,10 +42,11 @@ 
     </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 class="atom-logo">
+            <a href="{url}atom-log" title="subscribe to atom feed">
+                <img class="atom-logo" src="{staticurl}feed-icon-14x14.png" alt="atom feed"> subscribe
+            </a>
+        </div>
     </div>
 
 {footer}
diff --git a/mercurial/templates/monoblue/summary.tmpl b/mercurial/templates/monoblue/summary.tmpl
--- a/mercurial/templates/monoblue/summary.tmpl
+++ b/mercurial/templates/monoblue/summary.tmpl
@@ -75,9 +75,10 @@ 
     </table>
 
     <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 class="atom-logo">
+            <a href="{url}atom-log" title="subscribe to atom feed">
+                <img class="atom-logo" src="{staticurl}feed-icon-14x14.png" alt="atom feed"> subscribe
+            </a>
+        </div>
     </div>
 {footer}
diff --git a/mercurial/templates/monoblue/tags.tmpl b/mercurial/templates/monoblue/tags.tmpl
--- a/mercurial/templates/monoblue/tags.tmpl
+++ b/mercurial/templates/monoblue/tags.tmpl
@@ -36,9 +36,10 @@ 
     </table>
 
     <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 class="atom-logo">
+            <a href="{url}atom-tags" title="subscribe to atom feed">
+                <img class="atom-logo" src="{staticurl}feed-icon-14x14.png" alt="atom feed"> subscribe
+            </a>
+        </div>
     </div>
 {footer}
diff --git a/mercurial/templates/static/style-monoblue.css b/mercurial/templates/static/style-monoblue.css
--- a/mercurial/templates/static/style-monoblue.css
+++ b/mercurial/templates/static/style-monoblue.css
@@ -161,33 +161,15 @@ 
     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:#fcc7a5 #7d3302 #3e1a01 #ff954e;
-    color:#ffffff;
-    background-color:#ff6600;
-    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;
-  }
-
+div.atom-logo {
+  position: absolute;
+  top: -10px;
+  right: 20px;
+  z-index: 1000;
+  font-weight:bold;
+  font-family:sans-serif;
+}
+  
 p.normal {
   margin: 20px 0 20px 30px;
   font-size: 1.2em;