{{ define "main" }}

{{ title .Title }} {{ with .Params.Pronouns }}({{ . }}){{ end }}

{{- if and (isset .Params "thumbnail") (ne .Params.thumbnail "") -}} {{- if (eq (slicestr .Params.thumbnail 0 4) "http") -}} {{ .Title }} {{- else -}} {{ .Title }} {{- end -}} {{- else -}} {{ .Title }} {{- end -}}
{{ .Content }}
{{ if .Params.Website }} {{ end }} {{ if .Params.Twitter }} {{ partial "social-link.html" (dict "context" .Params.Twitter "iclass" "fab fa-twitter-square fa-2x" "prefix" "https://twitter.com/" "text" "") }} {{ end }} {{ if .Params.GitHub }} {{ partial "social-link.html" (dict "context" .Params.GitHub "iclass" "fab fa-github-square fa-2x" "prefix" "https://github.com/" "text" "") }} {{ end }} {{ if .Params.LinkedIn }} {{ partial "social-link.html" (dict "context" .Params.LinkedIn "iclass" "fab fa-linkedin fa-2x" "prefix" "https://www.linkedin.com/in/" "text" "") }} {{ end }} {{ if .Params.Facebook }} {{ partial "social-link.html" (dict "context" .Params.Facebook "iclass" "fab fa-facebook-square fa-2x" "prefix" "https://www.facebook.com/" "text" "") }} {{ end }} {{ if .Params.Pinterest }} {{ partial "social-link.html" (dict "context" .Params.Pinterest "iclass" "fab fa-pinterest-square fa-2x" "prefix" "https://www.pinterest.com/" "text" "") }} {{ end }} {{ if .Params.Instagram }} {{ partial "social-link.html" (dict "context" .Params.Instagram "iclass" "fab fa-instagram fa-2x" "prefix" "https://www.instagram.com/" "text" "") }} {{ end }} {{ if .Params.YouTube }} {{ partial "social-link.html" (dict "context" .Params.YouTube "iclass" "fab fa-youtube-square fa-2x" "prefix" "https://www.youtube.com/" "text" "") }} {{ end }} {{ if .Params.Twitch }} {{ partial "social-link.html" (dict "context" .Params.Twitch "iclass" "fab fa-twitch fa-2x" "prefix" "https://twitch.tv/" "text" "") }} {{ end }}

Episodes Hosted By {{ .Title }} {{ with .Params.Pronouns }}({{ . }}){{ end }}

{{ $.Scratch.Set "host-name" .File.BaseFileName }} {{ range $page := (where ( where site.RegularPages "Type" "in" site.Params.mainSections) ".Params.upcoming" "!=" true ) }} {{ range $page.Params.hosts }} {{ if eq . ($.Scratch.Get "host-name") }} {{ if and (isset $.Site.Params "episode_number_style") ($page.Params.episode)}} {{ if eq $.Site.Params.episode_number_style "parens" }} {{ $page.Title }} ({{ with $.Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ $page.Params.episode }}) {{ else if eq $.Site.Params.episode_number_style "brackets" }} {{ $page.Title }} [{{ with $.Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ $page.Params.episode }}] {{ else if eq $.Site.Params.episode_number_style "dash" }} {{ $page.Title }} - {{ with $.Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ $page.Params.episode }} {{ else }} {{ $page.Title }} {{ end }} {{ else }} {{ $page.Title }} {{ end }} {{ end }} {{ end }} {{ end }} {{- with .Params.Aka -}} {{ range $name := . }} {{- $.Scratch.Set "host-name" $name -}} {{- range $page := (where ( where site.RegularPages "Type" "in" site.Params.mainSections) ".Params.upcoming" "!=" true ) -}} {{- range $page.Params.hosts -}} {{- if eq . ($.Scratch.Get "host-name") -}} {{$page.Title}} {{- end -}} {{- end -}} {{- end -}} {{- end -}} {{- end -}}
{{ end }}