From 7ca74c9b9470b8773358f22b011136e5579237f6 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Thu, 28 Jan 2016 00:20:16 -0500 Subject: changed 2016 template. - "Day" and "Timeslots" are not collapsible. - Changed the organization of session content. - Room is not part of the collapsible content. - Room and "Details" button are on the same line. --- lps_gen.py | 2 +- lpschedule_generator/templates/lp-sch-2016.jinja2 | 47 +++++++---------------- 2 files changed, 15 insertions(+), 34 deletions(-) diff --git a/lps_gen.py b/lps_gen.py index 35003fc..8f04af8 100644 --- a/lps_gen.py +++ b/lps_gen.py @@ -30,7 +30,7 @@ from jinja2 import Environment, PackageLoader from jinja2.exceptions import TemplateNotFound from mistune import Renderer, Markdown -__version__ = '0.1.0' +__version__ = '0.1.1.dev1' # unicode magic reload(sys) diff --git a/lpschedule_generator/templates/lp-sch-2016.jinja2 b/lpschedule_generator/templates/lp-sch-2016.jinja2 index 4ea99cc..f7cb0de 100644 --- a/lpschedule_generator/templates/lp-sch-2016.jinja2 +++ b/lpschedule_generator/templates/lp-sch-2016.jinja2 @@ -36,21 +36,14 @@ {# make room macro #} {% macro mk_room(room) %} -

{{ room }}

+ {{ room }} {% endmacro %} {# make day header macro #} {% macro mk_day_header(day, collapse_area) %}
-

{{ day }} - -

+

{{ day }}

{% endmacro %} @@ -59,16 +52,7 @@ {% macro mk_timeslot_header(timeslot, collapse, collapse_area='') %}
-

{{ timeslot }} - {% if collapse %} - - {% endif %} -

+

{{ timeslot }}

{% endmacro %} @@ -95,15 +79,17 @@
{{ mk_session_header(session) }} {{ mk_speakers(session_info['speakers']) }} - +

+ {{ mk_room(session_info['room']) }} + +

- {{ mk_room(session_info['room']) }} {{ desc(session_info['desc']) }}
@@ -114,12 +100,9 @@ {% macro populate_timeslots(timeslots, day_index) %} {% for timeslot, sessions in timeslots.iteritems() %} {# timeslot start #}
- {{ mk_timeslot_header(timeslot, sessions|length > 0, "day-%d-timeslot-%d-sessions"|format(day_index, loop.index)) }} + {{ mk_timeslot_header(timeslot) }} {% if sessions|length > 0 %} -
{{ populate_sessions(sessions, day_index, loop.index) }} -
{% endif %}
{% endfor %} {# timeslot start #} @@ -128,9 +111,7 @@ {# lp 2016 template start #} {% for day, timeslots in schedule.iteritems() %} {# day start #}
- {{ mk_day_header(day, "day-%d-timeslots"|format(loop.index)) }} -
+ {{ mk_day_header(day) }} {{ populate_timeslots(timeslots, loop.index) }} -
{% endfor %} {# day loop end #} -- cgit v1.2.3