13 lines
751 B
HTML
13 lines
751 B
HTML
{{ $src := (.Params.podcast.mp3 | absURL) -}}
|
|
{{ if site.Params.Podcast.cdn -}}
|
|
{{ $src = add site.Params.Podcast.cdn (.Params.podcast.mp3 | relURL) -}}
|
|
{{ end -}}
|
|
<figure class="podcast">
|
|
<audio controls preload="{{ site.Params.Podcast.preload | default "metadata" }}"><source src="{{ $src }}" type="audio/mpeg"></audio>
|
|
<figcaption><a href="{{ $src }}">{{ .Title }}</a></figcaption>
|
|
</figure>
|
|
{{ with .Params.podcast.image }}
|
|
{{ $resource := resources.Get .src }}{{ $size := "250x" }}{{ with .width }}{{ $size = (add (string .) "x") }}{{ end }}{{ $image := $resource.Resize $size -}}
|
|
<figure class="image {{ .class | default "right" }}"><img src="{{ $image.RelPermalink }}" width="{{ .width | default "250" }}" alt="{{ .alt }}"></figure>
|
|
{{ end -}}
|