1.1 --- a/themes/mercurialwiki/css/screen.css Sun May 23 17:26:54 2010 +0200
1.2 +++ b/themes/mercurialwiki/css/screen.css Sun May 23 18:38:30 2010 +0200
1.3 @@ -62,20 +62,15 @@
1.4
1.5 /* Navigational and editing controls. */
1.6
1.7 -#navibar, .editbar {
1.8 +.controls {
1.9 float: right;
1.10 - margin: 17px 0 0 0;
1.11 - padding: 0;
1.12 - background: #999;
1.13 - white-space: nowrap;
1.14 + text-align: right;
1.15 }
1.16
1.17 -#navibar {
1.18 -
1.19 - /* NOTE: Using a fairly arbitrary size to allow the truncation of the menu. */
1.20 -
1.21 - max-width: 50%;
1.22 - overflow: hidden;
1.23 +#navibar, .editbar {
1.24 + display: inline-block;
1.25 + margin: 17px 0 2px 0;
1.26 + padding: 0;
1.27 }
1.28
1.29 #navibar li, .editbar li {
1.30 @@ -84,9 +79,19 @@
1.31 padding: 0;
1.32 }
1.33
1.34 -.editbar form, .editbar form div {
1.35 - display: inline;
1.36 +.editbar form, .editbar span {
1.37 +
1.38 + /* Need a block to redefine the height. */
1.39 +
1.40 + display: inline-block;
1.41 + height: 42px;
1.42 + line-height: 42px;
1.43 +
1.44 + /* Margin and padding correspond to the navibar settings. */
1.45 +
1.46 margin: 0;
1.47 + padding: 0 16px;
1.48 + background: #999;
1.49 }
1.50
1.51 #navibar a, .editbar a {
1.52 @@ -100,6 +105,7 @@
1.53 color: #fff;
1.54 margin: 0;
1.55 padding: 0 16px;
1.56 + background: #999;
1.57 text-decoration: none;
1.58 }
1.59
1.60 @@ -109,10 +115,6 @@
1.61 text-decoration: none;
1.62 }
1.63
1.64 -.editbar span {
1.65 - padding: 0 16px;
1.66 -}
1.67 -
1.68 /* Other elements. */
1.69
1.70 #logo {
1.71 @@ -136,11 +138,11 @@
1.72 }
1.73
1.74 #searchform {
1.75 - float: right;
1.76 + display: inline-block;
1.77
1.78 /* Margin and padding correspond to the navibar settings. */
1.79
1.80 - margin: 17px 0 0 0;
1.81 + margin: 17px 0 2px 0;
1.82 padding: 0 16px;
1.83 background: #999;
1.84
1.85 @@ -154,14 +156,6 @@
1.86 vertical-align: middle;
1.87 }
1.88
1.89 -.actionsmenu div {
1.90 -
1.91 - /* Margin and padding correspond to the navibar settings. */
1.92 - /* Set on the div to avoid accidental vertical expansion. */
1.93 -
1.94 - padding-right: 16px;
1.95 -}
1.96 -
1.97 #pageline, .pageline {
1.98
1.99 /* Prevent mixing of header and content elements. */
1.100 @@ -172,10 +166,6 @@
1.101 border-bottom: 1px solid #ccc;
1.102 }
1.103
1.104 -#footer .pageline {
1.105 - padding-top: 2px;
1.106 -}
1.107 -
1.108 #message {
1.109 clear: both;
1.110 margin: 0;
2.1 --- a/themes/mercurialwiki/mercurialwiki.py Sun May 23 17:26:54 2010 +0200
2.2 +++ b/themes/mercurialwiki/mercurialwiki.py Sun May 23 18:38:30 2010 +0200
2.3 @@ -108,8 +108,11 @@
2.4 html.append(fmt.div(on=1, attr={"id" : "header"}))
2.5
2.6 html.append(self.logo())
2.7 - html.append(self.searchform(d))
2.8 - html.append(self.navibar(d))
2.9 +
2.10 + html.append(fmt.div(on=1, attr={"class" : "controls"}))
2.11 + html.append(self.navibar(d).strip())
2.12 + html.append(self.searchform(d).strip())
2.13 + html.append(fmt.div(on=0))
2.14
2.15 html.append(fmt.div(on=0))
2.16
2.17 @@ -164,7 +167,9 @@
2.18 html.append(fmt.div(on=1, attr={"id" : "footer"}))
2.19
2.20 if self.shouldShowEditbar(page):
2.21 + html.append(fmt.div(on=1, attr={"class" : "controls"}))
2.22 html.append(self.editbar(d))
2.23 + html.append(fmt.div(on=0))
2.24
2.25 # A separator.
2.26
2.27 @@ -184,6 +189,19 @@
2.28
2.29 return u''.join(html)
2.30
2.31 + def actionsMenu(self, page):
2.32 +
2.33 + """ An overridden version of the actions menu
2.34 +
2.35 + This method strips the adjacent white-space from the generated menu.
2.36 +
2.37 + @param page: current page, Page object
2.38 + @rtype: unicode
2.39 + @return: actions menu html fragment
2.40 + """
2.41 +
2.42 + return ThemeBase.actionsMenu(self, page).strip()
2.43 +
2.44 # Theme instantiation.
2.45
2.46 def execute(request):