changeset 557:05319d64f0b5

added css classes for TableOfContents macro imported from: moin--main--1.5--patch-561
author Thomas Waldmann <tw@waldmann-edv.de>
date Fri, 14 Apr 2006 09:28:44 +0000
parents 93b1464dff45
children 5d7784095004
files ChangeLog MoinMoin/macro/TableOfContents.py wiki/htdocs/classic/css/common.css wiki/htdocs/modern/css/common.css wiki/htdocs/rightsidebar/css/common.css
diffstat 5 files changed, 65 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Apr 13 15:55:52 2006 +0000
+++ b/ChangeLog	Fri Apr 14 09:28:44 2006 +0000
@@ -2,6 +2,23 @@
 # arch-tag: automatic-ChangeLog--arch@arch.thinkmo.de--2003-archives/moin--main--1.5
 #
 
+2006-04-14 10:28:44 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-561
+
+    Summary:
+      added css classes for TableOfContents macro
+    Revision:
+      moin--main--1.5--patch-561
+
+    added css classes for TableOfContents macro
+    
+
+    modified files:
+     ChangeLog MoinMoin/macro/TableOfContents.py
+     wiki/htdocs/classic/css/common.css
+     wiki/htdocs/modern/css/common.css
+     wiki/htdocs/rightsidebar/css/common.css
+
+
 2006-04-13 16:55:52 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-560
 
     Summary:
--- a/MoinMoin/macro/TableOfContents.py	Thu Apr 13 15:55:52 2006 +0000
+++ b/MoinMoin/macro/TableOfContents.py	Fri Apr 14 09:28:44 2006 +0000
@@ -38,6 +38,7 @@
 
     def __init__(self, macro, args):
         self.macro = macro
+        self._ = self.macro.request.getText
         
         self.inc_re = re.compile(r"^\[\[Include\((.*)\)\]\]")
         self.arg_re = re.compile(_args_re_pattern)
@@ -69,12 +70,19 @@
         return self.pre_re.sub('',apply(self.include_macro, args, kwargs)).split('\n')
 
     def run(self):
+        _ = self._
+        self.result.append(self.macro.formatter.div(1, css_class="table-of-contents"))
+        self.result.append(self.macro.formatter.paragraph(1, css_class="table-of-contents-heading"))
+        self.result.append(self.macro.formatter.escapedText(_('Contents')))
+        self.result.append(self.macro.formatter.paragraph(0))
+
         self.process_lines(self.pre_re.sub('',self.macro.parser.raw).split('\n'),
                            self.macro.formatter.page.page_name)
         # Close pending lists
         for i in range(self.baseindent, self.indent):
             self.result.append(self.macro.formatter.listitem(0))
             self.result.append(self.macro.formatter.number_list(0))
+        self.result.append(self.macro.formatter.div(0))
         return ''.join(self.result)
 
     def process_lines(self, lines, pagename):
--- a/wiki/htdocs/classic/css/common.css	Thu Apr 13 15:55:52 2006 +0000
+++ b/wiki/htdocs/classic/css/common.css	Fri Apr 14 09:28:44 2006 +0000
@@ -126,6 +126,18 @@
 .u {text-decoration: underline;}
 .strike {text-decoration: line-through;}
 
+/* TableOfContents macro */
+.table-of-contents { font-size: small;
+                     text-align:left;
+                     margin: 0.5em; padding-left: 2em;
+                     width:50%; }
+.table-of-contents ol { margin:0; margin-left:1em;
+                        list-style-type:decimal; }
+.table-of-contents ul { margin:0;
+                        list-style-type:none; }
+.table-of-contents-heading { font-weight:bold; padding:0; margin:0; }
+
+
 .footnotes ul {
 	padding: 0 2em;
 	margin: 0 0 1em;
--- a/wiki/htdocs/modern/css/common.css	Thu Apr 13 15:55:52 2006 +0000
+++ b/wiki/htdocs/modern/css/common.css	Fri Apr 14 09:28:44 2006 +0000
@@ -143,6 +143,20 @@
 	padding: 0;
 }
 
+/* TableOfContents macro */
+.table-of-contents { border: 1px solid #bbbbbb;
+                     color: black; background-color: #eeeeee;
+                     font-size: small;
+                     text-align:left;
+                     margin: 0.5em; padding-left: 2em;
+                     width:50%; }
+.table-of-contents ol { margin:0; margin-left:1em;
+                        list-style-type:decimal; }
+.table-of-contents ul { margin:0;
+                        list-style-type:none; }
+.table-of-contents-heading { font-weight:bold; padding:0; margin:0; }
+
+
 .footnotes div {
 	width: 5em;
 	border-top: 1pt solid gray;
--- a/wiki/htdocs/rightsidebar/css/common.css	Thu Apr 13 15:55:52 2006 +0000
+++ b/wiki/htdocs/rightsidebar/css/common.css	Fri Apr 14 09:28:44 2006 +0000
@@ -127,6 +127,20 @@
 .u {text-decoration: underline;}
 .strike {text-decoration: line-through;}
 
+/* TableOfContents macro */
+.table-of-contents { border: 1px solid #bbbbbb;
+                     color: black; background-color: #eeeeee;
+                     font-size: small;
+                     text-align:left;
+                     margin: 0.5em; padding-left: 2em;
+                     width:50%; }
+.table-of-contents ol { margin:0; margin-left:1em;
+                        list-style-type:decimal; }
+.table-of-contents ul { margin:0;
+                        list-style-type:none; }
+.table-of-contents-heading { font-weight:bold; padding:0; margin:0; }
+
+
 .footnotes ul {
 	padding: 0 2em;
 	margin: 0 0 1em;