[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.Page import Page
|
||||||
from MoinMoin.action import AttachFile
|
from MoinMoin.action import AttachFile
|
||||||
from MoinMoin.support.python_compatibility import set, rsplit
|
from MoinMoin.support.python_compatibility import set, rsplit
|
||||||
|
### HACK SAUVAGE
|
||||||
|
import urllib
|
||||||
|
### FIN HACK
|
||||||
|
|
||||||
|
|
||||||
# insert IDs into output wherever they occur
|
# insert IDs into output wherever they occur
|
||||||
# warning: breaks toggle line numbers javascript
|
# warning: breaks toggle line numbers javascript
|
||||||
|
@ -1001,32 +1005,54 @@ document.write('<a href="#" onclick="return togglenumber(\'%s\', %d, %d);" \
|
||||||
return('\n'.join(html))
|
return('\n'.join(html))
|
||||||
|
|
||||||
def crans_portal(self, entries):
|
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:
|
while len(entries) != 0:
|
||||||
pic0, tit0, bod0 = entries[0]
|
pic0, tit0, bod0 = entries[0]
|
||||||
html += [ '''
|
|
||||||
<tr><td style="width:50%%; border:none; padding:20px 20px 20px 60px;
|
fname= urllib.url2pathname(pic0.split('=')[-1])
|
||||||
background:transparent url('%s') center left no-repeat;
|
if AttachFile.exists(self.request, self.page.page_name, fname):
|
||||||
vertical-align:middle;">
|
html += [ format_pe % (pic0, tit0, bod0) ]
|
||||||
<ul> <li> %s </li> <li> %s </li> </ul>
|
else:
|
||||||
</td> ''' % (pic0, tit0, bod0) ]
|
html += [ format_pne % (pic0, pic0.split('=')[-1], tit0, bod0) ]
|
||||||
|
|
||||||
if len(entries) >= 2:
|
if len(entries) >= 2:
|
||||||
pic1, tit1, bod1 = entries[1]
|
pic1, tit1, bod1 = entries[1]
|
||||||
entries = entries[2:]
|
entries = entries[2:]
|
||||||
|
|
||||||
html += [ '''
|
fname = urllib.url2pathname(pic1.split('=')[-1])
|
||||||
<td style="width:50%%; border:none; padding:20px 20px 20px 60px;
|
if AttachFile.exists(self.request, self.page.page_name, fname):
|
||||||
background:transparent url('%s') center left no-repeat;
|
html += [ format_pe % (pic1, tit1, bod1) ]
|
||||||
vertical-align:middle;">
|
else:
|
||||||
<ul> <li> %s </li> <li> %s </li> </ul>
|
html += [ format_pne % (pic1, pic1.split('=')[-1], tit1, bod1) ]
|
||||||
</td> </tr>''' % (pic1, tit1, bod1) ]
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
html += [ '</tr>' ]
|
|
||||||
entries = [] # plus propre que {{{ break() }}}
|
entries = [] # plus propre que {{{ break() }}}
|
||||||
|
|
||||||
html += [ '</table> </div>' ]
|
html += [ '\n</div>\n<hr style="visibility:hidden">\n\n' ]
|
||||||
return('\n'.join(html))
|
return('\n'.join(html))
|
||||||
#### FIN HACK 1/1 ####
|
#### FIN HACK 1/1 ####
|
||||||
|
|
||||||
|
|
|
@ -16,11 +16,9 @@
|
||||||
................................
|
................................
|
||||||
|
|
||||||
==============================================================
|
==============================================================
|
||||||
|
|
||||||
common.css - MoinMoin Style
|
common.css - MoinMoin Style
|
||||||
|
|
||||||
Styles communs a tous les medias (screen, print...)
|
Styles communs a tous les medias (screen, print...)
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2006 by www.crans.org
|
Copyright (c) 2006 by www.crans.org
|
||||||
|
|
||||||
**************************************************************/
|
**************************************************************/
|
||||||
|
|
|
@ -14,14 +14,11 @@
|
||||||
. . .... ............. .. ...
|
. . .... ............. .. ...
|
||||||
.. .. ... ........ ... ...
|
.. .. ... ........ ... ...
|
||||||
................................
|
................................
|
||||||
|
|
||||||
==============================================================
|
==============================================================
|
||||||
crans.css - MoinMoin Style
|
crans.css - MoinMoin Style
|
||||||
|
|
||||||
Theme crans (screen)
|
Theme crans (screen)
|
||||||
|
|
||||||
Copyright (c) 2006 by www.crans.org
|
Copyright (c) 2006 by www.crans.org
|
||||||
|
|
||||||
**************************************************************/
|
**************************************************************/
|
||||||
div#content
|
div#content
|
||||||
{
|
{
|
||||||
|
@ -29,28 +26,32 @@ div#content
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ****************************** BARRE DE TITRE ****************************** */
|
/* ****************************** BARRE DE TITRE ****************************** */
|
||||||
|
|
||||||
/* on change la couleur des soulignements de titres pour aller avec la barre */
|
/* 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 {
|
div#titleBarre {
|
||||||
border-bottom: thin solid #214478;//orange;
|
border-bottom: thin solid #214478;//orange;
|
||||||
background: #f9821d url(../img/BarreCyan.png) repeat-x;
|
background: #f9821d url(../img/BarreCyan.png) repeat-x;
|
||||||
}
|
}
|
||||||
div#titleBarre *,
|
|
||||||
div#titleBarre h1#title a {
|
div#titleBarre *, div#titleBarre h1#title a {
|
||||||
color: white; }
|
color: white;
|
||||||
div#titleBarre h1#title {
|
}
|
||||||
background: url(../img/BarreLogo.png) no-repeat right top;
|
|
||||||
}
|
div#titleBarre h1#title {
|
||||||
|
background: url(../img/BarreLogo.png) no-repeat right top;
|
||||||
|
}
|
||||||
|
|
||||||
/* variantes */
|
/* variantes */
|
||||||
.halloween div#titleBarre h1#title {
|
.halloween div#titleBarre h1#title {
|
||||||
background-image: url(../img/barreLogoHalloween.png);
|
background-image: url(../img/barreLogoHalloween.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
.noel div#titleBarre {
|
.noel div#titleBarre {
|
||||||
background: #f9821d url(../img/BarreOrangeNeige.png) repeat-x;
|
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);
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue