From 6b3f3a1c17ffab0ab2e8cb70b339814d1ea07e1a Mon Sep 17 00:00:00 2001 From: Grgoire Dtrez Date: Sun, 9 Nov 2008 22:18:26 +0100 Subject: [PATCH] =?UTF-8?q?Pour=20des=20pages=20d'erreur=20squid=20plus=20?= =?UTF-8?q?=C3=A9l=C3=A9gantes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * nettoyrage du css (un peu) * ajout du logo * un peu de mise en page darcs-hash:20081109211826-69ccb-81d5eae4d74b969d7adee51d5de0309798019487.gz --- squid/dump-from-wiki.py | 24 +- squid/templates.py | 286 ++++++++++++++++++ .../blackliste/css/blackliste-clean.css | 17 ++ 3 files changed, 305 insertions(+), 22 deletions(-) create mode 100644 squid/templates.py create mode 100644 wiki/static/blackliste/css/blackliste-clean.css diff --git a/squid/dump-from-wiki.py b/squid/dump-from-wiki.py index 38cba9b8..d936fa7f 100755 --- a/squid/dump-from-wiki.py +++ b/squid/dump-from-wiki.py @@ -23,27 +23,7 @@ url_base='VieCrans/PagesDeDeconnexion/' outputdir='/usr/scripts/squid/errors' outputdir_rouge='/var/www/rouge/squid' -page_template = u""" - - -%(pagename)s - - - - -

%(pagenamewithlinks)s

- -%(pagehtml)s - -

-Cette page a été extraite du wiki le %(timestamp)s. Vous pouvez l'éditer ou voir la page originale. -

- - -""" +from templates import page_template import os, time, StringIO, codecs, shutil, re from MoinMoin import config, wikiutil, Page @@ -58,7 +38,7 @@ for r in [outputdir, outputdir_rouge]: # Recuperation des css common_css = file('/usr/scripts/wiki/static/blackliste/css/common.css').read() -blackliste_css = file('/usr/scripts/wiki/static/blackliste/css/blackliste.css').read() +blackliste_css = file('/usr/scripts/wiki/static/blackliste/css/blackliste-clean.css').read() class MoinDump(_util.Script): def __init__(self): diff --git a/squid/templates.py b/squid/templates.py new file mode 100644 index 00000000..7b38efd8 --- /dev/null +++ b/squid/templates.py @@ -0,0 +1,286 @@ +page_template = u"""\ + + + + + %(pagename)s + + + +
+ +

%(pagenamewithlinks)s

+ %(pagehtml)s +

+ Cette page a été extraite du wiki le %(timestamp)s. + Vous pouvez l'éditer + ou voir la page originale. +

+
+ + +""" + \ No newline at end of file diff --git a/wiki/static/blackliste/css/blackliste-clean.css b/wiki/static/blackliste/css/blackliste-clean.css new file mode 100644 index 00000000..52c18efa --- /dev/null +++ b/wiki/static/blackliste/css/blackliste-clean.css @@ -0,0 +1,17 @@ +#wrapper { + width: 50em; + margin:0 auto; + padding:1em 2em 1em 5em; + text-align: left;} + #wrapper img#logo { + margin-left: -4em; + margin-bottom: 2em;} + +/**/ +p.creation { + margin-top: 5em; + border-top: 1px solid #6C7680; + font-style: italic; + color: gray; + padding: 10px 30px ; +}