[wiki-lenny] * css strip-whitespaces * formatter.text_html --- portail màj
darcs-hash:20081209223142-bd074-9eb1de093ce56cf67bd096d07eab72528430e687.gz
This commit is contained in:
parent
fa7a264f4b
commit
8ee7ed82a8
3 changed files with 96 additions and 71 deletions
|
@ -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 ####
|
||||
|
||||
|
|
|
@ -16,11 +16,9 @@
|
|||
................................
|
||||
|
||||
==============================================================
|
||||
|
||||
common.css - MoinMoin Style
|
||||
|
||||
Styles communs a tous les medias (screen, print...)
|
||||
|
||||
|
||||
Copyright (c) 2006 by www.crans.org
|
||||
|
||||
**************************************************************/
|
||||
|
|
|
@ -14,14 +14,11 @@
|
|||
. . .... ............. .. ...
|
||||
.. .. ... ........ ... ...
|
||||
................................
|
||||
|
||||
==============================================================
|
||||
crans.css - MoinMoin Style
|
||||
|
||||
Theme crans (screen)
|
||||
|
||||
Copyright (c) 2006 by www.crans.org
|
||||
|
||||
**************************************************************/
|
||||
div#content
|
||||
{
|
||||
|
@ -29,17 +26,19 @@ 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 *, div#titleBarre h1#title a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
div#titleBarre h1#title {
|
||||
background: url(../img/BarreLogo.png) no-repeat right top;
|
||||
}
|
||||
|
@ -48,9 +47,11 @@ div#titleBarre {
|
|||
.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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue