# HG changeset patch # User Paul Boddie # Date 1296946947 -3600 # Node ID fb7515638e06e10581fdb5662fdd736ffaea6f10 # Parent 6e3c0abc7f34c53977ace11e35089ec2a0de8291 Added a link to the footer next to the username controls. diff -r 6e3c0abc7f34 -r fb7515638e06 themes/mercurialwiki/css/screen.css --- a/themes/mercurialwiki/css/screen.css Sat Feb 05 21:57:40 2011 +0100 +++ b/themes/mercurialwiki/css/screen.css Sun Feb 06 00:02:27 2011 +0100 @@ -300,11 +300,11 @@ float: left; } -#credits, #version, #timings, #username { +#credits, #version, #timings, #username, .footer-link { float: right; } -#pagetrail, #credits, #version, #timings, #username { +#pagetrail, #credits, #version, #timings, #username, .footer-link { /* Styling similar to the main site. */ @@ -319,7 +319,7 @@ font-size: .6428em; } -#pagetrail, #username { +#pagetrail, #username, .footer-link { /* Styling similar to the main site. */ @@ -340,7 +340,11 @@ vertical-align: middle; } -#pagetrail a, #credits a, #username a { +#pagetrail a, #credits a, #username a, .footer-link a { + text-decoration: none; +} + +.footer-link a:hover { text-decoration: none; } diff -r 6e3c0abc7f34 -r fb7515638e06 themes/mercurialwiki/mercurialwiki.py --- a/themes/mercurialwiki/mercurialwiki.py Sat Feb 05 21:57:40 2011 +0100 +++ b/themes/mercurialwiki/mercurialwiki.py Sun Feb 06 00:02:27 2011 +0100 @@ -120,6 +120,7 @@ html.append(fmt.div(on=0)) html.append(self.trail(d)) + html.append(self.footerLink(d)) html.append(self.username(d)) html.append(fmt.div(on=0)) @@ -193,7 +194,6 @@ return u''.join(html) def actionsMenu(self, page): - """ An overridden version of the actions menu This method strips the adjacent white-space from the generated menu. @@ -205,6 +205,26 @@ return ThemeBase.actionsMenu(self, page).strip() + def footerLink(self, d): + """ Make link to the page footer + + @param d: parameter dictionary + @rtype: unicode + @return: page footer link html + """ + + request = self.request + fmt = request.formatter + html = [] + + html.append(fmt.div(on=1, attr={"class" : "footer-link"})) + html.append(fmt.anchorlink(on=1, name="footer")) + html.append("↓") + html.append(fmt.anchorlink(on=0)) + html.append(fmt.div(on=0)) + + return u''.join(html) + # Theme instantiation. def execute(request):