Super theme special halloween

darcs-hash:20071021130008-f46e9-55e1643ab8f7235249b6b94f027d776b1838b2d2.gz
This commit is contained in:
gdetrez 2007-10-21 15:00:08 +02:00
parent e96905bdeb
commit c92cf05549
2 changed files with 13 additions and 2 deletions

View file

@ -34,8 +34,13 @@ div#titleBarre {
border-bottom: thin solid #f9821d;//orange; border-bottom: thin solid #f9821d;//orange;
background: #f9821d url(../img/BarreOrange.png) repeat-x; background: #f9821d url(../img/BarreOrange.png) repeat-x;
} }
/* 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: #f9821d} h1, h2, h3, h4, h5, h6 {border-color: #f9821d}
div#titleBarre *, div#titleBarre *,
div#titleBarre h1#title a { color: white; } div#titleBarre h1#title a { color: white; }
h1#title { background: url(../img/BarreLogo.png) no-repeat right top;} h1#title { background: url(../img/BarreLogo.png) no-repeat right top;}
/* variantes */
.halloween h1#title {
background-image: url(../img/barreLogoHalloween.png);
}

View file

@ -7,7 +7,7 @@
Adapted for CR@NS by Nicolas Salles <salles AT crans DOT org> Adapted for CR@NS by Nicolas Salles <salles AT crans DOT org>
@license: GNU GPL, see COPYING for details. @license: GNU GPL, see COPYING for details.
""" """
import datetime
from MoinMoin.theme import ThemeBase from MoinMoin.theme import ThemeBase
from MoinMoin import wikiutil, i18n from MoinMoin import wikiutil, i18n
from MoinMoin.Page import Page from MoinMoin.Page import Page
@ -39,9 +39,15 @@ class ThemeCrans(ThemeBase):
until the footer. This keeps the HTML cleaner and more accessible, until the footer. This keeps the HTML cleaner and more accessible,
making sure the main content arrives first. making sure the main content arrives first.
""" """
if datetime.date.today().month == 10:
extra_style = " class=\"halloween\""
elif (datetime.date.today().month == 12) and (datetime.date.today().day <= 24):
extra_style = " class=\"noel\""
else:
extra_style = ""
parent = d['page'].getParentPage() parent = d['page'].getParentPage()
html = [ html = [
u'<div id="globalWrapper">', u'<div id="globalWrapper"%s>' % extra_style,
u'<div id="main-content">', u'<div id="main-content">',
u'<div id="titleBarre">', u'<div id="titleBarre">',
'<h1 id="title">', '<h1 id="title">',