cach-radio/inc/themes/castanet/layouts/host/single.html

109 lines
5.8 KiB
HTML
Raw Normal View History

2022-12-15 22:36:40 +01:00
{{ define "main" }}
<div class = "hero_container">
<div class="row">
<div class="col">
<h1>{{ title .Title }} {{ with .Params.Pronouns }}({{ . }}){{ end }}</h1>
</div>
</div>
<div class = "row">
<div class="col-lg-8">
<div class="row">
<div class="col-md-3">
{{- if and (isset .Params "thumbnail") (ne .Params.thumbnail "") -}}
{{- if (eq (slicestr .Params.thumbnail 0 4) "http") -}}
<img alt="{{ .Title }}" src="{{ .Params.thumbnail }}" class="img-fluid episode_image" width="250px">
{{- else -}}
<img alt="{{ .Title }}" src="{{ .Params.thumbnail | absURL}}" class="img-fluid episode_image" width="250px">
{{- end -}}
{{- else -}}
<img alt="{{ .Title }}" src="{{ "img/guest/default-guest.png" | absURL }}" class="img-fluid episode_image" width="250px"/>
{{- end -}}
</div>
<div class="col-md-8">
<div class = "row">
<div class="col">
{{ .Content }}
</div>
</div>
<div class = "row">
<div class = "col guest_social_icons">
{{ if .Params.Website }}
<a href="{{ .Params.Website }}">
<i class="fas fa-home fa-2x"></i>
</a>
{{ 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 }}
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-4">
<div class = "row">
<div class="col">
<h3>Episodes Hosted By {{ .Title }} {{ with .Params.Pronouns }}({{ . }}){{ end }}</h3>
<div class="list-group guest_episode_list">
{{ $.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" }}
<a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }} ({{ with $.Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ $page.Params.episode }})</a>
{{ else if eq $.Site.Params.episode_number_style "brackets" }}
<a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }} [{{ with $.Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ $page.Params.episode }}]</a>
{{ else if eq $.Site.Params.episode_number_style "dash" }}
<a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }} - {{ with $.Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ $page.Params.episode }}</a>
{{ else }}
<a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }}</a>
{{ end }}
{{ else }}
<a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }}</a>
{{ 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") -}}
<a href = "{{$page.Permalink}}" class = "guest_page_episode_link list-group-item list-group-item-action">{{$page.Title}}</a>
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
</div>
</div>
</div>
</div>
</div>
</div>
{{ end }}