|
1 | 1 | {{ define "main" }} |
| 2 | +{{/* .Params.images (the banner) is deliberately not rendered on the page — |
| 3 | + it's kept only as the OG/social-share image (see head.html), since a |
| 4 | + full-width banner reads as too heavy inline. Speaker photos take its |
| 5 | + place here instead. */}} |
2 | 6 | {{ $isPast := and (not .Date.IsZero) (.Date.Before now) }} |
3 | | -{{ $imgRes := "" }} |
4 | | -{{ with .Params.images }} |
5 | | - {{ $imgFile := index . 0 }} |
6 | | - {{ $imgRes = $.Resources.Get $imgFile }} |
7 | | -{{ end }} |
8 | 7 |
|
9 | 8 | {{ $primaryLabel := "" }} |
10 | 9 | {{ $primaryURL := "" }} |
|
26 | 25 | <span>{{ .Title }}</span> |
27 | 26 | </nav> |
28 | 27 |
|
29 | | - {{ with $imgRes }} |
30 | | - {{ $hero := .Fit "1200x627 jpg q85" }} |
31 | | - <div class="webinar-hero-image-wrap"> |
32 | | - <img src="{{ $hero.RelPermalink }}" alt="" class="webinar-hero-image" width="{{ $hero.Width }}" height="{{ $hero.Height }}"> |
33 | | - </div> |
34 | | - {{ end }} |
35 | | - |
36 | 28 | <header class="webinar-header"> |
37 | 29 | <div class="webinar-meta-row"> |
38 | 30 | <span class="webinar-meta-badge">Webinar</span> |
|
43 | 35 | <h1>{{ .Title }}</h1> |
44 | 36 |
|
45 | 37 | {{ with .Params.speakers }} |
| 38 | + {{ $page := $ }} |
46 | 39 | <ul class="webinar-speakers"> |
47 | 40 | {{ range . }} |
48 | 41 | <li class="webinar-speaker"> |
49 | | - {{ if .profile }} |
50 | | - <a href="{{ .profile }}" class="webinar-speaker-name">{{ .name }}</a> |
51 | | - {{ else if .linkedin }} |
52 | | - <a href="{{ .linkedin }}" class="webinar-speaker-name" target="_blank" rel="noopener">{{ .name }}</a> |
53 | | - {{ else }} |
54 | | - <span class="webinar-speaker-name">{{ .name }}</span> |
| 42 | + {{ $photoRes := "" }} |
| 43 | + {{ with .photo }}{{ $photoRes = $page.Resources.Get . }}{{ end }} |
| 44 | + {{ with $photoRes }} |
| 45 | + {{ $avatar := .Fill "96x96 jpg q85" }} |
| 46 | + <img src="{{ $avatar.RelPermalink }}" alt="" class="webinar-speaker-photo" width="96" height="96" loading="lazy"> |
55 | 47 | {{ end }} |
56 | | - {{ with .role }}<span class="webinar-speaker-role">{{ . }}</span>{{ end }} |
| 48 | + <div class="webinar-speaker-info"> |
| 49 | + {{ if .profile }} |
| 50 | + <a href="{{ .profile }}" class="webinar-speaker-name">{{ .name }}</a> |
| 51 | + {{ else if .linkedin }} |
| 52 | + <a href="{{ .linkedin }}" class="webinar-speaker-name" target="_blank" rel="noopener">{{ .name }}</a> |
| 53 | + {{ else }} |
| 54 | + <span class="webinar-speaker-name">{{ .name }}</span> |
| 55 | + {{ end }} |
| 56 | + {{ with .role }}<span class="webinar-speaker-role">{{ . }}</span>{{ end }} |
| 57 | + </div> |
57 | 58 | </li> |
58 | 59 | {{ end }} |
59 | 60 | </ul> |
|
0 commit comments