Contents
Como implementar HTML en moinmoin
agregar la linea en /etc/moin/nombredelawiki.py (archivo de configuración de cada wiki si usa multiwiki)
theme_default = 'buenosaireslibre'
bajar el .tar que contiene el theme BuenosAiresLibre
buenosaireslibre.tar.gz buenosaireslibre.py
destino de los directorios: la carpeta "buenosaireslibre" va en /../htdocs/buenosaireslibre (ejemplo /usr/share/moin/htdocs/buenosaireslibre en el mismo directorio tiene que estar las carpetas modern, classic, etc.) y el archivo "buenosaireslibre.py" /../theme/buenosaireslibre.py (ejemplo /var/lib/python-support/python2.5/MoinMoin/theme/buenosaireslibre.py )
- de no encontrar estos directorios la forma mas simple es buscar el theme principal de moinmoin "modern", buscamos donde esta la carpeta "modern" y el archivo "modern.py".
Queda asi
Codigo
Archivo buenosaireslibre.py
- /var/lib/python-support/python2.5/MoinMoin/theme/buenosaireslibre.py
1 MoinMoin - modern theme
2
3 @copyright: 2003-2005 Nir Soffer, Thomas Waldmann
4 @license: GNU GPL, see COPYING for details.
5 """
6
7 from MoinMoin.theme import ThemeBase
8
9 class Theme(ThemeBase):
10
11 name = "buenosaireslibre"
12
13 def header(self, d, **kw):
14 """ Assemble wiki header
15 @param d: parameter dictionary
16 @rtype: unicode
17 @return: page header html
18 """
19 html = [
20 # Pre header custom html
21 #arranca codigo BuenosAiresLibre
22 #Por Matias Alberto Fernandez
23
24 # u'<div id="header">',
25 # self.logo(),
26
27 u'<div class="flotante">', self.searchform(d), u'</div>',
28 u'<table class="body_container" border="0" cellspacing="0" cellpadding="1">',
29 u'<tr>',
30 u'<td class="top_container">',
31 u'<div class="top_container_login">', self.username(d), self.trail(d), u'</div>',
32 u'<div class="top_container_title"></div>',
33 u'<div class="top_container_menu">',
34 u'<a href="http://www.buenosaireslibre.org/" class="top_menu_option">BuenosAiresLibre</a>',
35 u'<a href="http://wiki.buenosaireslibre.org/" class="top_menu_option top_menu_option_selected">Wiki</a>',
36 u'<a href="http://balls.buenosaireslibre.org/" class="top_menu_option">BALLS</a>',
37 u'<a href="http://mapa.buenosaireslibre.org/" class="top_menu_option">Mapa</a>',
38 u'<a href="http://galeria.buenosaireslibre.org/" class="top_menu_option">Galería</a>',
39 u'<a href="www.buenosaireslibre.org/irc/client/pjirc_2_2_1_bin/NormalApplet.html" class="top_menu_option">Chat</a>',
40 u'</div>',
41 u'<div class="top_delimiter"></div>',
42 self.navibar(d),
43
44 u'</td>',
45 u'</tr>',
46 u'</table>',
47
48
49
50
51
52
53
54
55 # self.emit_custom_html(self.cfg.page_header1),
56
57 # Header
58
59 # self.searchform(d),
60 # u'</div>',
61 # self.trail(d),
62 # u'<hr id="pageline">',
63 # u'<div id="pageline"><hr style="display:none;"></div>',
64 self.msg(d),
65 self.editbar(d),
66 # u'</div>',
67
68 # Post header custom html (not recommended)
69 self.emit_custom_html(self.cfg.page_header2),
70
71 # # Start of page
72 self.startPage(),
73 u'<div id="locationline">',
74 # self.interwiki(d),
75 # self.title(d),
76
77
78
79 ]
80 return u'\n'.join(html)
81
82 def editorheader(self, d, **kw):
83 """ Assemble wiki header for editor
84
85 @param d: parameter dictionary
86 @rtype: unicode
87 @return: page header html
88 """
89 html = [
90 # Pre header custom html
91 self.emit_custom_html(self.cfg.page_header1),
92
93 # Header
94 u'<div id="header">',
95 self.title(d),
96 self.msg(d),
97 u'</div>',
98
99 # Post header custom html (not recommended)
100 self.emit_custom_html(self.cfg.page_header2),
101
102 # Start of page
103 self.startPage(),
104 ]
105 return u'\n'.join(html)
106
107 def footer(self, d, **keywords):
108 """ Assemble wiki footer
109
110 @param d: parameter dictionary
111 @keyword ...:...
112 @rtype: unicode
113 @return: page footer html
114 """
115 page = d['page']
116 html = [
117 # End of page
118 self.pageinfo(page),
119 self.endPage(),
120
121 # Pre footer custom html (not recommended!)
122 self.emit_custom_html(self.cfg.page_footer1),
123
124 # Footer
125 u'<div id="footer">',
126 self.editbar(d),
127 self.credits(d),
128 self.showversion(d, **keywords),
129 u'</div>',
130
131 # Post footer custom html
132 self.emit_custom_html(self.cfg.page_footer2),
133 ]
134 return u'\n'.join(html)
135
136
137 def execute(request):
138 """
139 Generate and return a theme object
140
141 @param request: the request object
142 @rtype: MoinTheme
143 @return: Theme object
144 """
145 return Theme(request)
146
Codigo CSS del archivo common.css
- El codigo de BAL es desde la linea 524 al final
1 /* common.css - MoinMoin Default Styles
2
3 Copyright (c) 2001, 2002, 2003 by Juergen Hermann
4 */
5
6 /* content styles */
7
8 html {
9 background-color: white;
10 color: black;
11 font-family: Arial, Lucida Grande, sans-serif;
12 font-size: 1em;
13 }
14
15 body {
16 margin: 0;
17 }
18
19 /* Links */
20
21 a {color: #0044B3;}
22 a:visited {color: #597BB3;}
23 a.nonexistent, a.badinterwiki {color: gray;}
24
25 a.www:before {content: url(../img/moin-www.png); margin: 0 0.2em;}
26 a.http:before {content: url(../img/moin-www.png); margin: 0 0.2em;}
27 a.https:before {content: url(../img/moin-www.png); margin: 0 0.2em;}
28 a.file:before {content: url(../img/moin-ftp.png); margin: 0 0.2em;}
29 a.ftp:before {content: url(../img/moin-ftp.png); margin: 0 0.2em;}
30 a.nntp:before {content: url(../img/moin-news.png); margin: 0 0.2em;}
31 a.news:before {content: url(../img/moin-news.png); margin: 0 0.2em;}
32 a.telnet:before {content: url(../img/moin-telnet.png); margin: 0 0.2em;}
33 a.irc:before,a.ircs:before {content: url(../img/moin-telnet.png); margin: 0 0.2em;}
34 a.mailto:before {content: url(../img/moin-email.png); margin: 0 0.2em;}
35 a.attachment:before {content: url(../img/moin-attach.png); margin: 0 0.2em;}
36 a.badinterwiki:before {content: url(../img/moin-inter.png); margin: 0 0.2em;}
37 a.interwiki:before {content: url(../img/moin-inter.png); margin: 0 0.2em;}
38
39 li p {
40 margin: .25em 0;
41 }
42
43 li.gap {
44 margin-top: 0.5em;
45 }
46
47 dt {
48 margin-top: 0.5em;
49 font-weight: bold;
50 }
51
52 dd {
53 margin-top: 0;
54 margin-bottom: 0;
55 }
56
57 dd p {
58 margin: 0.25em 0;
59 }
60
61 a, img, img.drawing {
62 border: 0;
63 }
64
65 pre {
66 border: 1pt solid #AEBDCC;
67 background-color: #F3F5F7;
68 padding: 5pt;
69 font-family: courier, monospace;
70 white-space: pre;
71 /* begin css 3 or browser specific rules - do not remove!
72 see: http://forums.techguy.org/archive/index.php/t-249849.html */
73 white-space: pre-wrap;
74 word-wrap: break-word;
75 white-space: -moz-pre-wrap;
76 white-space: -pre-wrap;
77 white-space: -o-pre-wrap;
78 /* end css 3 or browser specific rules */
79 }
80
81 pre.comment {
82 background-color: #CCCCCC;
83 color: red;
84 padding: 0;
85 margin: 0;
86 border: 0;
87 }
88
89 pre.comment:before {
90 content: url(../img/attention.png);
91 }
92
93
94 /* .comment css definition must be top of .red/.green/.blue or it won't work */
95 .comment { color: #555555; background-color: #DDDDFF; }
96
97 .red { background-color: #FFCCCC; }
98 .green { background-color: #CCFFCC; }
99 .blue { background-color: #CCCCFF; }
100 .yellow { background-color: #FFF29F; }
101 .orange { background-color: #FFD59B; }
102
103 .solid { border: 2px solid #000000; padding: 2px; }
104 .dashed { border: 2px dashed #000000; padding: 2px; }
105 .dotted { border: 2px dotted #000000; padding: 2px; }
106
107
108 table
109 {
110 margin: 0.5em 0 0 0.5em;
111 border-collapse: collapse;
112 }
113
114 th, td
115 {
116 padding: 0.25em 0.5em 0.25em 0.5em;
117 border: 1pt solid #ADB9CC;
118 }
119
120 td p {
121 margin: 0;
122 padding: 0;
123 }
124
125 /* TableOfContents macro */
126 .table-of-contents { border: 1px solid #bbbbbb;
127 color: black; background-color: #eeeeee;
128 font-size: small;
129 text-align:left;
130 margin: 0.5em; padding-left: 2em;
131 min-width:50%; }
132 .table-of-contents ol { margin:0; margin-left:1em;
133 list-style-type:decimal; }
134 .table-of-contents ul { margin:0;
135 list-style-type:none; }
136 .table-of-contents-heading { font-weight:bold; padding:0; margin:0; }
137
138
139 .footnotes div {
140 width: 5em;
141 border-top: 1pt solid gray;
142 }
143
144 .footnotes ol {
145 padding: 0 2em;
146 margin: 0 0 1em;
147 }
148
149 .footnotes li {
150 }
151
152 .info {
153 float: right;
154 font-size: 0.7em;
155 color: gray;
156 }
157
158 #pageinfo {
159 margin-top: 2em;
160 }
161
162 .seperator {
163 color: gray;
164 }
165
166 #pagebottom {clear: both;}
167
168 /* standard rule ---- */
169 hr {
170 height: 1pt;
171 background-color: #9C9C9C;
172 border: 0;
173 }
174
175 /* custom rules ----- to ---------- */
176 .hr1 {height: 2pt;}
177 .hr2 {height: 3pt;}
178 .hr3 {height: 4pt;}
179 .hr4 {height: 5pt;}
180 .hr5 {height: 6pt;}
181 .hr6 {height: 7pt;}
182
183 /* Replacement for deprecated html 3 <u> element and html 4 <strike> */
184 .u {text-decoration: underline;}
185 .strike {text-decoration: line-through;}
186
187 /* eye catchers */
188 .warning
189 {
190 color: red;
191 }
192
193 .error
194 {
195 color: red;
196 }
197
198 strong.highlight
199 {
200 background-color: #CCE0FF;
201 padding: 1pt;
202 }
203
204
205 /* Recent changes */
206
207 .rcrss {
208 float: right;
209 margin: 0;
210 }
211
212 .recentchanges[dir="rtl"] .rcrss {
213 float: left;
214 }
215
216 .recentchanges table {
217 clear: both;
218 }
219
220 .recentchanges td {
221 vertical-align: top;
222 border: none;
223 border-bottom: 1pt solid #E6EAF0;
224 background: #F2F4F7;
225 }
226
227 .rcdaybreak td {
228 background: #B8C5D9;
229 border: none;
230 }
231
232 .rcdaybreak td a {
233 font-size: 0.88em;
234 }
235
236 .rcicon1, .rcicon2 {
237 text-align: center;
238 }
239
240 .rcpagelink {
241 width: 33%;
242 }
243
244 .rctime {
245 font-size: 0.88em;
246 white-space: nowrap;
247 }
248
249 .rceditor {
250 white-space: nowrap;
251 font-size: 0.88em;
252 }
253
254 .rccomment {
255 width: 50%;
256 color: gray;
257 font-size: 0.88em;
258 }
259
260
261 /* User Preferences */
262
263 .userpref table, .userpref td {
264 border: none;
265 }
266
267 /* CSS for new code_area markup used by Colorizer and ParserBase */
268
269 div.codearea { /* the div makes the border */
270 margin: 0.5em 0;
271 padding: 0;
272 border: 1pt solid #AEBDCC;
273 background-color: #F3F5F7;
274 color: black;
275 }
276
277 div.codearea pre { /* the pre has no border and is inside the div */
278 margin: 0;
279 padding: 10pt;
280 border: none;
281 }
282
283 a.codenumbers { /* format of the line numbering link */
284 margin: 0 10pt;
285 font-size: 0.85em;
286 color: gray;
287 }
288
289 /* format of certain syntax spans */
290 div.codearea pre span.LineNumber {color: gray;}
291 div.codearea pre span.ID {color: #000000;}
292 div.codearea pre span.Operator {color: #0000C0;}
293 div.codearea pre span.Char {color: #004080;}
294 div.codearea pre span.Comment {color: #008000;}
295 div.codearea pre span.Number {color: #0080C0;}
296 div.codearea pre span.String {color: #004080;}
297 div.codearea pre span.SPChar {color: #0000C0;}
298 div.codearea pre span.ResWord {color: #A00000;}
299 div.codearea pre span.ConsWord {color: #008080; font-weight: bold;}
300 div.codearea pre span.Error {color: #FF8080; border: solid 1.5pt #FF0000;}
301 div.codearea pre span.ResWord2 {color: #0080ff; font-weight: bold;}
302 div.codearea pre span.Special {color: #0000ff;}
303 div.codearea pre span.Preprc {color: #803999;}
304
305 /* for diff parser */
306 div.codearea pre span.DiffAdded {color: #4876FF;}
307 div.codearea pre span.DiffRemoved {color: #FF0000;}
308 div.codearea pre span.DiffChanged {color: #FF7F50;}
309 div.codearea pre span.DiffSeparator {color: #228B22; font-weight: bold}
310
311 /* Search results */
312 .advancedsearch {
313 border: 1pt solid #ADB9CC;
314 }
315
316 .advancedsearch td {
317 vertical-align: top;
318 background-color: #E7E7E7;
319 border: 0px;
320 }
321
322 .advancedsearch td.searchfor {
323 font-weight: bold;
324 }
325
326 .advancedsearch input {
327 border: 1px solid #ADB9CC;
328 background-color: #fff;
329 }
330
331 .advancedsearch input[disabled] {
332 background-color: #eee;
333 }
334
335 .advancedsearch td.submit {
336 border-top: 1px solid #ADB9CC;
337 background-color: #fff;
338 text-align: right;
339 }
340
341 .advancedsearch optioni, select {
342 border: 1px solid #ADB9CC;
343 background-color: #fff;
344 }
345
346
347 .searchresults dt {
348 margin-top: 1em;
349 font-weight: normal;
350 }
351
352 .searchresults dd, .searchresults p {
353 font-size: 0.85em;
354 }
355
356 .searchresults .searchhitinfobar {
357 color: #008000;
358 margin-left: 15px;
359 margin-top: 0;
360 }
361
362 p.searchstats {
363 font-size: 0.8em;
364 text-align: right;
365 width: 100%;
366 background-color: #E6EAF0;
367 border-top: 1px solid #9088DC;
368 padding: 2px;
369 }
370
371 p.searchhint {
372 background-color: #E6EAF0;
373 border: 1px solid #9088DC;
374 padding: 2px;
375 }
376
377 .searchpages {
378 margin-left: auto;
379 margin-right: auto;
380 }
381
382 .searchpages tr, .searchpages td {
383 border: 0;
384 padding: 5px;
385 margin: 0;
386 text-align: center;
387 vertical-align: middle;
388 color: #b93a58;
389 font-weight: bold;
390 font-size: 1.05em;
391 }
392
393 .searchpages td a, .searchpages td a:link {
394 text-decoration: underline;
395 }
396
397 /* MonthCalendar css */
398
399 /* days without and with pages linked to them */
400 a.cal-emptyday {
401 color: #777777;
402 text-align: center;
403 }
404 a.cal-usedday {
405 color: #000000;
406 font-weight: bold;
407 text-align: center;
408 }
409 /* general stuff: workdays, weekend, today */
410 td.cal-workday {
411 background-color: #DDDDFF;
412 text-align: center;
413 }
414 td.cal-weekend {
415 background-color: #FFDDDD;
416 text-align: center;
417 }
418 td.cal-today {
419 background-color: #CCFFCC;
420 border-style: solid;
421 border-width: 2pt;
422 text-align: center;
423 }
424 /* invalid places on the monthly calendar sheet */
425 td.cal-invalidday {
426 background-color: #CCCCCC;
427 }
428 /* links to prev/next month/year */
429 a.cal-link {
430 color: #000000;
431 text-decoration: none;
432 }
433 th.cal-header {
434 background-color: #DDBBFF;
435 text-align: center;
436 }
437
438 /* for MonthCalendar mouseover info boxes */
439 TABLE.tip {
440 color: black;
441 background-color: #FF8888;
442 font-size: small;
443 font-weight: normal;
444 border-style: solid;
445 border-width: 1px;
446 }
447
448 TH.tip {
449 background-color: #FF4444;
450 font-weight: bold;
451 text-align: center;
452 }
453
454 TD.tip {
455 text-align: left;
456 }
457 *[dir="rtl"] TD.tip {
458 text-align: right;
459 }
460
461 /* end MonthCalendar stuff */
462
463 #message .hint {font-style: italic;}
464 #message .info {
465 float: none;
466 font-size: 1em;
467 color: black;
468 }
469 #message .info:before {
470 content: url('../img/icon-info.png');
471 margin: 0 0.5em 0 0.25em;
472 vertical-align: middle;
473 }
474 #message .warning:before {
475 content: url('../img/alert.png');
476 margin: 0 0.5em 0 0.125em;
477 vertical-align: middle;
478 }
479 #message .error:before {
480 content: url('../img/icon-error.png');
481 margin: 0 0.5em 0 0.125em;
482 vertical-align: middle;
483 }
484 #message a.clear-link {
485 display: block;
486 margin: 0.75em 0 0 0;
487 font-size: small;
488 }
489
490
491 /* admonition start */
492 #content div.caution,
493 #content div.important,
494 #content div.note,
495 #content div.tip,
496 #content div.warning {
497 border: 1pt solid #E5E5E5;
498 background-color: #F9F9FF;
499 color: black;
500
501 margin: 10pt 30pt 10pt 30pt;
502 background-repeat: no-repeat;
503 background-position: 8px 8px;
504 min-height: 64px; /*64=48+8+8 but doesn't work with IE*/
505 padding-left: 64px;
506 }
507
508 #content div.caution p,
509 #content div.important p,
510 #content div.note p,
511 #content div.tip p,
512 #content div.warning p {
513 margin-top: 8px; /*to align text with bg graphic*/
514 }
515
516 #content div.tip { background-image: url("../img/admon-tip.png"); }
517 #content div.note { background-image: url("../img/admon-note.png"); }
518 #content div.important { background-image: url("../img/admon-important.png"); }
519 #content div.caution { background-image: url("../img/admon-caution.png"); }
520 #content div.warning { background-image: url("../img/admon-warning.png"); }
521
522 /* admonition end */
523
524 .body_container
525 {
526 width: 98.5%;
527 background-color: #ffffff;
528 padding-right: 0px;
529 padding-top: 0px;
530
531 }
532
533
534 .top_container
535 {
536 background: url(../img/banner-logo.png) no-repeat top left #e7e7e7;
537 background-position: 12px 7px;
538 vertical-align: top;
539 text-align: left;
540 }
541 .top_container_login
542 {
543 padding-right: 16px;
544 padding-top: 2px;
545 height: 16px;
546 font-size: 11px;
547 text-align: right;
548 color: #4478b1;
549 }
550 .top_container_title
551 {
552 padding-left: 10px;
553 height: 67px;
554 font-size: 28px;
555 font-weight: bold;
556 color: #4478b1;
557 }
558 .top_container_menu
559 {
560 padding-top: 5px;
561 padding-bottom: 0px;
562 text-align: right;
563 font-weight: bold;
564 }
565 .top_menu_option
566 {
567 font-size: 14px;
568 text-align: center;
569 padding-left: 2px;
570 }
571 a.top_menu_option:link, a.top_menu_option:visited, a.top_menu_option:active
572 {
573 text-decoration: none;
574 color: #006a9d;
575 text-align: center;
576 border-right: #e7e7e7 1px solid;
577 border-left: #e7e7e7 1px solid;
578 border-top: #e7e7e7 1px solid;
579 padding-right: 3px;
580 }
581 a.top_menu_option:hover
582 {
583 text-decoration: none;
584 color: #ffffff;
585 text-align: center;
586 background-color: #81bbf2;
587 border-right: #cccccc 1px solid;
588 border-left: #cccccc 1px solid;
589 border-top: #cccccc 1px solid;
590 border-bottom: #81bbf2 1px solid;
591 padding-right: 3px;
592 }
593 a.top_menu_option_selected:link, a.top_menu_option_selected:visited, a.top_menu_option_selected:active
594 {
595 text-decoration: none;
596 color: #ffffff;
597 text-align: center;
598 background-color: #81bbf2;
599 border-right: #cccccc 1px solid;
600 border-left: #cccccc 1px solid;
601 border-top: #cccccc 1px solid;
602 border-bottom: #81bbf2 1px solid;
603 padding-right: 3px;
604 padding-left: 3px;
605 }
606 a.top_menu_option_selected:hover
607 {
608 text-decoration: none;
609 color: #000000;
610 text-align: center;
611 background-color: #81bbf2;
612 border-right: #e7e7e7 1px solid;
613 border-left: #e7e7e7 1px solid;
614 border-top: #e7e7e7 1px solid;
615 border-bottom: #81bbf2 1px solid;
616 padding-right: 3px;
617 padding-left: 3px;
618 }
619 .top_delimiter
620 {
621 background-color: #81bbf2;
622 height: 5px;
623 padding-top: 0px;
624 }
625
626
627 .flotante {
628 float: right;
629 position: absolute;
630 top: 25px;
631 right: 5px;
632 }