cach-radio/inc/themes/castanet/layouts/partials/hosts.html

60 lines
3.3 KiB
HTML

<div class = "row">
<div class = "col-md-12">
<h2>Hosts</h2>
</div>
</div>
<div class = "row">
<div class = "col-md-12">
{{ range where .Site.Pages.ByTitle "Type" "host" }}
{{- if ne .Params.hide "true" -}}
{{- if not (in .File.BaseFileName "_index") -}}
<div class="row person_row">
<div class="col-md-3">
{{- if and (isset .Params "thumbnail") (ne .Params.thumbnail "") -}}
{{- if (eq (slicestr .Params.thumbnail 0 4) "http") -}}
<a href = "{{(printf "host/%s/" .File.BaseFileName) | absURL }}"><img alt="{{ .Title }}" src="{{ .Params.thumbnail }}" class="img-fluid" width="250px"></a>
{{- else -}}
<a href = "{{(printf "host/%s/" .File.BaseFileName) | absURL }}"><img alt="{{ .Title }}" src="{{ .Params.thumbnail | absURL}}" class="img-fluid" width="250px"></a>
{{- end -}}
{{- else -}}
<a href = "{{(printf "host/%s/" .File.BaseFileName) | absURL }}"><img alt="{{ .Title }}" src="{{ "img/host/default-host.png" | absURL }}" class="img-fluid" width="250px"/></a>
{{- end -}}
</div>
<div class= "col-md-6">
<h3><a href = "{{(printf "host/%s/" .File.BaseFileName) | absURL }}">{{ .Title }}</a> {{ with .Params.Pronouns }}({{ . }}){{ end }}</h3>
<p>{{ .Content }}</p>
{{ with .Params.Website }}
<a href = "{{ . }}"><i class="fas fa-home fa-2x"></i></a>
{{ end }}
{{ with .Params.Twitter }}
{{ partial "social-link.html" (dict "context" . "aclass" "" "iclass" "fab fa-twitter-square fa-2x" "prefix" "https://twitter.com/") }}
{{ end }}
{{ with .Params.GitHub}}
{{ partial "social-link.html" (dict "context" . "aclass" "" "iclass" "fab fa-github-square fa-2x" "prefix" "https://github.com/") }}
{{ end }}
{{ with .Params.LinkedIn }}
{{ partial "social-link.html" (dict "context" . "aclass" "" "iclass" "fab fa-linkedin fa-2x" "prefix" "https://www.linkedin.com/in/") }}
{{ end }}
{{ with .Params.Facebook }}
{{ partial "social-link.html" (dict "context" . "aclass" "" "iclass" "fab fa-facebook-square fa-2x" "prefix" "https://www.facebook.com/") }}
{{ end }}
{{ with .Params.Pinterest }}
{{ partial "social-link.html" (dict "context" . "aclass" "" "iclass" "fab fa-pinterest-square fa-2x" "prefix" "https://www.pinterest.com/") }}
{{ end }}
{{ with .Params.Instagram }}
{{ partial "social-link.html" (dict "context" . "aclass" "" "iclass" "fab fa-instagram fa-2x" "prefix" "https://www.instagram.com/") }}
{{ end }}
{{ with .Params.YouTube }}
{{ partial "social-link.html" (dict "context" . "aclass" "" "iclass" "fab fa-youtube-square fa-2x" "prefix" "https://www.youtube.com/") }}
{{ end }}
{{ with .Params.Twitch }}
{{ partial "social-link.html" (dict "context" . "aclass" "" "iclass" "fab fa-twitch fa-2x" "prefix" "https://twitch.tv/") }}
{{ end }}
</div>
</div>
{{- end -}}
{{- end -}}
{{ end }}
</div>
</div>