blob: 5c1c1327eb45b408ca0a84a619fce7ea5289b16d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
{# -*- mode: jinja2; -*- #}
{#
Copyright (C) 2016 lpschedule-generator contributors. See CONTRIBUTORS.
This file is part of lpschedule-generator.
lpschedule-generator is free software: you can redistribute it
and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
lpschedule-generator is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with lpschedule-generator (see COPYING). If not, see
<http://www.gnu.org/licenses/>.
#}
{# 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.iteritems() %}
<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 #}
|