summaryrefslogtreecommitdiff
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
parent779f012812a36b85d1086f48381a00b429b686d0 (diff)
Attempt at fixing layout
-rw-r--r--scripts/calendar_plugin2.py13
-rw-r--r--template/pages/termine2/content.html5
-rw-r--r--template/tabcalendar.j22
3 files changed, 14 insertions, 6 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
diff --git a/template/pages/termine2/content.html b/template/pages/termine2/content.html
index d14eb88..5e203e1 100644
--- a/template/pages/termine2/content.html
+++ b/template/pages/termine2/content.html
@@ -6,12 +6,13 @@
<div class="col-md-12">
<p>
Hier findest du regelmäßige, unregelmäßige und nur einmal stattfindende Veranstaltungen im sublab und Umgebung. Die Veranstaltungen stehen allen offen.
-</p>
+ </p>
+ $tabcalendar_tabs
</div>
</div>
<div class="row">
<div class="col-md-8">
-$tabcalendar
+$tabcalendar_events
</div>
<div class="col-md-4">
<a href="img/hallway.jpg"><img class="img-responsive" src="img/hallway_klein.jpg" alt="Unser Flur mit Buero, Lager, Hacklab."></a>
diff --git a/template/tabcalendar.j2 b/template/tabcalendar.j2
index 976aaa0..3036a6e 100644
--- a/template/tabcalendar.j2
+++ b/template/tabcalendar.j2
@@ -33,5 +33,3 @@
</table>
{%- endfor %}
</div>
-{% set class = 'expanded' %}
-{% include 'calendar.j2' %}