From b3003ac5946426c4facef5502f302cf29d0d3413 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sat, 19 Dec 2015 12:25:09 -0500 Subject: Updated templates/lp-sch-2016.jinja2 Added styling to make 'program day' sections and individual timeslots to be collapsible. --- templates/lp-sch-2016.jinja2 | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/templates/lp-sch-2016.jinja2 b/templates/lp-sch-2016.jinja2 index a93b137..d676757 100644 --- a/templates/lp-sch-2016.jinja2 +++ b/templates/lp-sch-2016.jinja2 @@ -40,19 +40,35 @@ {% endmacro %} {# make day header macro #} -{% macro mk_day_header(day) %} +{% macro mk_day_header(day, collapse_area) %}
-

{{ day }}

+

{{ day }} + +

{% endmacro %} {# make timeslot header macro #} -{% macro mk_timeslot_header(timeslot) %} +{% macro mk_timeslot_header(timeslot, collapse, collapse_area='') %}
-

{{ timeslot }}

+

{{ timeslot }} + {% if collapse %} + + {% endif %} +

{% endmacro %} @@ -89,8 +105,13 @@ {% 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) }} + {{ mk_timeslot_header(timeslot, sessions|length > 0, "day-%d-timeslot-%d-sessions"|format(day_index, loop.index)) }} + {% if sessions|length > 0 %} +
+ {{ populate_sessions(sessions, day_index, loop.index) }} +
+ {% endif %}
{% endfor %} {# timeslot start #} {% endmacro %} @@ -98,7 +119,9 @@ {# lp 2016 template start #} {% for day, timeslots in schedule.iteritems() %} {# day start #}
- {{ mk_day_header(day) }} - {{ populate_timeslots(timeslots, loop.index) }} + {{ mk_day_header(day, "day-%d-timeslots"|format(loop.index)) }} +
+ {{ populate_timeslots(timeslots, loop.index) }} +
{% endfor %} {# day loop end #} -- cgit v1.2.3