tvserie.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  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. <form action="/users/{{.State.User.Username}}/watchlist/tvserie:{{.Data.Id}}" method="POST">
  99. <input type="hidden" name="method" value="DELETE" />
  100. <button type="submit" class="border-text sans margin-lr-1 hover-bg-grey padding-tb-_25 cursor-hand text"><span class="padding-lr-_5 material-icon">&#xe16c;</span><span class="sans padding-lr-_5">{{.Strings.Serie.remove_want}}</span></button>
  101. </form>
  102. {{end}}
  103. </div>
  104. <div class="desktop-w6 phone-w12 margin-top-10 padding-lr-2 margin-bottom-2">
  105. <div class="flex flex-row flex-wrap flex-justify-space flex-align-start">
  106. <div class="flex-force-50">
  107. {{if .Data.Last_episode_to_air.Name}}
  108. <span class="sans font-1_5">{{.Strings.Serie.latest_episode}}</span>
  109. <div class="flex margin-tb-1">
  110. <div class="margin-lr-1">
  111. {{if .Data.Last_episode_to_air.Still_path}}
  112. <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}}"/>
  113. {{else}}
  114. <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) -->
  115. {{end}}
  116. </div>
  117. <div>
  118. <p class="sans text-grey margin-tb-0">{{.Data.Last_episode_to_air.Episode_code}}</p>
  119. <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>
  120. <p class="sans margin-tb-_5 text-grey">{{.Data.Last_episode_to_air.Air_date_str}}</p>
  121. <p class="font-_875 clamp {{if .Data.Last_episode_to_air.ContainsSpoilers}}spoiler{{end}}">{{.Data.Last_episode_to_air.Overview}}</p>
  122. </div>
  123. </div>
  124. {{end}}
  125. </div>
  126. <div class="flex-force-50">
  127. {{if and (not .State.User.IsEmpty) .Data.IsOnWantList}}
  128. {{if .Data.Next_episode_to_watch.Episode_code}}
  129. <span class="sans font-1_5">{{.Strings.Serie.next_episode}}</span>
  130. <div class="flex margin-tb-1">
  131. <div class="margin-lr-1">
  132. {{if .Data.Next_episode_to_watch.Still_path}}
  133. <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"/>
  134. {{else}}
  135. <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) -->
  136. {{end}}
  137. </div>
  138. <div>
  139. <div class="flex flex-row flex-justify-space flex-align-start">
  140. <div>
  141. <p class="sans text-grey margin-tb-0">{{.Data.Next_episode_to_watch.Episode_code}}</p>
  142. <p class="sans margin-bottom-_5 margin-top-0">{{.Data.Next_episode_to_watch.Name}}</p>
  143. <p class="sans margin-tb-_5 text-grey">{{.Data.Next_episode_to_watch.Air_date_str}}</p>
  144. </div>
  145. <div class="flex flex-row">
  146. {{if and (not $.State.User.IsEmpty) $.Data.IsOnWantList}}
  147. <form action="/users/{{$.State.User.Username}}/experiences/" method="POST">
  148. <input type="hidden" name="itemId" value="{{$.Data.Id}}/{{.Data.Next_episode_to_watch.Episode_code}}" />
  149. <input type="hidden" name="itemType" value="tvserie" />
  150. <input type="hidden" name="experiencedDate" value="0001-01-01"/>
  151. <input type="hidden" name="experiencedTime" value="00:00"/>
  152. <input type="checkbox" class="display-none" name="isOtherTime" value="true" checked />
  153. <button type="submit" class="border-text hover-bg-grey cursor-hand text font-1_5"><span class="material-icon">&#xe044;</span></button>
  154. </form>
  155. <form action="/users/{{$.State.User.Username}}/experiences/" method="POST">
  156. <input type="hidden" name="itemId" value="{{$.Data.Id}}/{{.Data.Next_episode_to_watch.Episode_code}}" />
  157. <input type="hidden" name="itemType" value="tvserie" />
  158. <button type="submit" class="border-text hover-bg-dark-accent cursor-hand text-black font-1_5"><span class="material-icon">&#xe037;</span></button>
  159. </form>
  160. {{end}}
  161. </div>
  162. </div>
  163. <p class="font-_875 clamp">{{.Data.Next_episode_to_watch.Overview}}</p>
  164. </div>
  165. </div>
  166. {{end}}
  167. {{end}}
  168. {{if and (not .State.User.IsEmpty) (not .Data.IsOnWantList)}}
  169. <form action="/users/{{.State.User.Username}}/tvqueue/" method="POST" class="margin-tb-_5 margin-lr-1">
  170. <input type="hidden" name="itemId" value="{{.Data.Id}}" />
  171. <input type="hidden" name="itemType" value="tvserie" />
  172. <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>
  173. </form>
  174. {{end}}
  175. </div>
  176. </div>
  177. <p class="serif justify hyphenate">{{.Data.Overview}}</p>
  178. <hr class="material-icon text-grey hr-tv" />
  179. {{range .Data.Seasons}}
  180. <details>
  181. <summary class="cursor-hand sans">{{$.Strings.Serie.season}} {{.Season_number}}</summary>
  182. {{if not .Episodes}}
  183. <p class="sans indent-2 margin-top-1">{{$.Strings.Serie.no_episodes}}</p>
  184. {{end}}
  185. {{if and (not $.State.User.IsEmpty) $.Data.IsOnWantList}}
  186. {{if eq .Season_number 0}}
  187. <form action="/users/{{$.State.User.Username}}/experiences/" method="POST" class="flex flex-centre">
  188. <input type="hidden" name="itemId" value="{{$.Data.Id}}/S00A{{len .Episodes}}" />
  189. <input type="hidden" name="itemType" value="tvserie" />
  190. <input type="hidden" name="experiencedDate" value="0001-01-01"/>
  191. <input type="hidden" name="experiencedTime" value="00:00"/>
  192. <input type="checkbox" class="display-none" name="isOtherTime" value="true" checked />
  193. <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>
  194. </form>
  195. {{else}}
  196. <form action="/users/{{$.State.User.Username}}/experiences/" method="POST" class="flex flex-centre">
  197. <input type="hidden" name="itemId" value="{{$.Data.Id}}/S{{.Season_number_string}}A{{len .Episodes}}" />
  198. <input type="hidden" name="itemType" value="tvserie" />
  199. <input type="hidden" name="experiencedDate" value="0001-01-01"/>
  200. <input type="hidden" name="experiencedTime" value="00:00"/>
  201. <input type="checkbox" class="display-none" name="isOtherTime" value="true"/>
  202. <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>
  203. </form>
  204. {{end}}
  205. {{end}}
  206. {{range .Episodes}}
  207. <div class="flex margin-tb-1">
  208. <div class="margin-lr-1">
  209. {{if .Still_path}}
  210. <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}}"/>
  211. {{else}}
  212. <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) -->
  213. {{end}}
  214. </div>
  215. <div class="w12">
  216. <div class="flex flex-row flex-justify-space flex-align-start">
  217. <div>
  218. <p class="sans text-grey margin-tb-0">{{.Episode_code}}</p>
  219. <p class="sans margin-bottom-_5 margin-top-0 {{if .ContainsSpoilers}}spoiler{{end}}">{{.Name}}</p>
  220. <p class="sans margin-tb-_5 text-grey">{{.Air_date_str}}</p>
  221. {{if .IsWatched}}
  222. <p class="sans margin-tb-_5 text-grey">{{$.Strings.Serie.watched}} {{.GetLastExperience $.Strings $.State.User.Timezone}}</p>
  223. {{end}}
  224. </div>
  225. <div class="flex flex-row">
  226. {{if and (not $.State.User.IsEmpty) $.Data.IsOnWantList}}
  227. {{if eq (len .Experiences) 0}}
  228. <form action="/users/{{$.State.User.Username}}/experiences/" method="POST">
  229. <input type="hidden" name="itemId" value="{{$.Data.Id}}/{{.Episode_code}}" />
  230. <input type="hidden" name="itemType" value="tvserie" />
  231. <input type="hidden" name="experiencedDate" value="0001-01-01"/>
  232. <input type="hidden" name="experiencedTime" value="00:00"/>
  233. <input type="checkbox" class="display-none" name="isOtherTime" value="true" checked />
  234. <button type="submit" class="border-text hover-bg-grey cursor-hand text font-2"><span class="material-icon font-2">&#xe044;</span></button>
  235. </form>
  236. {{end}}
  237. <form action="/users/{{$.State.User.Username}}/experiences/" method="POST">
  238. <input type="hidden" name="itemId" value="{{$.Data.Id}}/{{.Episode_code}}" />
  239. <input type="hidden" name="itemType" value="tvserie" />
  240. <button type="submit" class="border-text hover-bg-dark-accent cursor-hand text-black font-2">
  241. {{if .IsWatched}}
  242. <span class="material-icon font-2">&#xe042;</span>
  243. {{else}}
  244. <span class="material-icon font-2">&#xe037;</span>
  245. {{end}}
  246. </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">
  247. <span class="material-icon">&#xe5cf;</span>
  248. </label>
  249. <input type="checkbox" id="experienced-datetime-check-{{.Episode_code}}" class="display-none experienced-datetime-check" name="isOtherTime" value="true"/>
  250. <div class="experienced-box-flex absolute moveX-m50" id="experienced-box-{{.Episode_code}}">
  251. <input type="date" name="experiencedDate" class="margin-lr-_5 margin-tb-_5 text bg border-text" placeholder="YYYY-mm-dd"/>
  252. <input type="time" name="experiencedTime" class="margin-lr-_5 margin-tb-_5 text bg border-text" placeholder="HH:MM" />
  253. </div>
  254. </form>
  255. {{end}}
  256. </div>
  257. </div>
  258. <p class="font-_875 {{if .ContainsSpoilers}}spoiler{{end}}">{{.Overview}}</p>
  259. </div>
  260. </div>
  261. {{end}}
  262. </details>
  263. {{end}}
  264. </div>
  265. <div class="desktop-w3 phone-w12 margin-top-10 flex phone-flex-flow margin-bottom-2">
  266. <details class="min-width-13_5 margin-lr-1 flex-force-40">
  267. <summary class="cursor-hand">
  268. <span class="material-icon font-1_5">&#xe7fb;</span> <span class="sans font-1_5">{{.Strings.Serie.cast}}</span>
  269. </summary>
  270. <div>
  271. {{if not .Data.Credits.Cast}}
  272. <p class="sans indent-2 margin-top-1">{{.Strings.Serie.empty_payroll}}</p>
  273. {{end}}
  274. {{range .Data.Credits.Cast}}
  275. <a href="/persons/{{.Id}}" class="decoration-none no-outline inline-block margin-tb-1">
  276. <div class="flex">
  277. <div>
  278. {{if .Profile_path}}
  279. <img src="https://image.tmdb.org/t/p/w92{{.Profile_path}}" class="min-height-139px width-92px" decoding="async" loading="lazy" />
  280. {{else}}
  281. <img src="/static/img/person_empty.webp" class="min-height-139px width-92px" decoding="async" loading="lazy" />
  282. {{end}}
  283. </div>
  284. <div class="margin-lr-1">
  285. <p class="sans text">{{.Character}}</p>
  286. <p class="sans font-_875">{{.Name}}</p>
  287. </div>
  288. </div>
  289. </a>
  290. {{end}}
  291. </div>
  292. </details>
  293. <details class="min-width-13_5 margin-lr-1 flex-force-40">
  294. <summary class="cursor-hand">
  295. <span class="material-icon font-1_5">&#xe7fc;</span> <span class="sans font-1_5">{{.Strings.Serie.crew}}</span>
  296. </summary>
  297. <div>
  298. {{if not .Data.Credits.Crew}}
  299. <p class="sans indent-2 margin-top-1">{{.Strings.Serie.empty_payroll}}</p>
  300. {{end}}
  301. {{range .Data.Credits.Crew}}
  302. <a href="/persons/{{.Id}}" class="decoration-none no-outline inline-block margin-tb-1">
  303. <div class="flex">
  304. <div>
  305. {{if .Profile_path}}
  306. <img src="https://image.tmdb.org/t/p/w92{{.Profile_path}}" class="min-height-139px width-92px" decoding="async" loading="lazy" />
  307. {{else}}
  308. <img src="/static/img/person_empty.webp" class="min-height-139px width-92px" decoding="async" loading="lazy" />
  309. {{end}}
  310. </div>
  311. <div class="margin-lr-1">
  312. <p class="sans text">{{.Job}}</p>
  313. <p class="sans font-_875">{{.Name}}</p>
  314. </div>
  315. </div>
  316. </a>
  317. {{end}}
  318. </div>
  319. </details>
  320. </div>
  321. </main>
  322. </body>
  323. </html>