<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>{{.Data.Name}}{{if gt .Data.First_air_date.Year 1}} ({{.Data.First_air_date.Year}}){{end}} — a·muse</title>
		<link rel="stylesheet" href="/static/style/style.css" />
		<link rel="icon" type="image/svg+xml" href="/static/img/logo.svg">
		<link rel="apple-touch-icon" type="image/svg+xml" href="/static/img/logo.svg">
	</head>
	<body>
		<header class="w12 bg-primary-semi-transparent padding-bottom-_25">
			<a href="/" class="decoration-none">
				<h1 class="inline valign-mid text-white sans margin-lr-1">a·muse</h1>
			</a>
			<form action="/items/" method="get" class="flex inline right-float move-100 margin-lr-1 border-bottom-white">
				<input type="search" name="q" class="phone-max-width-8 border-none bg-none sans text-white" />
				<input type="submit" value="&#xe8b6;" class="material-icon border-none bg-none cursor-hand text-white" />
			</form>
		</header>
		<div class="absolute top behind w12">
			{{if .Data.Backdrop_path}}
			<img src="https://image.tmdb.org/t/p/original{{.Data.Backdrop_path}}" class="w12 cover height-30" />
			{{else}}
			<img src="/static/img/serie_backdrop.webp" class="w12 cover height-30" /><!-- Photo by [Image Catalog](https://www.flickr.com/photos/image-catalog/) from [Flickr](https://www.flickr.com/photos/132795455@N08/21741652275/) -->
			{{end}}
			<div class="on-desktop relative bottom-4 sans inline-block w12 padding-l-16 font-3 bg-gradient border-box">
				<span class="text-white">{{.Data.Name}}</span>
				{{if gt .Data.First_air_date.Year 1}}
				<span class="text-unimportant font-thin font-2">({{.Data.First_air_date.Year}})</span>
				{{end}}
			</div>
		</div>
		<main class="margin-top-20 margin-lr-5 flex flex-flow">
			<div class="desktop-w3 phone-w12 margin-bottom-2">
				{{if .Data.Poster_path}}
				<img src="https://image.tmdb.org/t/p/w154{{.Data.Poster_path}}" class="block width-154px">
				{{else}}
				<img src="/static/img/tv_empty.webp" class="block width-154px" />
				{{end}}
				<div class="on-phone">
					<span class="sans font-3">{{.Data.Name}}</span>
					{{if gt .Data.First_air_date.Year 1}}
					<span class="sans text-unimportant font-thin font-2">({{.Data.First_air_date.Year}})</span>
					{{end}}
				</div>
				<p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe8d0;</span> {{$.Strings.Serie.rating}}</p>
				<p class="margin-lr-1 sans margin-tb-_5">{{.Data.Vote_average}} ({{$.Strings.Serie.votes}}: {{.Data.Vote_count}})</p>
				<p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe43a;</span> {{$.Strings.Serie.genre}}</p>
				<p class="margin-lr-1 sans margin-tb-_5">{{range .Data.Genres}} {{.Name}}<br/> {{end}}</span></p>
				<p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe923;</span> {{$.Strings.Serie.status}}</p>
				<p class="margin-lr-1 sans margin-tb-_5">{{.Data.Status}}</p>
			</div>
			<div class="desktop-w6 phone-w12 margin-top-10 padding-lr-2 margin-bottom-2">
				<p class="serif justify hyphenate">{{.Data.Overview}}</p>
				<hr class="material-icon text-grey" />
				{{range .Data.Seasons}}
				<details>
					<summary class="cursor-hand sans">{{$.Strings.Serie.season}} {{.Season_number}}</summary>
					{{range .Episodes}}
					<div class="flex margin-tb-1">
						<div class="margin-lr-1">
							{{if .Still_path}}
							<img src="https://image.tmdb.org/t/p/w185{{.Still_path}}" decoding="async" loading="lazy" class="width-185px"/>
							{{else}}
							<img src="/static/img/still_empty.webp" decoding="async" loading="lazy" class="width-185px"/> <!-- Photo by [Mahdi Leader](https://www.pexels.com/@mahdi-leader-415984) from [Pexels](https://www.pexels.com/photo/walpaper-firewatch-1090640) -->
							{{end}}
						</div>
						<div>
							<p class="sans text-grey margin-tb-0">{{.Episode_code}}</p>
							<p class="sans margin-bottom-_5 margin-top-0">{{.Name}}</p>
							<p class="sans margin-tb-_5 text-grey">{{.Air_date_str}}</p>
							<p class="font-_875">{{.Overview}}</p>
						</div>
					</div>
					{{end}}
				</details>
				{{end}}
			</div>
			<div class="desktop-w3 phone-w12 margin-top-10 flex phone-flex-flow margin-bottom-2">
				<details class="min-width-13_5 margin-lr-1 flex-force-50">
					<summary class="cursor-hand">
						<span class="material-icon font-1_5">&#xe7fb;</span> <span class="sans font-1_5">{{.Strings.Serie.cast}}</span>
					</summary>
					<div>
						{{range .Data.Credits.Cast}}
						<a href="/persons/{{.Id}}" class="decoration-none">
							<div class="flex margin-tb-1">
								<div>
									{{if .Profile_path}}
									<img src="https://image.tmdb.org/t/p/w92{{.Profile_path}}" class="width-92px" decoding="async" loading="lazy" />
									{{else}}
									<img src="/static/img/person_empty.webp" class="width-92px" decoding="async" loading="lazy" />
									{{end}}
								</div>
								<div class="margin-lr-1">
									<p class="sans text">{{.Character}}</p>
									<p class="sans font-_875">{{.Name}}</p>
								</div>
							</div>
						</a>
						{{end}}
					</div>
				</details>
				<details class="min-width-13_5 margin-lr-1 flex-force-50">
					<summary class="cursor-hand">
						<span class="material-icon font-1_5">&#xe7fc;</span> <span class="sans font-1_5">{{.Strings.Serie.crew}}</span>
					</summary>
					<div>
						{{range .Data.Credits.Crew}}
						<a href="/persons/{{.Id}}" class="decoration-none">
							<div class="flex margin-tb-1">
								<div>
									{{if .Profile_path}}
									<img src="https://image.tmdb.org/t/p/w92{{.Profile_path}}" class="width-92px" decoding="async" loading="lazy" />
									{{else}}
									<img src="/static/img/person_empty.webp" class="width-92px" decoding="async" loading="lazy" />
									{{end}}
								</div>
								<div class="margin-lr-1">
									<p class="sans text">{{.Job}}</p>
									<p class="sans font-_875">{{.Name}}</p>
								</div>
							</div>
						</a>
						{{end}}
					</div>
				</details>
			</div>
		</main>
	</body>
</html>
