From 8ee7ed82a8f320ec5ef42d9350fd3b368de33334 Mon Sep 17 00:00:00 2001 From: Antoine Durand-Gasselin Date: Tue, 9 Dec 2008 23:31:42 +0100 Subject: [PATCH] =?UTF-8?q?[wiki-lenny]=20*=20css=20strip-whitespaces=20*?= =?UTF-8?q?=20formatter.text=5Fhtml=20---=20portail=20m=C3=A0j?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit darcs-hash:20081209223142-bd074-9eb1de093ce56cf67bd096d07eab72528430e687.gz --- wiki-lenny/share/formatter.text_html.py | 56 +++++++++++++++++------- wiki-lenny/static/crans/css/common.css | 54 +++++++++++------------ wiki-lenny/static/crans/css/crans.css | 57 +++++++++++++------------ 3 files changed, 96 insertions(+), 71 deletions(-) diff --git a/wiki-lenny/share/formatter.text_html.py b/wiki-lenny/share/formatter.text_html.py index 883f2129..9c3d31c9 100644 --- a/wiki-lenny/share/formatter.text_html.py +++ b/wiki-lenny/share/formatter.text_html.py @@ -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('' ] + html = [ '\n\n
' ] + + format_pe = ''' +
+
    +
  • %s
  • +
  • %s
  • +
+
''' + + format_pne = ''' +
+
+ %s +
+
+
    +
  • %s
  • +
  • %s
  • +
+
+
''' + + while len(entries) != 0: pic0, tit0, bod0 = entries[0] - html += [ ''' -
''' % (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 += [ ''' - ''' % (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 += [ '' ] entries = [] # plus propre que {{{ break() }}} - html += [ '
-
  • %s
  • %s
-
-
  • %s
  • %s
-
' ] + html += [ '\n\n
\n\n' ] return('\n'.join(html)) #### FIN HACK 1/1 #### diff --git a/wiki-lenny/static/crans/css/common.css b/wiki-lenny/static/crans/css/common.css index 64f2c3ba..ade1cbcc 100644 --- a/wiki-lenny/static/crans/css/common.css +++ b/wiki-lenny/static/crans/css/common.css @@ -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; diff --git a/wiki-lenny/static/crans/css/crans.css b/wiki-lenny/static/crans/css/crans.css index 91da60ef..136cd14f 100644 --- a/wiki-lenny/static/crans/css/crans.css +++ b/wiki-lenny/static/crans/css/crans.css @@ -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); +} \ No newline at end of file