[wiki-lenny] * css strip-whitespaces * formatter.text_html --- portail màj

darcs-hash:20081209223142-bd074-9eb1de093ce56cf67bd096d07eab72528430e687.gz
This commit is contained in:
Antoine Durand-Gasselin 2008-12-09 23:31:42 +01:00
parent fa7a264f4b
commit 8ee7ed82a8
3 changed files with 96 additions and 71 deletions

View file

@ -15,6 +15,10 @@ from MoinMoin import wikiutil, i18n
from MoinMoin.Page import Page
from MoinMoin.action import AttachFile
from MoinMoin.support.python_compatibility import set, rsplit
### HACK SAUVAGE
import urllib
### FIN HACK
# insert IDs into output wherever they occur
# warning: breaks toggle line numbers javascript
@ -1001,32 +1005,54 @@ document.write('<a href="#" onclick="return togglenumber(\'%s\', %d, %d);" \
return('\n'.join(html))
def crans_portal(self, entries):
html = [ '<div class="portal"><table width=100%>' ]
html = [ '\n\n<div class="portal" style="padding: 0 0 2em 0;">' ]
format_pe = '''
<div style="background:transparent url('%s') center left no-repeat;
width: 38%%; height: 5em; padding: 0 20px 0 60px; float:left;">
<ul style="list-style: none;">
<li>%s</li>
<li>%s</li>
</ul>
</div>'''
format_pne = '''
<div style="width: 38%%; height: 5em; padding: 10px 20px 0 0px; float:left;">
<div style="float: left; padding-top: 1.5em; width: 20%%;">
<a href="%s" style="font-size: 5pt" alt="cliquez ici pour envoyer l'image">%s</a>
</div>
<div style="float: left; width: 80%%;">
<ul style="list-style: none;">
<li>%s</li>
<li>%s</li>
</ul>
</div>
</div>'''
while len(entries) != 0:
pic0, tit0, bod0 = entries[0]
html += [ '''
<tr><td style="width:50%%; border:none; padding:20px 20px 20px 60px;
background:transparent url('%s') center left no-repeat;
vertical-align:middle;">
<ul> <li> %s </li> <li> %s </li> </ul>
</td> ''' % (pic0, tit0, bod0) ]
fname= urllib.url2pathname(pic0.split('=')[-1])
if AttachFile.exists(self.request, self.page.page_name, fname):
html += [ format_pe % (pic0, tit0, bod0) ]
else:
html += [ format_pne % (pic0, pic0.split('=')[-1], tit0, bod0) ]
if len(entries) >= 2:
pic1, tit1, bod1 = entries[1]
entries = entries[2:]
html += [ '''
<td style="width:50%%; border:none; padding:20px 20px 20px 60px;
background:transparent url('%s') center left no-repeat;
vertical-align:middle;">
<ul> <li> %s </li> <li> %s </li> </ul>
</td> </tr>''' % (pic1, tit1, bod1) ]
fname = urllib.url2pathname(pic1.split('=')[-1])
if AttachFile.exists(self.request, self.page.page_name, fname):
html += [ format_pe % (pic1, tit1, bod1) ]
else:
html += [ format_pne % (pic1, pic1.split('=')[-1], tit1, bod1) ]
else:
html += [ '</tr>' ]
entries = [] # plus propre que {{{ break() }}}
html += [ '</table> </div>' ]
html += [ '\n</div>\n<hr style="visibility:hidden">\n\n' ]
return('\n'.join(html))
#### FIN HACK 1/1 ####

View file

@ -1,32 +1,30 @@
/*************************************************************
..
.... ............ ........
. ....... . .... ..
. ... .. .. .. .. ..... . ..
.. .. ....@@@. .. . ........ .
.. . .. ..@.@@..@@. .@@@@@@@ @@@@@@. ....
.@@@@. .@@@@. .@@@@..@@.@@..@@@..@@@..@@@@.... ....
..
.... ............ ........
. ....... . .... ..
. ... .. .. .. .. ..... . ..
.. .. ....@@@. .. . ........ .
.. . .. ..@.@@..@@. .@@@@@@@ @@@@@@. ....
.@@@@. .@@@@. .@@@@..@@.@@..@@@..@@@..@@@@.... ....
@@@@... .@@@.. @@ @@ .@..@@..@@...@@@. .@@@@@. ..
.@@@.. . @@@. @@.@@..@@.@@..@@@ @@ .@@@@@@.. .....
...@@@.... @@@ .@@.......... ........ ..... ..
. ..@@@@.. . .@@@@. .. ....... . .............
. .. .... .. .. . ... ....
. . .... ............. .. ...
.. .. ... ........ ... ...
................................
...@@@.... @@@ .@@.......... ........ ..... ..
. ..@@@@.. . .@@@@. .. ....... . .............
. .. .... .. .. . ... ....
. . .... ............. .. ...
.. .. ... ........ ... ...
................................
==============================================================
common.css - MoinMoin Style
common.css - MoinMoin Style
Styles communs a tous les medias (screen, print...)
Copyright (c) 2006 by www.crans.org
**************************************************************/
/* IMPORTS
/!\ les imports doivent imperativement se faire avant
/* IMPORTS
/!\ les imports doivent imperativement se faire avant
toute autre regle css !!!
*/
@ -62,10 +60,10 @@ a.nonexistent, a.badinterwiki {color: gray;}
/* Headings */
h1, h1 a, h1 a:visited,
h2, h2 a, h2 a:visited,
h3, h3 a, h3 a:visited,
h4, h4 a, h4 a:visited,
h1, h1 a, h1 a:visited,
h2, h2 a, h2 a:visited,
h3, h3 a, h3 a:visited,
h4, h4 a, h4 a:visited,
h5, h5 a, h5 a:visited,
h6, h6 a, h6 a:visited {
padding: 0;
@ -73,7 +71,7 @@ h6, h6 a, h6 a:visited {
line-height: 1.2em;
text-decoration:none;
}
h1 {
margin: 1.5em 0 0 0em;
font-size: 2em;
@ -119,12 +117,12 @@ dd {
dd p {
margin: 0.25em 0;
}
a, img, img.drawing {
border: 0;
}
pre
pre
{
border: 1pt solid #AEBDCC;
background-image: url(../img/bleutransparent.png);
@ -206,17 +204,17 @@ hr {
.u {text-decoration: underline;}
/* eye catchers */
.warning
.warning
{
color: orange;
}
.error
.error
{
color: red;
}
strong.highlight
strong.highlight
{
background-color: #CCE0FF;
padding: 1pt;

View file

@ -1,27 +1,24 @@
/*************************************************************
..
.... ............ ........
. ....... . .... ..
. ... .. .. .. .. ..... . ..
.. .. ....@@@. .. . ........ .
.. . .. ..@.@@..@@. .@@@@@@@ @@@@@@. ....
.@@@@. .@@@@. .@@@@..@@.@@..@@@..@@@..@@@@.... ....
..
.... ............ ........
. ....... . .... ..
. ... .. .. .. .. ..... . ..
.. .. ....@@@. .. . ........ .
.. . .. ..@.@@..@@. .@@@@@@@ @@@@@@. ....
.@@@@. .@@@@. .@@@@..@@.@@..@@@..@@@..@@@@.... ....
@@@@... .@@@.. @@ @@ .@..@@..@@...@@@. .@@@@@. ..
.@@@.. . @@@. @@.@@..@@.@@..@@@ @@ .@@@@@@.. .....
...@@@.... @@@ .@@.......... ........ ..... ..
. ..@@@@.. . .@@@@. .. ....... . .............
. .. .... .. .. . ... ....
. . .... ............. .. ...
.. .. ... ........ ... ...
................................
...@@@.... @@@ .@@.......... ........ ..... ..
. ..@@@@.. . .@@@@. .. ....... . .............
. .. .... .. .. . ... ....
. . .... ............. .. ...
.. .. ... ........ ... ...
................................
==============================================================
crans.css - MoinMoin Style
Theme crans (screen)
Copyright (c) 2006 by www.crans.org
**************************************************************/
div#content
{
@ -29,28 +26,32 @@ div#content
}
/* ****************************** BARRE DE TITRE ****************************** */
/* on change la couleur des soulignements de titres pour aller avec la barre */
h1, h2, h3, h4, h5, h6 {border-color: #214478} /* f9821d */
h1, h2, h3, h4, h5, h6 {border-color: #214478}
div#titleBarre {
border-bottom: thin solid #214478;//orange;
background: #f9821d url(../img/BarreCyan.png) repeat-x;
}
div#titleBarre *,
div#titleBarre h1#title a {
color: white; }
div#titleBarre h1#title {
background: url(../img/BarreLogo.png) no-repeat right top;
}
div#titleBarre *, div#titleBarre h1#title a {
color: white;
}
div#titleBarre h1#title {
background: url(../img/BarreLogo.png) no-repeat right top;
}
/* variantes */
.halloween div#titleBarre h1#title {
background-image: url(../img/barreLogoHalloween.png);
}
.noel div#titleBarre {
background: #f9821d url(../img/BarreOrangeNeige.png) repeat-x;
}
.noel div#titleBarre h1#title {
background-image: url(../img/BarreLogoNeige.png);
}
}
.noel div#titleBarre h1#title {
background-image: url(../img/BarreLogoNeige.png);
}