@@ -43,29 +43,49 @@ <h2>Program</h2>
4343 {{- $.Scratch.Set "speaker_len" (.Params.speakers | len) -}}
4444 {{- $.Scratch.Set "speaker_count" 0 -}}
4545 {{- end -}}
46- <!-- end if eq $talk_slug $e.name -->
46+ {{- end -}}
47+ {{- range .Params.speakers -}}
48+ {{- $.Scratch.Set "speaker_count" (add ($.Scratch.Get "speaker_count") 1) -}}
49+ {{- $.Scratch.Set "speakername" . -}}
50+ {{- range where $.Site.Pages "Type" "speaker" -}}
51+ {{- if eq (index (split (.Permalink | relURL) "/") 2) $e.name -}}
52+ {{- if eq .File.BaseFileName ($.Scratch.Get "speakername") -}}
53+ {{- $.Scratch.Add (printf "%s-speaker" ($.Scratch.Get "base_file_name")) .Title -}}
54+ {{- if ne ($.Scratch.Get "speaker_count") ($.Scratch.Get "speaker_len") -}}
55+ {{- $.Scratch.Add (printf "%s-speaker" ($.Scratch.Get "base_file_name")) ", " -}}
4756 {{- end -}}
48- <!-- end range where $.Site.Pages "Type" "speaker" -->
57+ {{- end -}}
58+ {{- end -}}
59+ <!-- end if eq $speaker_slug $e.name -->
60+ {{- end -}}
61+ <!-- end range where $.Site.Pages "Type" "speaker" -->
62+ {{- end -}}
63+ <!-- end ranging over speakers -->
64+ {{- end -}}
65+ <!-- end if eq $talk_slug $e.name -->
66+ {{- end -}}
67+ <!-- end range where $.Site.Pages "Type" "speaker" -->
4968 <!-- Get the dates for the program -->
5069 {{- with $e -}}
5170 {{- range .program -}}
5271 {{- $.Scratch.SetInMap "dates" .date .date -}}
5372 {{- end -}}
5473 {{- end -}}
55- <!-- new experimental program end -->
56- < div class ="row ">
57- < div class ="col ">
58- < div id ="accordion " role ="tablist " aria-multiselectable ="true ">
59- {{- range ($.Scratch.GetSortedMapValues "dates") -}}
60- {{- $.Scratch.Set "date" . -}}
61- {{- with $e -}}
62- {{- if .program -}}
63- < div class ="card ">
64- < div class ="card-header " role ="tab " id ="{{printf "headingOne-%s " ($.Scratch.Get "date") }}">
65- < h5 class ="mb-0 ">
66- {{- dateFormat "January 2, 2006" ($.Scratch.Get "date") -}}
67- </ h5 >
68- </ div >
74+ <!-- new experimental program end -->
75+ < div class ="row ">
76+ < div class ="col ">
77+ < div id ="accordion " role ="tablist " aria-multiselectable ="true ">
78+ {{- range ($.Scratch.GetSortedMapValues "dates") -}}
79+ {{- $.Scratch.Set "date" . -}}
80+ {{- with $e -}}
81+ {{- if .program -}}
82+ < div class ="card ">
83+ < div class ="card-header " role ="tab " id ="{{printf "headingOne-%s " ($.Scratch.Get "date") }}">
84+ < h5 class ="mb-0 ">
85+ {{- dateFormat "January 2, 2006" ($.Scratch.Get "date") -}}
86+ </ a >
87+ </ h5 >
88+ </ div >
6989
7090 < div id ="{{printf "#collapse-%s " ($.Scratch.Get "date") }}" class="collapse show " role ="tabpanel " aria-labelledby ="{{printf "headingOne-%s " ($.Scratch.Get "date") }}">
7191 < div class ="card-block ">
@@ -93,23 +113,23 @@ <h5 class="mb-0">
93113 {{- if .comments -}}
94114 < span class ="program-page-desc "> {{ .comments | markdownify }}< br /> </ span >
95115 {{- end -}}
96- {{- else if or (eq .type "talk") (eq .type "workshop") -}}
97- {{- if .custom_url -}}
98- < a href ="{{ .custom_url | safeURL }} "> {{ $.Scratch.Get (printf "%s-speaker" .title) }} - {{ $.Scratch.Get .title }}</ a > < br />
99- {{- else -}}
100- < a href ="{{ (printf "events /%s/program/%s" $e.name .title) | absURL }}"> {{ $.Scratch.Get (printf "%s-speaker" .title) }} - {{ $.Scratch.Get .title }}</ a > < br />
101- {{- end -}}
102- {{- if eq ($.Scratch.Get "icons") "TRUE" -}}
103- {{- with ($.Scratch.Get (printf "%s-video_link" .title)) -}}< a href ="{{ . }} "> < i class ="fa fa-video-camera " aria-hidden ="true "> </ i > </ a > {{- end -}}
104- {{- with ($.Scratch.Get (printf "%s-slides_link" .title)) -}}< a href ="{{ . }} "> < i class ="fa fa-file-text-o " aria-hidden ="true "> </ i > </ a > {{- end -}}
105- {{- end -}}
116+ {{- else if or (eq .type "talk") (eq .type "workshop") -}}
117+ {{- if .custom_url -}}
118+ < a href ="{{ .custom_url | safeURL }} "> {{ $.Scratch.Get (printf "%s-speaker" .title) }} - {{ $.Scratch.Get .title }}</ a > < br />
119+ {{- else -}}
120+ < a href ="{{ (printf "events /%s/program/%s" $e.name .title) | absURL }}"> {{ $.Scratch.Get (printf "%s-speaker" .title) }} - {{ $.Scratch.Get .title }}</ a > < br />
121+ {{- end -}}
122+ {{- if eq ($.Scratch.Get "icons") "TRUE" -}}
123+ {{- with ($.Scratch.Get (printf "%s-video_link" .title)) -}}< a href ="{{ . }} "> < i class ="fa fa-video-camera " aria-hidden ="true "> </ i > </ a > {{- end -}}
124+ {{- with ($.Scratch.Get (printf "%s-slides_link" .title)) -}}< a href ="{{ . }} "> < i class ="fa fa-file-text-o " aria-hidden ="true "> </ i > </ a > {{- end -}}
125+ {{- end -}}
106126 < br />
107127 < br />
108128 {{- if .comments -}}
109129 < span class ="program-page-desc "> {{ .comments | markdownify }}< br /> </ span >
110130 {{- end -}}
111131
112- {{- else if eq .type "ignite" -}}
132+ {{- else if eq .type "ignite" -}}
113133 {{ .title }}
114134 <!-- do ignite stuff here -->
115135 {{- with $e -}}
@@ -121,49 +141,54 @@ <h5 class="mb-0">
121141 {{- range where $e.ignites "date" ($.Scratch.Get "date") -}}
122142 < li >
123143 {{- if and ($.Scratch.Get .title) (.custom_url) -}}
124- < a href ="{{ .custom_url | safeURL }} "> {{ $.Scratch.Get (printf "%s-speaker" .title) }} - {{ $.Scratch.Get .title }}</ a >
144+ < a href ="{{ .custom_url | safeURL }} "> {{ $.Scratch.Get (printf "%s-speaker" .title) }} - {{ $.Scratch.Get .title }}</ a >
125145 {{- else if ($.Scratch.Get .title) -}}
126- < a href ="/events/{{ $e.name }}/program/{{ .title }} "> {{ $.Scratch.Get (printf "%s-speaker" .title) }} - {{ $.Scratch.Get .title }}</ a >
127- {{- if eq ($.Scratch.Get "icons") "TRUE" -}}
128- {{- with ($.Scratch.Get (printf "%s-video_link" .title)) -}}< a href ="{{ . }} "> < i class ="fa fa-video-camera " aria-hidden ="true "> </ i > </ a > {{- end -}}
129- {{- with ($.Scratch.Get (printf "%s-slides_link" .title)) -}}< a href ="{{ . }} "> < i class ="fa fa-file-text-o " aria-hidden ="true "> </ i > </ a > {{- end -}}
130- {{- end -}}
131- </ li >
146+ < a href ="/events/{{ $e.name }}/program/{{ .title }} "> {{ $.Scratch.Get (printf "%s-speaker" .title) }} - {{ $.Scratch.Get .title }}</ a >
132147 {{- else -}}
133- {{ .title }}
148+ {{ .title }}
149+ {{- end -}}
150+ {{- if eq ($.Scratch.Get "icons") "TRUE" -}}
151+ {{- with ($.Scratch.Get (printf "%s-video_link" .title)) -}}< a href ="{{ . }} "> < i class ="fa fa-video-camera " aria-hidden ="true "> </ i > </ a > {{- end -}}
152+ {{- with ($.Scratch.Get (printf "%s-slides_link" .title)) -}}< a href ="{{ . }} "> < i class ="fa fa-file-text-o " aria-hidden ="true "> </ i > </ a > {{- end -}}
134153 {{- end -}}
135154 </ li >
136- {{- end -}}
137- </ ul >
138- {{- end -}}
139- {{- end -}}
140- {{- end -}}
141- <!-- end ignite stuff here -->
142- <!-- do open-space stuff here -->
143- {{- else if (eq .type "open-space") -}}
144- {{- if .custom_url -}}
145- < a href ="{{ .custom_url | safeURL }} " target ="_blank " rel ="noopener "> {{ .title }}</ a > < br />
146- {{- else -}}
147- < a href ="{{ "open-space-format /" | absURL }}"> {{ .title }}</ a > < br />
155+ {{- end -}}<!-- rang ignites-->
156+ </ ul >
157+ {{- end -}} <!-- if ge $ignites_len 1 -->
148158 {{- end -}}
149159 {{- end -}}
150- </ div >
151- </ div >
152- {{- if eq (div ($.Scratch.Get "program_len") 2) ($.Scratch.Get "program_counter") -}}
153- </ div >
154- < div class ="col-lg-6 ">
155- {{- end -}}
156- {{- end -}}
160+ <!-- end ignite stuff here -->
161+ <!-- do open-space stuff here -->
162+ {{- else if (eq .type "open-space") -}}
163+ {{- if .custom_url -}}
164+ < a href ="{{ .custom_url | safeURL }} "> {{ .title }}</ a > < br />
165+ {{- else -}}
166+ < a href ="{{ "open-space-format /" | absURL }}"> {{ .title }}</ a > < br />
167+ {{- end -}}
168+ {{- else -}}
169+ {{ .title }}
170+ {{- end -}}
171+ </ div >
157172 </ div >
173+ {{- if eq (div ($.Scratch.Get "program_len") 2) ($.Scratch.Get "program_counter") -}}
158174 </ div >
159- </ div >
160- </ div >
161- {{- end -}}
162- {{- end -}}
163- {{- end -}}
175+ < div class ="col-lg-6 ">
176+ {{- end -}}
177+ {{- end -}}
178+ {{- end -}}
179+ {{- end -}}
180+ </ div >
181+ </ div >
182+ </ div >
164183 </ div >
165184 </ div >
166- </ div >
167- <!--end row-->
168- {{- end -}}
169185{{- end -}}
186+ </ div >
187+ </ div >
188+ </ div >
189+ <!--end row-->
190+ </ div>
191+ </ div>
192+ {{- end -}}
193+
194+ {{ end }}
0 commit comments