[wiki-lenny/local/formatter/portal.py] Le portail marche
darcs-hash:20081109214806-bd074-b2eb2120356efd16170dfdec23eba3b399c9d0d3.gz
This commit is contained in:
parent
3275986a70
commit
dbcfa624dd
2 changed files with 42 additions and 0 deletions
|
@ -999,6 +999,35 @@ document.write('<a href="#" onclick="return togglenumber(\'%s\', %d, %d);" \
|
|||
'</div>',
|
||||
]
|
||||
return('\n'.join(html))
|
||||
|
||||
def crans_portal(self, entries):
|
||||
html = [ '<div class="portal"><table width=100%>' ]
|
||||
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) ]
|
||||
|
||||
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) ]
|
||||
|
||||
else:
|
||||
html += [ '</tr>' ]
|
||||
entries = [] # plus propre que {{{ break() }}}
|
||||
|
||||
html += [ '</table> </div>' ]
|
||||
return('\n'.join(html))
|
||||
#### FIN HACK 1/1 ####
|
||||
|
||||
# Paragraphs, Lines, Rules ###########################################
|
||||
|
|
13
wiki-lenny/static/common/portal/portal.css
Normal file
13
wiki-lenny/static/common/portal/portal.css
Normal file
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* PORTAL.CSS--
|
||||
*
|
||||
* Copyright (C) 2008 Antoine Durand-Gasselin
|
||||
* Author: Antoine Durand-Gasselin <adg@crans.org>
|
||||
*/
|
||||
|
||||
.portal ul, .portal li, .portal td, .portal tr, .portal table {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue