Skip to content

Commit

Permalink
Conditionalize speaker and talk links in schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
carlwgeorge committed Apr 4, 2024
1 parent 1a02ed6 commit f4c6b40
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions themes/eventre-hugo/layouts/_default/schedule.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,27 @@ <h3>{{.title | markdownify}}</h3>
<span class="time">{{ .time }}</span>
</div>
<!-- Speaker -->
{{ if .speaker_link }}
<a href="{{ .speaker_link | absURL }}">
<div class="speaker">
<img src="{{ .speaker_image | absURL }}" alt="{{.speaker}}">
<span class="name">{{.speaker}}</span>
</div>
</a>
{{ else }}
<div class="speaker">
<img src="{{ .speaker_image | absURL }}" alt="{{.speaker}}">
<span class="name">{{.speaker}}</span>
</div>
{{ end }}
<!-- Subject -->
{{ if .talk_link }}
<a href="{{ .talk_link | absURL }}">
<div class="subject">{{ .subject }}</div>
</a>
{{ else }}
<div class="subject">{{ .subject }}</div>
{{ end }}
<!-- Venue -->
<div class="venue">{{ .venue | markdownify }}</div>
</div>
Expand Down
11 changes: 11 additions & 0 deletions themes/eventre-hugo/layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,27 @@ <h3>{{.title | markdownify}}</h3>
<span class="time">{{ .time }}</span>
</div>
<!-- Speaker -->
{{ if .speaker_link }}
<a href="{{ .speaker_link | absURL }}">
<div class="speaker">
<img src="{{ .speaker_image | absURL }}" alt="{{.speaker}}">
<span class="name">{{.speaker}}</span>
</div>
</a>
{{ else }}
<div class="speaker">
<img src="{{ .speaker_image | absURL }}" alt="{{.speaker}}">
<span class="name">{{.speaker}}</span>
</div>
{{ end }}
<!-- Subject -->
{{ if .talk_link }}
<a href="{{ .talk_link | absURL }}">
<div class="subject">{{ .subject }}</div>
</a>
{{ else }}
<div class="subject">{{ .subject }}</div>
{{ end }}
<!-- Venue -->
<div class="venue">{{ .venue | markdownify }}</div>
</div>
Expand Down

0 comments on commit f4c6b40

Please sign in to comment.