{{ template "base.html" . }}

{{ define "content" }}
<div class="content-block">
	<div class="ph2 ph0-ns">
		<h2>Episode {{ .Episode.EpisodeNumber }}: {{ .Episode.Title }}</h2>
		<div>
			{{ template "podcast_actions.html" .Podcast }}
			{{ with .EditUrl }}
				<a class="pl2" href="{{ . }}">&#9998; Edit Episode</a>
			{{ end }}
		</div>

		<div class="flex flex-row-ns flex-column-reverse items-center">
			<div class="flex-grow-1 w-100">
				<audio preload="metadata" class="w-100" controls src="{{ .Episode.FileUrl }}"></audio>
				<div>
					<a download href="{{ .Episode.FileUrl }}">Download</a>
				</div>
			</div>
			<div class="ml3-ns flex-shrink-0 w4">
				<img class="br3" src="{{ .Podcast.ImageUrl }}">
			</div>
		</div>

		<div class="pv2 p-spaced w-100 overflow-hidden">
			{{ .Episode.DescriptionHtml }}
		</div>
	</div>
</div>
{{ end }}
