lpschedule-generator

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

commit dc94a41802df53806821da65d0443566a5727781
parent 85b0d87d34ab3f606f6285615311fc8aae526ba7
Author: rsiddharth <rsd@gnu.org>
Date:   Sat, 13 Jul 2019 16:58:27 -0400

libreplanet-templates/2016/lp-speakers.jinja2 -> lpschedule_generator/data/speakers.jinja2

Diffstat:
libreplanet-templates/2016/lp-speakers.jinja2 | 110-------------------------------------------------------------------------------
lpschedule_generator/data/speakers.jinja2 | 110+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 110 insertions(+), 110 deletions(-)

diff --git a/libreplanet-templates/2016/lp-speakers.jinja2 b/libreplanet-templates/2016/lp-speakers.jinja2 @@ -1,110 +0,0 @@ -{# -*- mode: jinja2; -*- #} -{# - SPDX-License-Identifier: CC0-1.0 - - This file is part of lpschedule-generator. -#} - - -{# make speakers header macro #} -{% macro mk_speakers_header(speaker_type) %} - <header class="{{ speaker_type }}-header"> - <hgroup> - {% if speaker_type == 'keynote-speakers' %} - <h2>Keynote speakers</h2> - {% else %} - <h2>Speakers</h2> - {% endif %} - </hgroup> - </header> -{% endmacro %} - -{# make keynote speaker header macro #} -{% macro mk_keynote_speaker_header(speaker, id) %} - <header id="{{ id }}" class="keynote-speaker-header"> - <hgroup> - <h2>{{ speaker }}</h2> - </hgroup> - </header> -{% endmacro %} - -{# make speaker header macro #} -{% macro mk_speaker_header(speaker, id) %} - <header id="{{ id }}" class="speaker-header"> - <hgroup> - <h2>{{ speaker }}</h2> - </hgroup> - </header> -{% endmacro %} - -{# make bio macro #} -{% macro mk_bio(bio_list) %} - {% for bio_p in bio_list %} - <p>{{ bio_p }}</p> - {% endfor %} -{% endmacro %} - -{# populate keynote speakers macro #} -{% macro populate_keynote_speakers(speakers) %} - {% for speaker in speakers %} - <section class="speaker-block" id="lp-keynote-speaker-{{ loop.index }}"> - <!-- keynote-speaker-{{ loop.index }} row start --> - <div class="row"> - {% if speaker.img_url %} - <!-- keynote-speaker-{{ loop.index }} img column start --> - <div class="col-md-3 col-sm-4 col-xs-5"> - <img class="img-responsive" src="{{ speaker.img_url }}" - alt="[ {{ speaker.img_alt }} ]" /> - </div> <!-- keynote-speaker-{{ loop.index }} img column end --> - <!-- keynote-speaker-{{ loop.index }} content column start --> - <div class="col-md-9 col-sm-8 col-xs-7"> - {% else %} - <!-- keynote-speaker-{{ loop.index }} content column start --> - <div class="col-md-offset-3 col-sm-offset-4 col-xs-offset-5 col-md-9 col-sm-8 col-xs-7"> - {% endif %} - {{ mk_keynote_speaker_header(speaker.speaker, speaker.id) }} - {{ mk_bio(speaker.bio) }} - </div> <!-- keynote-speaker-{{ loop.index }} content column end --> - </div> <!-- keynote-speaker-{{ loop.index }} row end --> - </section> - {% endfor %} -{% endmacro %} - -{# populate speakers macro #} -{% macro populate_speakers(speakers) %} - {% for speaker in speakers %} - <section class="speaker-block" id="lp-speaker-{{ loop.index }}"> - <div class="row"> <!-- speaker-{{ loop.index }} row start --> - {% if speaker.img_url %} - <!-- speaker-{{ loop.index }} img column start --> - <div class="col-md-2 col-sm-3 col-xs-4"> - <img class="img-responsive" src="{{ speaker.img_url }}" - alt="[ {{ speaker.img_alt }} ]" /> - </div> <!-- speaker-{{ loop.index }} img column end --> - <!-- speaker-{{ loop.index }} content column start --> - <div class="col-md-10 col-sm-9 col-xs-8"> - {% else %} - <!-- speaker-{{ loop.index }} content column start --> - <div class="col-md-offset-2 col-sm-offset-3 col-xs-offset-4 col-md-10 col-sm-9 col-xs-8"> - {% endif %} - {{ mk_speaker_header(speaker.speaker, speaker.id) }} - {{ mk_bio(speaker.bio) }} - </div> <!-- speaker-{{ loop.index }} content column end --> - </div> <!-- speaker-{{ loop.index }} row end --> - </section> - {% endfor %} -{% endmacro %} - -{# lp speakers 2016 template start #} -{% for speaker_type, speakers in lp_dict.items() %} - <article class="speakers-block" id="lp-{{ speaker_type }}"> - {% if speaker_type == 'keynote-speakers' %} - {{ mk_speakers_header(speaker_type) }} - {{ populate_keynote_speakers(speakers) }} - {% elif speaker_type == 'speakers' %} - {{ mk_speakers_header(speaker_type) }} - {{ populate_speakers(speakers) }} - {% endif %} - </article> -{% endfor %} -{# lp speakers 2016 template end #} diff --git a/lpschedule_generator/data/speakers.jinja2 b/lpschedule_generator/data/speakers.jinja2 @@ -0,0 +1,110 @@ +{# -*- mode: jinja2; -*- #} +{# + SPDX-License-Identifier: CC0-1.0 + + This file is part of lpschedule-generator. +#} + + +{# make speakers header macro #} +{% macro mk_speakers_header(speaker_type) %} + <header class="{{ speaker_type }}-header"> + <hgroup> + {% if speaker_type == 'keynote-speakers' %} + <h2>Keynote speakers</h2> + {% else %} + <h2>Speakers</h2> + {% endif %} + </hgroup> + </header> +{% endmacro %} + +{# make keynote speaker header macro #} +{% macro mk_keynote_speaker_header(speaker, id) %} + <header id="{{ id }}" class="keynote-speaker-header"> + <hgroup> + <h2>{{ speaker }}</h2> + </hgroup> + </header> +{% endmacro %} + +{# make speaker header macro #} +{% macro mk_speaker_header(speaker, id) %} + <header id="{{ id }}" class="speaker-header"> + <hgroup> + <h2>{{ speaker }}</h2> + </hgroup> + </header> +{% endmacro %} + +{# make bio macro #} +{% macro mk_bio(bio_list) %} + {% for bio_p in bio_list %} + <p>{{ bio_p }}</p> + {% endfor %} +{% endmacro %} + +{# populate keynote speakers macro #} +{% macro populate_keynote_speakers(speakers) %} + {% for speaker in speakers %} + <section class="speaker-block" id="lp-keynote-speaker-{{ loop.index }}"> + <!-- keynote-speaker-{{ loop.index }} row start --> + <div class="row"> + {% if speaker.img_url %} + <!-- keynote-speaker-{{ loop.index }} img column start --> + <div class="col-md-3 col-sm-4 col-xs-5"> + <img class="img-responsive" src="{{ speaker.img_url }}" + alt="[ {{ speaker.img_alt }} ]" /> + </div> <!-- keynote-speaker-{{ loop.index }} img column end --> + <!-- keynote-speaker-{{ loop.index }} content column start --> + <div class="col-md-9 col-sm-8 col-xs-7"> + {% else %} + <!-- keynote-speaker-{{ loop.index }} content column start --> + <div class="col-md-offset-3 col-sm-offset-4 col-xs-offset-5 col-md-9 col-sm-8 col-xs-7"> + {% endif %} + {{ mk_keynote_speaker_header(speaker.speaker, speaker.id) }} + {{ mk_bio(speaker.bio) }} + </div> <!-- keynote-speaker-{{ loop.index }} content column end --> + </div> <!-- keynote-speaker-{{ loop.index }} row end --> + </section> + {% endfor %} +{% endmacro %} + +{# populate speakers macro #} +{% macro populate_speakers(speakers) %} + {% for speaker in speakers %} + <section class="speaker-block" id="lp-speaker-{{ loop.index }}"> + <div class="row"> <!-- speaker-{{ loop.index }} row start --> + {% if speaker.img_url %} + <!-- speaker-{{ loop.index }} img column start --> + <div class="col-md-2 col-sm-3 col-xs-4"> + <img class="img-responsive" src="{{ speaker.img_url }}" + alt="[ {{ speaker.img_alt }} ]" /> + </div> <!-- speaker-{{ loop.index }} img column end --> + <!-- speaker-{{ loop.index }} content column start --> + <div class="col-md-10 col-sm-9 col-xs-8"> + {% else %} + <!-- speaker-{{ loop.index }} content column start --> + <div class="col-md-offset-2 col-sm-offset-3 col-xs-offset-4 col-md-10 col-sm-9 col-xs-8"> + {% endif %} + {{ mk_speaker_header(speaker.speaker, speaker.id) }} + {{ mk_bio(speaker.bio) }} + </div> <!-- speaker-{{ loop.index }} content column end --> + </div> <!-- speaker-{{ loop.index }} row end --> + </section> + {% endfor %} +{% endmacro %} + +{# lp speakers 2016 template start #} +{% for speaker_type, speakers in lp_dict.items() %} + <article class="speakers-block" id="lp-{{ speaker_type }}"> + {% if speaker_type == 'keynote-speakers' %} + {{ mk_speakers_header(speaker_type) }} + {{ populate_keynote_speakers(speakers) }} + {% elif speaker_type == 'speakers' %} + {{ mk_speakers_header(speaker_type) }} + {{ populate_speakers(speakers) }} + {% endif %} + </article> +{% endfor %} +{# lp speakers 2016 template end #}