<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>{{.Data.Title}}{{if gt .Data.Release_date.Year 1}} ({{.Data.Release_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/film_backdrop.webp" class="w12 cover height-30" /> <!-- Photo by [mujipanda](https://pixabay.com/users/mujipanda-2035588/) from [Pixabay](https://pixabay.com/photos/menu-cinema-singapore-old-cinema-1192534/) -->
			{{end}}
			<div class="on-desktop relative bottom-4 sans inline-block w12 padding-l-16 font-3 bg-gradient">
				<span class="text-white">{{.Data.Title}}</span>
				{{if gt .Data.Release_date.Year 1}}
				<span class="text-unimportant font-thin font-2">({{.Data.Release_date.Year}})</span>
				{{end}}
			</div>
		</div>
		<main class="margin-top-20 margin-lr-5 flex flex-flow margin-bottom-2">
			<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/poster_empty.webp" class="block width-154px" />
				{{end}}
				<div class="on-phone">
					<span class="sans font-3">{{.Data.Title}}</span>
					{{if gt .Data.Release_date.Year 1}}
					<span class="sans text-unimportant font-thin font-2">({{.Data.Release_date.Year}})</span>
					{{end}}
				</div>
				<p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe8d0;</span> {{$.Strings.Film.rating}}</p>
				<p class="margin-lr-1 sans margin-tb-_5">{{.Data.Vote_average}} ({{$.Strings.Film.votes}}: {{.Data.Vote_count}})</p>
				<p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe43a;</span> {{$.Strings.Film.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">&#xe422;</span> {{$.Strings.Film.runtime}}</p>
				<p class="margin-lr-1 sans margin-tb-_5">{{.Data.Runtime}} {{.Strings.Film.minutes}}</p>
				<p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe923;</span> {{$.Strings.Film.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="italic serif">{{.Data.Tagline}}</p>
				<p class="serif justify hyphenate">{{.Data.Overview}}</p>
				<hr class="material-icon text-grey" />
				{{if .Data.Collection.Parts}}
				<p class="sans font-2">{{.Strings.Film.in_this_collection}}:</p>
				<div class="flex flex-flow">
					{{range .Data.Collection.Parts}}
					<a href="/films/{{.Id}}" class="decoration-none">
						<div class="flex margin-tb-1 margin-lr-1 min-width-13_5">
							<div>
								{{if .Poster_path}}
								<img src="https://image.tmdb.org/t/p/w92{{.Poster_path}}" class="width-92px" />
								{{else}}
								<img src="/static/img/poster_empty.webp" class="width-92px" />
								{{end}}
							</div>
							<div class="margin-lr-1">
								<p class="sans">{{.Title}}</p>
								{{if gt .Release_date.Year 1}}
								<span class="sans font-_875 text-grey">{{.Release_date.Year}}</span>
								{{end}}
							</div>
						</div>
					</a>
					{{end}}
				</div>
				{{end}}
			</div>
			<div class="desktop-w3 phone-w12 margin-top-10 flex phone-flex-flow">
				<details class="margin-lr-1 flex-force-50 min-width-13_5">
					<summary class="cursor-hand">
						<span class="material-icon font-1_5">&#xe7fb;</span> <span class="sans font-1_5">{{.Strings.Film.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="margin-lr-1 flex-force-50 min-width-13_5">
					<summary class="cursor-hand">
						<span class="material-icon font-1_5">&#xe7fc;</span> <span class="sans font-1_5">{{.Strings.Film.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>
