{{ define "main" }}

{{ .Params.Title }}

{{ if eq .Params.Mediatype "talk" }} Presented by {{ else if eq .Params.Mediatype "demo" }} Presented by {{ else if eq .Params.Mediatype "chat" }} Fireside chat with {{ else if eq .Params.Mediatype "podcast" }} A podcast hosted by {{ end }} {{ $lastSpeaker := (add (len .Params.Speakers) -1) }} {{ range $i, $s := .Params.Speakers }} {{ $s.name }}{{ if not (eq $i $lastSpeaker) }},{{ end }} {{ end }} {{ with .GetPage (path.Join "/media" .Params.conference) }} at {{ .Title }} {{ end }}
{{ range .Params.Videos }}
{{ if eq .service "vimeo" }} {{ else if eq .service "youtube" }} {{ else }} {{ .title }} {{ end }}
{{ end }} {{ range .Params.Notes }} {{ partial "components/bignote.html" . }} {{ end }}
{{ or .Content .Params.description }}
{{ $hasGoodSpeaker := false }} {{ range .Params.Speakers }} {{ if or .bio .image }} {{ $hasGoodSpeaker = true }} {{ end }} {{ end }} {{ if $hasGoodSpeaker }}

About the speaker{{ if (gt (len .Params.Speakers) 1) }}s{{ end }}

{{ range .Params.Speakers }}
{{ .name }}
{{ if or .bio .image }}
{{ if .image }} {{ $imageurl := resources.Get .image }} {{ if $imageurl}}
{{ end }} {{ end }} {{ if .bio }} {{ .bio | markdownify }} {{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ range .Params.Videos }} {{ if .download_link }} Download video: {{ .title }} {{ end }} {{ end }}
{{ end }}