1.1 --- a/themes/ep2008/css/screen.css Sat Dec 01 01:03:05 2007 +0100
1.2 +++ b/themes/ep2008/css/screen.css Sat Dec 01 19:54:36 2007 +0100
1.3 @@ -135,17 +135,12 @@
1.4 }
1.5
1.6 #pagetrail {
1.7 - clear: right;
1.8 - display: inline;
1.9 + clear: both;
1.10 margin: 5px 12px;
1.11 padding: 0;
1.12 font-size: 0.88em;
1.13 }
1.14
1.15 -*[dir="rtl"] #pagetrail {
1.16 - clear: left;
1.17 -}
1.18 -
1.19 #interwiki {
1.20 margin: 5px 12px;
1.21 display: inline;
1.22 @@ -230,8 +225,6 @@
1.23 color: white;
1.24 }
1.25
1.26 -#navibar a, #navibar a:visited {color: white;}
1.27 -
1.28 #navibar li {
1.29 float: left;
1.30 display: inline;
1.31 @@ -249,8 +242,8 @@
1.32 }
1.33
1.34 #navibar a, #navibar a:visited {
1.35 - /* color: black; */
1.36 - text-decoration: none;
1.37 + text-decoration: none;
1.38 + color: white;
1.39 }
1.40
1.41 #navibar li.current a {
1.42 @@ -282,6 +275,7 @@
1.43 #contribute {
1.44 position: relative;
1.45 float: right;
1.46 + white-space: nowrap;
1.47 }
1.48
1.49 .contribute-hidden {
1.50 @@ -299,14 +293,50 @@
1.51 display: block;
1.52 }
1.53
1.54 -.editbar {
1.55 - clear: both;
1.56 - display: block;
1.57 +.username {
1.58 + background-color: #b21212;
1.59 +}
1.60 +
1.61 +.no-username {
1.62 + background-color: #073683;
1.63 +}
1.64 +
1.65 +.username, .no-username {
1.66 + color: white;
1.67 + padding: 2px 0.5em;
1.68 + white-space: nowrap;
1.69 +}
1.70 +
1.71 +#contribute .username, #contribute .no-username {
1.72 + display: inline;
1.73 margin: 0;
1.74 - padding: 0 8px;
1.75 + font-size: 0.88em;
1.76 +}
1.77 +
1.78 +.username a, .username a:visited, .username a:link, .no-username a, .no-username a:visited, .no-username a:link {
1.79 + text-decoration: none;
1.80 + color: white;
1.81 +}
1.82 +
1.83 +.editbar {
1.84 + display: inline;
1.85 + margin: 0;
1.86 + padding: 0;
1.87 + background-color: #aaa7c0; /* #b21212; */
1.88 + font-size: 0.88em;
1.89 +}
1.90 +
1.91 +ul.editbar {
1.92 + list-style-type: none;
1.93 +}
1.94 +
1.95 +.editbar li {
1.96 + display: inline;
1.97 + background-color: #aaa7c0; /* #b21212; */
1.98 + color: black;
1.99 + padding: 2px 0.5em;
1.100 + margin: 0;
1.101 white-space: nowrap;
1.102 - background: white;
1.103 - font-size: 0.8em;
1.104 }
1.105
1.106 .editbar form, .editbar form div {
1.107 @@ -314,14 +344,8 @@
1.108 margin: 0;
1.109 }
1.110
1.111 -.editbar li {
1.112 - display: inline;
1.113 - padding: 0;
1.114 - margin: 4px 6px;
1.115 -}
1.116 -
1.117 -*[dir="rtl"] .editbar li {
1.118 - float: right;
1.119 +.editbar form label, .editbar form select {
1.120 + font-size: 0.77em;
1.121 }
1.122
1.123 #header .editbar {
1.124 @@ -333,7 +357,15 @@
1.125 border-bottom: 1px solid #9C9C9C;
1.126 }
1.127
1.128 -.editbar a, .editbar a:visited { color: #0044B3; }
1.129 +.editbar a, .editbar a:visited, .editbar a:link {
1.130 + text-decoration: none;
1.131 + color: black;
1.132 +}
1.133 +
1.134 +.editbar li:hover {
1.135 + background-color: #8886a0; /* #e54545; */
1.136 + color: black;
1.137 +}
1.138
1.139 #message {
1.140 clear: both;
1.141 @@ -450,6 +482,7 @@
1.142 #contact {
1.143 padding: 2px;
1.144 margin-top: 10px;
1.145 + margin-bottom: 10px;
1.146 text-align: right;
1.147 background-color: #2b64a8;
1.148 color: white;
1.149 @@ -457,14 +490,17 @@
1.150
1.151 #contact a, #contact a:visited {color: white;}
1.152
1.153 -#credits, #version, #timings{
1.154 - margin: 5px 10px;
1.155 +#credits, #version, #timings {
1.156 + clear: both;
1.157 + margin: 10px 10px;
1.158 padding: 0;
1.159 text-align: center;
1.160 font-size: 0.88em;
1.161 color: #6C7680;
1.162 }
1.163
1.164 +#credits a, #credits a:visited {color: black;}
1.165 +
1.166 #credits li, #timings li {
1.167 display: inline;
1.168 padding: 0 2px;
2.1 --- a/themes/ep2008/ep2008.py Sat Dec 01 01:03:05 2007 +0100
2.2 +++ b/themes/ep2008/ep2008.py Sat Dec 01 19:54:36 2007 +0100
2.3 @@ -97,17 +97,18 @@
2.4 # Footer
2.5 u'<div id="footer">',
2.6 self.cfg.contact_string,
2.7 + u'<div id="contribute">',
2.8 + #self.cfg.contribute_string,
2.9 + #u'<div class="contribute-hidden">',
2.10 + #self.username(d),
2.11 + #u'<div id="locationline">',
2.12 + #self.interwiki(d),
2.13 + #self.title(d),
2.14 + #u'</div>',
2.15 + self.specialUsername(d),
2.16 + self.editbar(d),
2.17 self.trail(d),
2.18 - u'<div id="contribute">',
2.19 - self.cfg.contribute_string,
2.20 - u'<div class="contribute-hidden">',
2.21 - self.username(d),
2.22 - u'<div id="locationline">',
2.23 - self.interwiki(d),
2.24 - self.title(d),
2.25 - u'</div>',
2.26 - self.editbar(d),
2.27 - u'</div>',
2.28 + #u'</div>',
2.29 u'</div>',
2.30 self.credits(d),
2.31 self.showversion(d, **keywords),
2.32 @@ -118,6 +119,40 @@
2.33 ]
2.34 return u'\n'.join(html)
2.35
2.36 + def editbarItems(self, page):
2.37 + """ Return list of items to show on the editbar
2.38 +
2.39 + This is separate method to make it easy to customize the
2.40 + editbar in sub classes.
2.41 + """
2.42 +
2.43 + request = self.request
2.44 +
2.45 + items = [self.editorLink(page),
2.46 + self.infoLink(page),
2.47 + self.subscribeLink(page),
2.48 + self.quicklinkLink(page),]
2.49 +
2.50 + if page.isWritable() and request.user.valid and request.user.may.write(page.page_name):
2.51 + items.append(self.attachmentsLink(page))
2.52 +
2.53 + if request.user.valid:
2.54 + items.append(self.actionsMenu(page))
2.55 +
2.56 + return items
2.57 +
2.58 + def specialUsername(self, d):
2.59 + request = self.request
2.60 + _ = request.getText
2.61 +
2.62 + if request.user.valid and request.user.name:
2.63 + return u'<div class="username">%s</div>' % request.formatter.text(request.user.name)
2.64 + else:
2.65 + # NOTE: Using the contribute string!
2.66 + return u'<div class="no-username">%s</div>' % \
2.67 + d['page'].link_to(request, text=self.cfg.contribute_string,
2.68 + querystr={'action': 'login'}, id="login")
2.69 +
2.70 def execute(request):
2.71 """
2.72 Generate and return a theme object