changeset 306:4e5e4fc9f7fa

fixed rendering of modern for IE, Opera, Konqueror (as far as possible). TODO: other themes imported from: moin--main--1.5--patch-310
author Thomas Waldmann <tw@waldmann-edv.de>
date Sun, 11 Dec 2005 22:11:48 +0000
parents 5ed08461ab7d
children af55eede8076
files MoinMoin/theme/__init__.py MoinMoin/theme/modern.py docs/CHANGES wiki/htdocs/modern/css/screen.css
diffstat 4 files changed, 56 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/theme/__init__.py	Sat Dec 10 22:10:11 2005 +0000
+++ b/MoinMoin/theme/__init__.py	Sun Dec 11 22:11:48 2005 +0000
@@ -234,8 +234,8 @@
             else:
                 userlinks.append(preferencesPage.link_to(request, text=_("Login")))
 
-        userlinks = [u'<li>%s</li>\n' % link for link in userlinks]
-        html = u'<ul id="username">\n%s</ul>' % ''.join(userlinks)
+        userlinks = [u'<li>%s</li>' % link for link in userlinks]
+        html = u'<ul id="username">%s</ul>' % ''.join(userlinks)
         return html
 
     # Schemas supported in toolbar links, using [url label] format
@@ -391,7 +391,7 @@
             items.append(item % (cls, link))
 
         # Assemble html
-        items = u'\n'.join(items)
+        items = u''.join(items)
         html = u'''
 <ul id="navibar">
 %s
@@ -540,7 +540,7 @@
                 html = '''
 <ul id="pagetrail">
 %s
-</ul>''' % '\n'.join(items)
+</ul>''' % ''.join(items)
         return html
 
     def html_stylesheets(self, d):
@@ -856,7 +856,7 @@
         """ Create credits html from credits list """
         if isinstance(self.cfg.page_credits, (list, tuple)):
             items = ['<li>%s</li>' % i for i in self.cfg.page_credits]
-            html = '<ul id="credits">\n%s\n</ul>\n' % '\n'.join(items)
+            html = '<ul id="credits">\n%s\n</ul>\n' % ''.join(items)
         else:
             # Old config using string, output as is
             html = self.cfg.page_credits
@@ -1006,9 +1006,9 @@
         html = self._cache.get('editbar')
         if html is None:
             # Remove empty items and format as list
-            items = '\n'.join(['<li>%s</li>' % item
-                               for item in self.editbarItems(page) if item])
-            html = u'<ul class="editbar">\n%s\n</ul>\n' % items
+            items = ''.join(['<li>%s</li>' % item
+                             for item in self.editbarItems(page) if item])
+            html = u'<ul class="editbar">%s</ul>\n' % items
             self._cache['editbar'] = html
         
         return html
--- a/MoinMoin/theme/modern.py	Sat Dec 10 22:10:11 2005 +0000
+++ b/MoinMoin/theme/modern.py	Sun Dec 11 22:11:48 2005 +0000
@@ -28,8 +28,10 @@
             self.logo(),
             self.searchform(d),
             self.username(d),
+            u'<div id="locationline">',
             self.interwiki(d),
             self.title(d),
+            u'</div>',
             self.trail(d),
             self.navibar(d),
             #u'<hr id="pageline">',
--- a/docs/CHANGES	Sat Dec 10 22:10:11 2005 +0000
+++ b/docs/CHANGES	Sun Dec 11 22:11:48 2005 +0000
@@ -10,6 +10,8 @@
   Fixes:
     * Improved rendering of bullet lists and external links in Restructured text.
       Thanks to Matthew Gilbert.
+    * Fixed modern theme rendering, including some fixes and workarounds for
+      broken MS IE.
 
   Other changes:
     * Made it easier for auth methods needing a user interface (like ldap or
--- a/wiki/htdocs/modern/css/screen.css	Sat Dec 10 22:10:11 2005 +0000
+++ b/wiki/htdocs/modern/css/screen.css	Sun Dec 11 22:11:48 2005 +0000
@@ -10,8 +10,8 @@
 */
 
 body {
-    padding:0;
-    border:0;
+    padding: 0;
+    border: 0;
 }
 
 a:link { text-decoration: none; }
@@ -51,7 +51,7 @@
     margin: 5px 10px;
     padding: 0;
     /* For text only logo */
-    font-size: 22px;
+    font-size: 1.4em;
     line-height: 1em;
     font-weight: bold;
 }
@@ -71,6 +71,7 @@
 
 #username {
     display: inline;
+    margin: 0;
     padding: 0;
     text-align: right;
     font-size: 0.82em;
@@ -83,7 +84,7 @@
 
 #username li {
     display: inline;
-    padding: 0 0.2em;
+    padding: 0 0.5em 0 0;
 }
 
 #username form {
@@ -98,6 +99,11 @@
     background: #E7E7E7; /* inherit doesnt work on IE */
     color: blue;
     font-size: 0.82em;
+    cursor: pointer;
+}
+
+#username input:hover {
+    color: red;
 }
 
 #searchform {
@@ -105,7 +111,7 @@
     margin: 5px 10px;
     padding: 0;
     white-space: nowrap;
-    font-size: 13px;
+    font-size: 0.82em;
 }
 
 *[dir="rtl"] #searchform {
@@ -119,8 +125,8 @@
 #pagetrail {
     clear: right;
     display: block;
-    margin: 4px;
-    padding: 0 10px;
+    margin: 0.2em 0;
+    padding: 0;
     font-size: 0.88em;
 }
 
@@ -129,36 +135,33 @@
 }
 
 #interwiki {
-    float: left;
-    margin: 8px 0;
-    padding: 0 2px;
-    font-size: 18px;
-}
-
-*[dir="rtl"] #interwiki {
-    float: right;
+    display: inline;
+    font-size: 1em;
 }
 
 #interwiki span:after {
-    content: ": ";
+    content: ":";
+}
+
+#locationline {
+    clear: right;
+    padding: 3px 0;
+}
+
+*[dir="rtl"] #loc {
+    clear: left;
 }
 
 #pagelocation {
-    clear: right;
-    display: block;
-    margin: 8px 0;
-    padding: 0 10px;
-    font-size: 24px;
-}
-
-*[dir="rtl"] #pagelocation {
-    clear: left;
+    display: inline;
+    margin: 0 0.25em;
+    padding: 0;
+    font-size: 1.5em;
 }
 
 #pagetrail li, #pagelocation li {
     display: inline;
-    padding: 0 2px;
-    margin: 0 0 5px 0;
+    margin: 0;
 }
 
 /* XXX Warning: non-ascii characters! */
@@ -173,6 +176,12 @@
 #pagetrail li:last-child:after {
     content: "";
 }
+
+* html #pagetrail li, * html #pagelocation li { /* for broken IE */
+    border-left: 1px solid #AAA;
+    padding: 0 0.3em;
+}
+
 #pagelocation li:after {
     content: "/ ";
 }
@@ -191,7 +200,8 @@
     display: block;
     margin: 0;
     padding: 0 10px;
-    font-size: 13px;
+    font-size: 0.82em;
+    zoom: 1; /* for avoiding a gap between navibar and pageline on IE */
 }
 
 #navibar li {
@@ -252,7 +262,7 @@
     padding: 0 8px;
     white-space: nowrap;
     background: white;
-    font-size: 0.8em; /* 13px */
+    font-size: 0.8em;
 }
 
 .editbar form, .editbar form div {
@@ -397,7 +407,6 @@
     text-align: center;
     font-size: 0.88em;
     color: #6C7680;
-    font-size: 12px;
 }
 
 #credits li, #timings li {
@@ -445,3 +454,8 @@
  */
 * html span.anchor { display: none; }
 
+/*
+ul {
+    border: 1px solid #9C9C9C;
+}
+*/