From aac9e52d138fef142b67a85921bff643060cf277 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Tue, 15 Dec 2015 20:50:39 -0500 Subject: HTMLRender -> RenderHTML + changes to it. `RenderHTML` (was `HTMLRender`) now uses `PackagLoader` instead of FileSystemLoader and the template are loaded from the templates/ directory. --- templates/lp-sch-2016.jinja2 | 67 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 templates/lp-sch-2016.jinja2 (limited to 'templates') diff --git a/templates/lp-sch-2016.jinja2 b/templates/lp-sch-2016.jinja2 new file mode 100644 index 0000000..fbffc0a --- /dev/null +++ b/templates/lp-sch-2016.jinja2 @@ -0,0 +1,67 @@ +{# -*- mode: jinja2; -*- #} + +{# macros start #} + +{# make day header macro #} +{% macro mk_day_header(day) %} +
+
+

{{ day }}

+
+
+{% endmacro %} + +{# make timeslot header macro #} +{% macro mk_timeslot_header(timeslot) %} +
+
+

{{ timeslot }}

+
+
+{% endmacro %} + +{# make session header macro #} +{% macro mk_session_header(session) %} +
+
+

{{ session }}

+
+
+{% endmacro %} + +{# desc macro #} +{% macro desc(disc_list) %} + {% for desc_p in disc_list %} +

{{ desc_p }}

+ {% endfor %} +{% endmacro %} + +{# populate sessions macro #} +{% macro populate_sessions(sessions, day_index, timeslot_index) %} + {% for session, session_info in sessions.iteritems() %} {# session start #} +
+ {{ mk_session_header(session) }} +

{{ session_info['speaker'] }}

+

{{ session_info['room'] }}

+ {{ desc(session_info['desc']) }} +
+ {% endfor %} {# session end #} +{% endmacro %} + +{# populate timeslots macro #} +{% macro populate_timeslots(timeslots, day_index) %} + {% for timeslot, sessions in timeslots.iteritems() %} {# timeslot start #} +
+ {{ mk_timeslot_header(timeslot) }} + {{ populate_sessions(sessions, day_index, loop.index) }} +
+ {% endfor %} {# timeslot start #} +{% endmacro %} + +{# lp 2016 template start #} +{% for day, timeslots in schedule.iteritems() %} {# day start #} +
+ {{ mk_day_header(day) }} + {{ populate_timeslots(timeslots, loop.index) }} +
+{% endfor %} {# day loop end #} -- cgit v1.2.3