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

Commit

Permalink
Merge pull request #427 from devopsdays/fix-broken-speaker-page
Browse files Browse the repository at this point in the history
Add check for legacy speaker files
  • Loading branch information
mattstratton authored Mar 23, 2017
2 parents 394d91f + c9eb702 commit 24656e8
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions layouts/speakers/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,25 @@ <h3 class="card-title speakers-page"><a href = "{{ .Permalink }}">{{ .Title }}</
<!-- old stuff -->
{{ if ne ($.Scratch.Get "speakers-exist") "true" }}
{{ .Content }}

{{ range $fname, $s := index .Site.Data.speakers (print (chomp $e.year)) $city_slug }}
<div class="row">
<div class="col-md-12 col-lg-3">
<img alt = "{{ $s.name }}" src = "/events/{{ $event_slug }}/speakers/{{$fname}}.jpg" class="speakers-page old-speaker">
</div>
<div class= "col-md-12 col-lg-9 old-speaker-bio speakers-page">
<h3><a href="/events/{{ $event_slug }}/program/{{$fname}}">{{ $s.name }}</a></h3>
{{ if $s.twitter }} <a href="https://twitter.com/{{ $s.twitter }}">@{{ $s.twitter }}</a><br>{{ end }}
{{ if $s.website }}Website: <a href="{{ $s.website }}">{{ $s.website }}</a><br>{{ end }}
{{ if $s.pronouns }}Pronouns: {{ $s.pronouns }}{{ end }}
<br>
{{ $s.bio | markdownify }}
<hr>
</div>
</div>

{{ if (where (readDir "data/speakers") "Name" (chomp $e.year))}}
{{ if (where (readDir (printf "data/speakers/%s" (chomp $e.year) )) "Name" $city_slug )}}
{{ range $fname, $s := index .Site.Data.speakers (print (chomp $e.year)) $city_slug }}
<div class="row">
<div class="col-md-12 col-lg-3">
<img alt = "{{ $s.name }}" src = "/events/{{ $event_slug }}/speakers/{{$fname}}.jpg" class="speakers-page old-speaker">
</div>
<div class= "col-md-12 col-lg-9 old-speaker-bio speakers-page">
<h3><a href="/events/{{ $event_slug }}/program/{{$fname}}">{{ $s.name }}</a></h3>
{{ if $s.twitter }} <a href="https://twitter.com/{{ $s.twitter }}">@{{ $s.twitter }}</a><br>{{ end }}
{{ if $s.website }}Website: <a href="{{ $s.website }}">{{ $s.website }}</a><br>{{ end }}
{{ if $s.pronouns }}Pronouns: {{ $s.pronouns }}{{ end }}
<br>
{{ $s.bio | markdownify }}
<hr>
</div>
</div>
{{ end }}
{{end }}
{{ end }}

<style>
Expand Down

0 comments on commit 24656e8

Please sign in to comment.