summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristian Franke <nobody@nowhere.ws>2016-04-05 12:30:43 -0300
committerChristian Franke <nobody@nowhere.ws>2016-04-05 12:30:43 -0300
commit1c9e140cdbb13e7ed8985ae60a1af7f9431a1def (patch)
tree9f61ccf6271ddf4d7d5a67133f690d006c7e7d50 /scripts
parent779f012812a36b85d1086f48381a00b429b686d0 (diff)
Attempt at fixing layout
Diffstat (limited to 'scripts')
-rw-r--r--scripts/calendar_plugin2.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/calendar_plugin2.py b/scripts/calendar_plugin2.py
index a7f752c..71a7a0c 100644
--- a/scripts/calendar_plugin2.py
+++ b/scripts/calendar_plugin2.py
@@ -97,10 +97,18 @@ class TabularCalendarPlugin:
self.template_env = jinja2.Environment(loader=template_loader)
locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8')
- def _get_calendar(self):
+ def _get_calendar_tabs(self):
return self.template_env.get_template('tabcalendar.j2').render({
'months': self.months,
'events': self.events,
+ 'class': 'expanded'
+ }).encode('utf-8')
+
+ def _get_calendar_events(self):
+ return self.template_env.get_template('calendar.j2').render({
+ 'months': self.months,
+ 'events': self.events,
+ 'class': 'expanded'
}).encode('utf-8')
def process_content(self, page_content):
@@ -108,7 +116,8 @@ class TabularCalendarPlugin:
for filename, content in page_content.iteritems():
t = string.Template(content)
return_value[filename] = t.safe_substitute(
- tabcalendar = self._get_calendar(),
+ tabcalendar_tabs = self._get_calendar_tabs(),
+ tabcalendar_events = self._get_calendar_events(),
)
return return_value