Skip to content
This repository has been archived by the owner on Jul 21, 2019. It is now read-only.

Commit

Permalink
Make old-style talks compatible (#191)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Stratton <[email protected]>
  • Loading branch information
mattstratton authored Feb 4, 2017
1 parent 2db358c commit 02322e4
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion layouts/talk/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h2>Speakers</h2>
<h2>Speaker</h2>
{{- end -}}
{{- end -}}
{{- end -}}


{{ range .Params.speakers }}
{{ $.Scratch.Set "speakername" . }}
Expand All @@ -89,6 +89,26 @@ <h2>Speaker</h2>
{{- end -}} <!-- end if eq $talk_slug $event_slug -->
{{- end -}} <!-- end range where $.Site.Pages "Type" "speaker" -->
{{ end }}
{{ else }}<!-- now show the old stuff -->
<h2>Speaker</h2>
{{ range $fname, $s := index .Site.Data.speakers (print (chomp $e.year)) $city_slug }}
{{ if in ($.LinkTitle | urlize) $fname }}
<div class="row">
<div class="col-md-12">
<img alt = "{{ $s.name }}" src = "/events/{{ $event_slug }}/speakers/{{$fname}}.jpg" class="img-responsive" width = "250px">
</div>
</div>
<div class = "row">
<div class= "col-md-8">
<h3>{{ $s.name }}</h3>
{{ if $s.twitter }} <a href="https://twitter.com/{{ $s.twitter }}">@{{ $s.twitter }}</a><br>{{ end }}
<br>
{{ $s.bio | markdownify }}
</div>
</div>
{{ end }}
{{ end }}
{{- end -}} <!-- end check for speakers being set -->
</div>
</div>

Expand Down

0 comments on commit 02322e4

Please sign in to comment.