Attachment 'toc-formatting-patch.diff'
Download 1 diff -ur moin-1.5.0/MoinMoin/macro/TableOfContents.py moin-1.5.0-toc-formatting-patch/MoinMoin/macro/TableOfContents.py
2 --- moin-1.5.0/MoinMoin/macro/TableOfContents.py 2005-09-22 12:22:09.000000000 -0400
3 +++ moin-1.5.0-toc-formatting-patch/MoinMoin/macro/TableOfContents.py 2006-01-16 10:15:20.000000000 -0500
4 @@ -38,6 +38,7 @@
5
6 def __init__(self, macro, args):
7 self.macro = macro
8 + self._ = self.macro.request.getText
9
10 self.inc_re = re.compile(r"^\[\[Include\((.*)\)\]\]")
11 self.arg_re = re.compile(_args_re_pattern)
12 @@ -69,12 +70,19 @@
13 return self.pre_re.sub('',apply(self.include_macro, args, kwargs)).split('\n')
14
15 def run(self):
16 + _ = self._
17 + self.result.append(self.macro.formatter.startContent(css_class="table-of-contents"))
18 + self.result.append(self.macro.formatter.paragraph(1,css_class="table-of-contents-heading"))
19 + self.result.append(self.macro.formatter.escapedText(_('Contents')))
20 + self.result.append(self.macro.formatter.paragraph(0))
21 +
22 self.process_lines(self.pre_re.sub('',self.macro.parser.raw).split('\n'),
23 self.macro.formatter.page.page_name)
24 # Close pending lists
25 for i in range(self.baseindent, self.indent):
26 self.result.append(self.macro.formatter.listitem(0))
27 self.result.append(self.macro.formatter.number_list(0))
28 + self.result.append(self.macro.formatter.endContent())
29 return ''.join(self.result)
30
31 def process_lines(self, lines, pagename):
32 diff -ur moin-1.5.0/wiki/htdocs/classic/css/common.css moin-1.5.0-toc-formatting-patch/wiki/htdocs/classic/css/common.css
33 --- moin-1.5.0/wiki/htdocs/classic/css/common.css 2005-12-17 16:22:37.000000000 -0500
34 +++ moin-1.5.0-toc-formatting-patch/wiki/htdocs/classic/css/common.css 2006-01-16 11:04:59.000000000 -0500
35 @@ -113,6 +113,18 @@
36 /* Replacement for html 3 u tag */
37 .u {text-decoration: underline;}
38
39 +/* TableOfContents macro */
40 +.table-of-contents { font-size: small;
41 + text-align:left;
42 + margin: 0.5em; padding-left: 2em;
43 + width:50%; }
44 +.table-of-contents ol { margin:0; margin-left:1em;
45 + list-style-type:decimal; }
46 +.table-of-contents ul { margin:0;
47 + list-style-type:none; }
48 +.table-of-contents-heading { font-weight:bold; padding:0; margin:0; }
49 +
50 +
51 .footnotes ul {
52 padding: 0 2em;
53 margin: 0 0 1em;
54 diff -ur moin-1.5.0/wiki/htdocs/modern/css/common.css moin-1.5.0-toc-formatting-patch/wiki/htdocs/modern/css/common.css
55 --- moin-1.5.0/wiki/htdocs/modern/css/common.css 2005-12-17 16:18:10.000000000 -0500
56 +++ moin-1.5.0-toc-formatting-patch/wiki/htdocs/modern/css/common.css 2006-01-16 11:03:37.000000000 -0500
57 @@ -143,6 +143,20 @@
58 padding: 0;
59 }
60
61 +/* TableOfContents macro */
62 +.table-of-contents { border: 1px solid #bbbbbb;
63 + color: black; background-color: #eeeeee;
64 + font-size: small;
65 + text-align:left;
66 + margin: 0.5em; padding-left: 2em;
67 + width:50%; }
68 +.table-of-contents ol { margin:0; margin-left:1em;
69 + list-style-type:decimal; }
70 +.table-of-contents ul { margin:0;
71 + list-style-type:none; }
72 +.table-of-contents-heading { font-weight:bold; padding:0; margin:0; }
73 +
74 +
75 .footnotes div {
76 width: 5em;
77 border-top: 1pt solid gray;
78 diff -ur moin-1.5.0/wiki/htdocs/rightsidebar/css/common.css moin-1.5.0-toc-formatting-patch/wiki/htdocs/rightsidebar/css/common.css
79 --- moin-1.5.0/wiki/htdocs/rightsidebar/css/common.css 2005-12-17 16:24:52.000000000 -0500
80 +++ moin-1.5.0-toc-formatting-patch/wiki/htdocs/rightsidebar/css/common.css 2006-01-16 11:05:23.000000000 -0500
81 @@ -126,6 +126,20 @@
82 /* Replacement for html 3 u tag */
83 .u {text-decoration: underline;}
84
85 +/* TableOfContents macro */
86 +.table-of-contents { border: 1px solid #bbbbbb;
87 + color: black; background-color: #eeeeee;
88 + font-size: small;
89 + text-align:left;
90 + margin: 0.5em; padding-left: 2em;
91 + width:50%; }
92 +.table-of-contents ol { margin:0; margin-left:1em;
93 + list-style-type:decimal; }
94 +.table-of-contents ul { margin:0;
95 + list-style-type:none; }
96 +.table-of-contents-heading { font-weight:bold; padding:0; margin:0; }
97 +
98 +
99 .footnotes ul {
100 padding: 0 2em;
101 margin: 0 0 1em;
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.