tvserie.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>{{.Data.Name}} {{if not .Data.First_air_date.IsZero}}({{.Data.GetYears}}){{end}} — a·muse</title>
  7. <link rel="stylesheet" href="/static/style/style.css" />
  8. <link rel="icon" type="image/svg+xml" href="/static/img/logo.svg">
  9. <link rel="apple-touch-icon" type="image/svg+xml" href="/static/img/logo.svg">
  10. </head>
  11. <body>
  12. <header class="w12 padding-bottom-_25 flex flex-row flex-justify-space flex-align-centre bg-primary">
  13. <a href="/" class="decoration-none">
  14. <h1 class="inline valign-mid text-white sans margin-lr-1">a·muse</h1>
  15. </a>
  16. <form action="/items/" method="get" class="flex inline margin-lr-1 border-bottom-white">
  17. <input type="search" name="q" class="phone-max-width-8 border-none bg-none sans text-white" placeholder="{{.Strings.Global.search}}" />
  18. </form>
  19. <div class="margin-lr-1 text-white">
  20. {{ if .State.User.IsEmpty }}
  21. <a href="/login" class="decoration-none sans">{{.Strings.Global.log_in}}</a>
  22. <a href="/signup" class="decoration-none sans">{{.Strings.Global.sign_up}}</a>
  23. {{ else }}
  24. <nav class="text">
  25. <label for="hamburger" class="cursor-hand">
  26. <img src="/users/{{.State.User.Username}}/avatar?size=small" class="border-radius-25 width-1_5"/>
  27. </label>
  28. <input type="checkbox" id="hamburger" class="display-none" />
  29. <ul class="absolute right top-1 padding-lr-1 padding-tb-_5 bg align-right list-style-none sans">
  30. <!--<li><a href="/users/{{.State.User.Username}}" class="decoration-none text-accent">{{.Strings.Global.account}}</a><span class="material-icon padding-lr-_5">&#xe851;</span></li>-->
  31. <li><a href="/users/{{.State.User.Username}}/watchlist" class="decoration-none text-accent">{{.Strings.Global.watchlist}}</a><span class="material-icon padding-lr-_5">&#xe04a;</span></li>
  32. <li><a href="/users/{{.State.User.Username}}/tvqueue" class="decoration-none text-accent">{{.Strings.Global.tv_queue}}</a><span class="material-icon padding-lr-_5">&#xe1b2;</span></li>
  33. <li><a href="/users/{{.State.User.Username}}/readlist" class="decoration-none text-accent">{{.Strings.Global.readlist}}</a><span class="material-icon padding-lr-_5">&#xe431;</span></li>
  34. <li><a href="/users/{{.State.User.Username}}/experiences" class="decoration-none text-accent">{{.Strings.Global.experiences}}</a><span class="material-icon padding-lr-_5">&#xe042;</span></li>
  35. <li class="bg-error">
  36. <form action="/users/{{.State.User.Username}}/sessions/{{.State.User.Session}}" method="POST" class="inline">
  37. <input type="hidden" value="DELETE" name="method" />
  38. <input type="submit" value="{{.Strings.Global.log_out}}" class="border-none bg-none font-normal text-accent padding-lr-0 cursor-hand font-1" />
  39. </form><span class="material-icon padding-lr-_5 text-white">&#xe7ff;</span>
  40. </li>
  41. </ul>
  42. </nav>
  43. {{ end }}
  44. </div>
  45. </header>
  46. <div class="absolute top behind w12">
  47. {{if .Data.Backdrop_path}}
  48. <img src="https://image.tmdb.org/t/p/original{{.Data.Backdrop_path}}" class="w12 cover height-30" />
  49. {{else}}
  50. <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/) -->
  51. {{end}}
  52. <div class="on-desktop relative bottom-4 sans inline-block w12 padding-l-16 font-3 bg-gradient border-box">
  53. <span class="text-white">{{.Data.Name}}</span>
  54. {{if not .Data.First_air_date.IsZero}}
  55. <span class="text-unimportant font-thin font-2">({{.Data.GetYears}})</span>
  56. {{end}}
  57. </div>
  58. {{if and .State.User .Data.IsOnWantList}}
  59. <div style="width: {{.Data.Progress}}%;" class="relative bottom-4 phone-bottom-_4 height-_25 bg-accent">
  60. {{end}}
  61. </div>
  62. </div>
  63. <main class="margin-top-20 margin-lr-5 flex flex-row flex-wrap flex-justify-space flex-align-start">
  64. <div class="desktop-w3 phone-w12 margin-bottom-2">
  65. {{if .Data.Poster_path}}
  66. <img src="https://image.tmdb.org/t/p/w154{{.Data.Poster_path}}" class="block min-height-231px width-154px">
  67. {{else}}
  68. <img src="/static/img/tv_empty.webp" class="block min-height-231px width-154px" />
  69. {{end}}
  70. <div class="on-phone">
  71. <span class="sans font-3">{{.Data.Name}}</span>
  72. {{if not .Data.First_air_date.IsZero}}
  73. <span class="sans text-unimportant font-thin font-2">({{.Data.GetYears}})</span>
  74. {{end}}
  75. </div>
  76. <p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe8d0;</span> {{$.Strings.Serie.rating}}</p>
  77. {{if eq .Data.Vote_count 0}}
  78. <p class="margin-lr-1 sans margin-tb-_5">{{$.Strings.Serie.no_rating}}</p>
  79. {{else}}
  80. <p class="margin-lr-1 sans margin-tb-_5">{{.Data.Vote_average}}/10 ({{$.Strings.Serie.votes}}: {{.Data.Vote_count}})</p>
  81. {{end}}
  82. {{if .Data.Genres}}
  83. <p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe43a;</span> {{$.Strings.Serie.genre}}</p>
  84. <p class="margin-lr-1 sans margin-tb-_5">{{range .Data.Genres}} {{.Name}}<br/> {{end}}</span></p>
  85. {{end}}
  86. <p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe923;</span> {{$.Strings.Serie.status}}</p>
  87. <p class="margin-lr-1 sans margin-tb-_5">{{.Data.Status}}</p>
  88. {{ if .Data.BasedOn.Title }}
  89. <p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe865;</span> {{.Strings.Serie.based_on}}</p>
  90. <p class="margin-lr-1 sans margin-tb-_5"><a href="{{.Data.BasedOn.Uri}}">{{.Data.BasedOn.Title}}</a></p>
  91. {{ end }}
  92. <p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe157;</span> {{$.Strings.Serie.source}}</p>
  93. <p class="margin-lr-1 sans margin-tb-_5"><a href="{{.Data.Source}}">TheMovieDB</a></p>
  94. {{if and .State.User .Data.IsOnWantList}}
  95. <p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe04a;</span> {{$.Strings.Serie.watched}}</p>
  96. <p class="margin-lr-1 sans margin-tb-_5">{{.Strings.Serie.episodes}}: {{.Data.WatchedEpisodes}}/{{.Data.AllEpisodes}}</p>
  97. <p class="margin-lr-1 sans margin-tb-_5">({{.Strings.Serie.skipped}}: {{.Data.SkippedEpisodes}})</p>
  98. {{end}}
  99. </div>
  100. <div class="desktop-w6 phone-w12 margin-top-10 padding-lr-2 margin-bottom-2">
  101. <div class="flex flex-row flex-wrap flex-justify-space flex-align-start">
  102. <div class="flex-force-50">
  103. {{if .Data.Last_episode_to_air.Name}}
  104. <span class="sans font-1_5">{{.Strings.Serie.latest_episode}}</span>
  105. <div class="flex margin-tb-1">
  106. <div class="margin-lr-1">
  107. {{if .Data.Last_episode_to_air.Still_path}}
  108. <img src="https://image.tmdb.org/t/p/w185{{.Data.Last_episode_to_air.Still_path}}" decoding="async" loading="lazy" class="min-height-104px width-185px {{if .Data.Last_episode_to_air.ContainsSpoilers}}spoiler{{end}}"/>
  109. {{else}}
  110. <img src="/static/img/still_empty.webp" decoding="async" loading="lazy" class="min-height-104px width-185px"/> <!-- Photo by [Mahdi Leader](https://www.pexels.com/@mahdi-leader-415984) from [Pexels](https://www.pexels.com/photo/walpaper-firewatch-1090640) -->
  111. {{end}}
  112. </div>
  113. <div>
  114. <p class="sans text-grey margin-tb-0">{{.Data.Last_episode_to_air.Episode_code}}</p>
  115. <p class="sans margin-bottom-_5 margin-top-0 {{if .Data.Last_episode_to_air.ContainsSpoilers}}spoiler{{end}}">{{.Data.Last_episode_to_air.Name}}</p>
  116. <p class="sans margin-tb-_5 text-grey">{{.Data.Last_episode_to_air.Air_date_str}}</p>
  117. <p class="font-_875 clamp {{if .Data.Last_episode_to_air.ContainsSpoilers}}spoiler{{end}}">{{.Data.Last_episode_to_air.Overview}}</p>
  118. </div>
  119. </div>
  120. {{end}}
  121. </div>
  122. <div class="flex-force-50">
  123. {{if and (not .State.User.IsEmpty) .Data.IsOnWantList}}
  124. {{if .Data.Next_episode_to_watch.Episode_code}}
  125. <span class="sans font-1_5">{{.Strings.Serie.next_episode}}</span>
  126. <div class="flex margin-tb-1">
  127. <div class="margin-lr-1">
  128. {{if .Data.Next_episode_to_watch.Still_path}}
  129. <img src="https://image.tmdb.org/t/p/w185{{.Data.Next_episode_to_watch.Still_path}}" decoding="async" loading="lazy" class="min-height-104px width-185px"/>
  130. {{else}}
  131. <img src="/static/img/still_empty.webp" decoding="async" loading="lazy" class="min-height-104px width-185px"/> <!-- Photo by [Mahdi Leader](https://www.pexels.com/@mahdi-leader-415984) from [Pexels](https://www.pexels.com/photo/walpaper-firewatch-1090640) -->
  132. {{end}}
  133. </div>
  134. <div>
  135. <div class="flex flex-row flex-justify-space flex-align-start">
  136. <div>
  137. <p class="sans text-grey margin-tb-0">{{.Data.Next_episode_to_watch.Episode_code}}</p>
  138. <p class="sans margin-bottom-_5 margin-top-0">{{.Data.Next_episode_to_watch.Name}}</p>
  139. <p class="sans margin-tb-_5 text-grey">{{.Data.Next_episode_to_watch.Air_date_str}}</p>
  140. </div>
  141. <div class="flex flex-row">
  142. {{if and (not $.State.User.IsEmpty) $.Data.IsOnWantList}}
  143. <form action="/users/{{$.State.User.Username}}/experiences/" method="POST">
  144. <input type="hidden" name="itemId" value="{{$.Data.Id}}/{{.Data.Next_episode_to_watch.Episode_code}}" />
  145. <input type="hidden" name="itemType" value="tvserie" />
  146. <input type="hidden" name="experiencedDate" value="0001-01-01"/>
  147. <input type="hidden" name="experiencedTime" value="00:00"/>
  148. <input type="checkbox" class="display-none" name="isOtherTime" value="true" checked />
  149. <button type="submit" class="border-text hover-bg-grey cursor-hand text font-1_5"><span class="material-icon">&#xe044;</span></button>
  150. </form>
  151. <form action="/users/{{$.State.User.Username}}/experiences/" method="POST">
  152. <input type="hidden" name="itemId" value="{{$.Data.Id}}/{{.Data.Next_episode_to_watch.Episode_code}}" />
  153. <input type="hidden" name="itemType" value="tvserie" />
  154. <button type="submit" class="border-text hover-bg-dark-accent cursor-hand text-black font-1_5"><span class="material-icon">&#xe037;</span></button>
  155. </form>
  156. {{end}}
  157. </div>
  158. </div>
  159. <p class="font-_875 clamp">{{.Data.Next_episode_to_watch.Overview}}</p>
  160. </div>
  161. </div>
  162. {{end}}
  163. {{end}}
  164. {{if and (not .State.User.IsEmpty) (not .Data.IsOnWantList)}}
  165. <form action="/users/{{.State.User.Username}}/tvqueue/" method="POST" class="margin-tb-_5 margin-lr-1">
  166. <input type="hidden" name="itemId" value="{{.Data.Id}}" />
  167. <input type="hidden" name="itemType" value="tvserie" />
  168. <button type="submit" class="border-text hover-bg-grey padding-tb-_25 cursor-hand text font-2"><span class="padding-lr-_5 material-icon font-2">&#xe03b;</span><span class="sans padding-lr-_5">{{.Strings.Serie.want_watch}}</span></button>
  169. </form>
  170. {{end}}
  171. </div>
  172. </div>
  173. <p class="serif justify hyphenate">{{.Data.Overview}}</p>
  174. <hr class="material-icon text-grey hr-tv" />
  175. {{range .Data.Seasons}}
  176. <details>
  177. <summary class="cursor-hand sans">{{$.Strings.Serie.season}} {{.Season_number}}</summary>
  178. {{if not .Episodes}}
  179. <p class="sans indent-2 margin-top-1">{{$.Strings.Serie.no_episodes}}</p>
  180. {{end}}
  181. {{if and (not $.State.User.IsEmpty) $.Data.IsOnWantList}}
  182. {{if eq .Season_number 0}}
  183. <form action="/users/{{$.State.User.Username}}/experiences/" method="POST" class="flex flex-centre">
  184. <input type="hidden" name="itemId" value="{{$.Data.Id}}/S00A{{len .Episodes}}" />
  185. <input type="hidden" name="itemType" value="tvserie" />
  186. <input type="hidden" name="experiencedDate" value="0001-01-01"/>
  187. <input type="hidden" name="experiencedTime" value="00:00"/>
  188. <input type="checkbox" class="display-none" name="isOtherTime" value="true" checked />
  189. <button type="submit" class="border-text hover-bg-grey padding-tb-_25 cursor-hand text font-1_5"><span class="padding-lr-_5 material-icon font-1_5">&#xe044;</span><span class="sans padding-lr-_5">{{$.Strings.Serie.skip_specials}}</span></button>
  190. </form>
  191. {{else}}
  192. <form action="/users/{{$.State.User.Username}}/experiences/" method="POST" class="flex flex-centre">
  193. <input type="hidden" name="itemId" value="{{$.Data.Id}}/S{{.Season_number_string}}A{{len .Episodes}}" />
  194. <input type="hidden" name="itemType" value="tvserie" />
  195. <input type="hidden" name="experiencedDate" value="0001-01-01"/>
  196. <input type="hidden" name="experiencedTime" value="00:00"/>
  197. <input type="checkbox" class="display-none" name="isOtherTime" value="true"/>
  198. <button type="submit" class="border-text hover-bg-dark-accent cursor-hand text-black font-1_5"><span class="padding-lr-_5 material-icon font-1_5">&#xe01f;</span><span class="sans padding-lr-_5">{{$.Strings.Serie.watched_whole_season}}</span></button>
  199. </form>
  200. {{end}}
  201. {{end}}
  202. {{range .Episodes}}
  203. <div class="flex margin-tb-1">
  204. <div class="margin-lr-1">
  205. {{if .Still_path}}
  206. <img src="https://image.tmdb.org/t/p/w185{{.Still_path}}" decoding="async" loading="lazy" class="min-height-104px width-185px {{if .ContainsSpoilers}}spoiler{{end}}"/>
  207. {{else}}
  208. <img src="/static/img/still_empty.webp" decoding="async" loading="lazy" class="min-height-104px width-185px"/> <!-- Photo by [Mahdi Leader](https://www.pexels.com/@mahdi-leader-415984) from [Pexels](https://www.pexels.com/photo/walpaper-firewatch-1090640) -->
  209. {{end}}
  210. </div>
  211. <div class="w12">
  212. <div class="flex flex-row flex-justify-space flex-align-start">
  213. <div>
  214. <p class="sans text-grey margin-tb-0">{{.Episode_code}}</p>
  215. <p class="sans margin-bottom-_5 margin-top-0 {{if .ContainsSpoilers}}spoiler{{end}}">{{.Name}}</p>
  216. <p class="sans margin-tb-_5 text-grey">{{.Air_date_str}}</p>
  217. {{if .IsWatched}}
  218. <p class="sans margin-tb-_5 text-grey">{{$.Strings.Serie.watched}} {{.GetLastExperience $.Strings $.State.User.Timezone}}</p>
  219. {{end}}
  220. </div>
  221. <div class="flex flex-row">
  222. {{if and (not $.State.User.IsEmpty) $.Data.IsOnWantList}}
  223. {{if eq (len .Experiences) 0}}
  224. <form action="/users/{{$.State.User.Username}}/experiences/" method="POST">
  225. <input type="hidden" name="itemId" value="{{$.Data.Id}}/{{.Episode_code}}" />
  226. <input type="hidden" name="itemType" value="tvserie" />
  227. <input type="hidden" name="experiencedDate" value="0001-01-01"/>
  228. <input type="hidden" name="experiencedTime" value="00:00"/>
  229. <input type="checkbox" class="display-none" name="isOtherTime" value="true" checked />
  230. <button type="submit" class="border-text hover-bg-grey cursor-hand text font-2"><span class="material-icon font-2">&#xe044;</span></button>
  231. </form>
  232. {{end}}
  233. <form action="/users/{{$.State.User.Username}}/experiences/" method="POST">
  234. <input type="hidden" name="itemId" value="{{$.Data.Id}}/{{.Episode_code}}" />
  235. <input type="hidden" name="itemType" value="tvserie" />
  236. <button type="submit" class="border-text hover-bg-dark-accent cursor-hand text-black font-2">
  237. {{if .IsWatched}}
  238. <span class="material-icon font-2">&#xe042;</span>
  239. {{else}}
  240. <span class="material-icon font-2">&#xe037;</span>
  241. {{end}}
  242. </button><label for="experienced-datetime-check-{{.Episode_code}}" class="cursor-hand bg-accent inline-block font-2 relative top-m_05 height-2_8 text-black">
  243. <span class="material-icon">&#xe5cf;</span>
  244. </label>
  245. <input type="checkbox" id="experienced-datetime-check-{{.Episode_code}}" class="display-none experienced-datetime-check" name="isOtherTime" value="true"/>
  246. <div class="experienced-box-flex absolute moveX-m50" id="experienced-box-{{.Episode_code}}">
  247. <input type="date" name="experiencedDate" class="margin-lr-_5 margin-tb-_5 text bg border-text" placeholder="YYYY-mm-dd"/>
  248. <input type="time" name="experiencedTime" class="margin-lr-_5 margin-tb-_5 text bg border-text" placeholder="HH:MM" />
  249. </div>
  250. </form>
  251. {{end}}
  252. </div>
  253. </div>
  254. <p class="font-_875 {{if .ContainsSpoilers}}spoiler{{end}}">{{.Overview}}</p>
  255. </div>
  256. </div>
  257. {{end}}
  258. </details>
  259. {{end}}
  260. </div>
  261. <div class="desktop-w3 phone-w12 margin-top-10 flex phone-flex-flow margin-bottom-2">
  262. <details class="min-width-13_5 margin-lr-1 flex-force-40">
  263. <summary class="cursor-hand">
  264. <span class="material-icon font-1_5">&#xe7fb;</span> <span class="sans font-1_5">{{.Strings.Serie.cast}}</span>
  265. </summary>
  266. <div>
  267. {{if not .Data.Credits.Cast}}
  268. <p class="sans indent-2 margin-top-1">{{.Strings.Serie.empty_payroll}}</p>
  269. {{end}}
  270. {{range .Data.Credits.Cast}}
  271. <a href="/persons/{{.Id}}" class="decoration-none no-outline inline-block margin-tb-1">
  272. <div class="flex">
  273. <div>
  274. {{if .Profile_path}}
  275. <img src="https://image.tmdb.org/t/p/w92{{.Profile_path}}" class="min-height-139px width-92px" decoding="async" loading="lazy" />
  276. {{else}}
  277. <img src="/static/img/person_empty.webp" class="min-height-139px width-92px" decoding="async" loading="lazy" />
  278. {{end}}
  279. </div>
  280. <div class="margin-lr-1">
  281. <p class="sans text">{{.Character}}</p>
  282. <p class="sans font-_875">{{.Name}}</p>
  283. </div>
  284. </div>
  285. </a>
  286. {{end}}
  287. </div>
  288. </details>
  289. <details class="min-width-13_5 margin-lr-1 flex-force-40">
  290. <summary class="cursor-hand">
  291. <span class="material-icon font-1_5">&#xe7fc;</span> <span class="sans font-1_5">{{.Strings.Serie.crew}}</span>
  292. </summary>
  293. <div>
  294. {{if not .Data.Credits.Crew}}
  295. <p class="sans indent-2 margin-top-1">{{.Strings.Serie.empty_payroll}}</p>
  296. {{end}}
  297. {{range .Data.Credits.Crew}}
  298. <a href="/persons/{{.Id}}" class="decoration-none no-outline inline-block margin-tb-1">
  299. <div class="flex">
  300. <div>
  301. {{if .Profile_path}}
  302. <img src="https://image.tmdb.org/t/p/w92{{.Profile_path}}" class="min-height-139px width-92px" decoding="async" loading="lazy" />
  303. {{else}}
  304. <img src="/static/img/person_empty.webp" class="min-height-139px width-92px" decoding="async" loading="lazy" />
  305. {{end}}
  306. </div>
  307. <div class="margin-lr-1">
  308. <p class="sans text">{{.Job}}</p>
  309. <p class="sans font-_875">{{.Name}}</p>
  310. </div>
  311. </div>
  312. </a>
  313. {{end}}
  314. </div>
  315. </details>
  316. </div>
  317. </main>
  318. </body>
  319. </html>