lpschedule-generator

libreplanet schedule generator - ricketyspace.net/lpschedule-generator
git clone git://git.ricketyspace.net/lpschedule-generator.git
Log | Files | Refs

commit 7ca74c9b9470b8773358f22b011136e5579237f6
parent 052c53ae2748ac35bebee9c97b977116f10ac078
Author: rsiddharth <rsd@gnu.org>
Date:   Thu, 28 Jan 2016 00:20:16 -0500

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.

Diffstat:
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 @@ -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 @@ -36,21 +36,14 @@ {# make room macro #} {% macro mk_room(room) %} - <p><span class="label label-default">{{ room }}</span></p> + <span class="label label-default">{{ room }}</span> {% endmacro %} {# make day header macro #} {% macro mk_day_header(day, collapse_area) %} <header class="program-day-header"> <hgroup> - <h2>{{ day }} - <a class="btn btn-default btn-xs" role="button" - data-toggle="collapse" aria-expanded="false" - aria-controls="{{ collapse_area }}" - href="#{{ collapse_area }}"> - &#x2193; - </a> - </h2> + <h2>{{ day }}</h2> </hgroup> </header> {% endmacro %} @@ -59,16 +52,7 @@ {% macro mk_timeslot_header(timeslot, collapse, collapse_area='') %} <header class="program-timeslot-header"> <hgroup> - <h2>{{ timeslot }} - {% if collapse %} - <a class="btn btn-default btn-xs" role="button" - data-toggle="collapse" aria-expanded="false" - aria-controls="{{ collapse_area }}" - href="#{{ collapse_area }}"> - &#x2193; - </a> - {% endif %} - </h2> + <h2>{{ timeslot }}</h2> </hgroup> </header> {% endmacro %} @@ -95,15 +79,17 @@ <section id="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}" class="program-session"> {{ mk_session_header(session) }} {{ mk_speakers(session_info['speakers']) }} - <button class="btn btn-default btn-xs" - data-toggle="collapse" aria-expanded="false" - aria-controls="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse" - data-target="#day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse"> - Details - </button> + <p class="program-session-room-details"> + {{ mk_room(session_info['room']) }} + <button class="btn btn-default btn-xs" + data-toggle="collapse" aria-expanded="false" + aria-controls="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse" + data-target="#day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse"> + Details + </button> + </p> <div class="collapse in" id="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse"> - {{ mk_room(session_info['room']) }} {{ desc(session_info['desc']) }} </div> <!-- day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse end --> </section> <!-- day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }} end --> @@ -114,12 +100,9 @@ {% macro populate_timeslots(timeslots, day_index) %} {% for timeslot, sessions in timeslots.iteritems() %} {# timeslot start #} <article id="day-{{ day_index }}-timeslot-{{ loop.index }}" class="program-timeslot"> - {{ 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 %} - <div class="collapse in" - id="day-{{ day_index }}-timeslot-{{ loop.index }}-sessions"> {{ populate_sessions(sessions, day_index, loop.index) }} - </div> <!-- day-{{ day_index }}-timeslot-{{ loop.index }}-sessions end --> {% endif %} </article> <!-- day-{{ day_index }}-timeslot-{{ loop.index }} end --> {% endfor %} {# timeslot start #} @@ -128,9 +111,7 @@ {# lp 2016 template start #} {% for day, timeslots in schedule.iteritems() %} {# day start #} <article id="day-{{ loop.index }}-program" class="program-day"> - {{ mk_day_header(day, "day-%d-timeslots"|format(loop.index)) }} - <div class="collapse in" id="day-{{ loop.index }}-timeslots"> + {{ mk_day_header(day) }} {{ populate_timeslots(timeslots, loop.index) }} - </div> <!-- day-{{ loop.index }}-timeslots end --> </article> <!-- day-{{ loop.index }} end --> {% endfor %} {# day loop end #}