film.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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.Title}}{{if not .Data.Release_date.IsZero}} ({{.Data.Release_date.Year}}){{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/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/) -->
  51. {{end}}
  52. <div class="on-desktop relative bottom-4 sans inline-block w12 padding-l-16 font-3 bg-gradient">
  53. <span class="text-white">{{.Data.Title}}</span>
  54. {{if not .Data.Release_date.IsZero}}
  55. <span class="text-unimportant font-thin font-2">({{.Data.Release_date.Year}})</span>
  56. {{end}}
  57. </div>
  58. </div>
  59. <main class="margin-top-20 margin-lr-5 flex flex-row flex-wrap flex-justify-space flex-align-start margin-bottom-2">
  60. <div class="desktop-w3 phone-w12 margin-bottom-2">
  61. {{if .Data.Poster_path}}
  62. <img src="https://image.tmdb.org/t/p/w154{{.Data.Poster_path}}" class="block min-height-231px width-154px">
  63. {{else}}
  64. <img src="/static/img/poster_empty.webp" class="block min-height-231px width-154px" />
  65. {{end}}
  66. <div class="on-phone">
  67. <span class="sans font-3">{{.Data.Title}}</span>
  68. {{if not .Data.Release_date.IsZero}}
  69. <span class="sans text-unimportant font-thin font-2">({{.Data.Release_date.Year}})</span>
  70. {{end}}
  71. </div>
  72. <p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe8d0;</span> {{$.Strings.Film.rating}}</p>
  73. {{if eq .Data.Vote_count 0}}
  74. <p class="margin-lr-1 sans margin-tb-_5">{{$.Strings.Film.TBD}}</p>
  75. {{else}}
  76. <p class="margin-lr-1 sans margin-tb-_5">{{.Data.Vote_average}}/10 ({{$.Strings.Film.votes}}: {{.Data.Vote_count}})</p>
  77. {{end}}
  78. {{if .Data.Genres}}
  79. <p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe43a;</span> {{$.Strings.Film.genre}}</p>
  80. <p class="margin-lr-1 sans margin-tb-_5">{{range .Data.Genres}} {{.Name}}<br/> {{end}}</span></p>
  81. {{end}}
  82. <p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe422;</span> {{$.Strings.Film.runtime}}</p>
  83. {{if eq .Data.Runtime 0}}
  84. <p class="margin-lr-1 sans margin-tb-_5">{{.Strings.Film.TBD}}</p>
  85. {{else}}
  86. <p class="margin-lr-1 sans margin-tb-_5">{{.Data.Runtime}} {{.Strings.Film.minutes}}</p>
  87. {{end}}
  88. <p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe923;</span> {{$.Strings.Film.status}}</p>
  89. <p class="margin-lr-1 sans margin-tb-_5">{{.Data.Status}}</p>
  90. {{ if .Data.BasedOn.Title }}
  91. <p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe865;</span> {{.Strings.Film.based_on}}</p>
  92. <p class="margin-lr-1 sans margin-tb-_5"><a href="{{.Data.BasedOn.Uri}}">{{.Data.BasedOn.Title}}</a></p>
  93. {{ end }}
  94. <p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe157;</span> {{.Strings.Film.source}}</p>
  95. <p class="margin-lr-1 sans margin-tb-_5"><a href="{{.Data.Source}}">TheMovieDB</a></p>
  96. {{if and (.Data.IsOnWantList) (not .State.User.IsEmpty)}}
  97. <p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe05f;</span> {{.Strings.Film.Watchlist}}</p>
  98. <p class="margin-lr-1 sans margin-tb-_5">{{.Strings.Film.onWatchlist}}</p>
  99. {{end}}
  100. {{if .Data.Experiences}}
  101. <p class="sans text-grey margin-top-1 margin-bottom-_5"><span class="material-icon">&#xe04a;</span> {{.Strings.Film.watched}}</p>
  102. <p class="margin-lr-1 sans margin-tb-_5">{{len .Data.Experiences}} times<br/>
  103. last time <span title="{{.Data.GetLastExperienceFull .Strings}}">{{.Data.GetLastExperience .Strings .State.User.Timezone}}</p>
  104. {{end}}
  105. </div>
  106. <div class="desktop-w6 phone-w12 margin-top-10 padding-lr-2 margin-bottom-2">
  107. <div>
  108. {{if not .State.User.IsEmpty}}
  109. <div class="flex flex-row flex-wrap flex-centre flex-align-centre">
  110. {{if and (not .Data.IsOnWantList) (not .Data.Experiences)}}
  111. <form action="/users/{{.State.User.Username}}/watchlist/" method="POST" class="margin-tb-_5 margin-lr-1">
  112. <input type="hidden" name="itemId" value="{{.Data.Id}}" />
  113. <input type="hidden" name="itemType" value="film" />
  114. <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.Film.want_watch}}</span></button>
  115. </form>
  116. {{end}}
  117. <form action="/users/{{.State.User.Username}}/experiences/" method="POST" class="margin-tb-_5 margin-lr-1">
  118. <input type="hidden" name="itemId" value="{{.Data.Id}}" />
  119. <input type="hidden" name="itemType" value="film" />
  120. <button type="submit" class="border-text hover-bg-dark-accent padding-tb-_25 cursor-hand text-black font-2"><span class="padding-lr-_5 material-icon font-2">&#xe04a;</span><span class="sans padding-lr-_5">{{.Strings.Film.watched}}</span></button><label for="experienced-datetime-check" class="cursor-hand bg-accent inline-block font-2 relative top-m_3 height-3_3 text-black">
  121. <span class="material-icon">&#xe5cf;</span>
  122. </label>
  123. <input type="checkbox" id="experienced-datetime-check" class="display-none experienced-datetime-check" name="isOtherTime" value="true"/>
  124. <div class="experienced-box absolute">
  125. <input type="date" name="experiencedDate" class="margin-lr-_5 margin-tb-_5 text bg border-text" placeholder="YYYY-mm-dd"/>
  126. <input type="time" name="experiencedTime" class="margin-lr-_5 margin-tb-_5 text bg border-text" placeholder="HH:MM" />
  127. </div>
  128. </form>
  129. </div>
  130. {{end}}
  131. </div>
  132. <p class="italic serif">{{.Data.Tagline}}</p>
  133. <p class="serif justify hyphenate">{{.Data.Overview}}</p>
  134. <hr class="material-icon text-grey hr-film" />
  135. {{if .Data.Collection.Parts}}
  136. <p class="sans font-2">{{.Strings.Film.in_this_collection}}:</p>
  137. <div class="flex flex-row flex-wrap felx-justify-space flex-align-start">
  138. {{range .Data.Collection.Parts}}
  139. <a href="/films/{{.Id}}" class="decoration-none no-outline margin-tb-1 margin-lr-1">
  140. <div class="flex force-width-16">
  141. <div>
  142. {{if .Poster_path}}
  143. <img src="https://image.tmdb.org/t/p/w92{{.Poster_path}}" class="min-height-139px width-92px" />
  144. {{else}}
  145. <img src="/static/img/poster_empty.webp" class="min-height-139px width-92px" />
  146. {{end}}
  147. </div>
  148. <div class="margin-lr-1">
  149. <p class="sans">{{.Title}}</p>
  150. {{if not .Release_date.IsZero}}
  151. <p class="sans font-_875 text-grey">{{.Release_date.Year}}</p>
  152. {{end}}
  153. {{if .IsWatched}}<p class="material-icon font-_875 text-grey">&#xe8f4;</p>{{end}}
  154. </div>
  155. </div>
  156. </a>
  157. {{end}}
  158. </div>
  159. {{end}}
  160. </div>
  161. <div class="desktop-w3 phone-w12 margin-top-10 flex phone-flex-flow">
  162. <details class="margin-lr-1 flex-force-40 min-width-13_5">
  163. <summary class="cursor-hand">
  164. <span class="material-icon font-1_5">&#xe7fb;</span> <span class="sans font-1_5">{{.Strings.Film.cast}}</span>
  165. </summary>
  166. <div>
  167. {{if not .Data.Credits.Cast}}
  168. <p class="sans indent-2 margin-top-1">{{.Strings.Film.empty_payroll}}</p>
  169. {{end}}
  170. {{range .Data.Credits.Cast}}
  171. <a href="/persons/{{.Id}}" class="decoration-none no-outline inline-block margin-tb-1">
  172. <div class="flex">
  173. <div>
  174. {{if .Profile_path}}
  175. <img src="https://image.tmdb.org/t/p/w92{{.Profile_path}}" class="min-height-139px width-92px" decoding="async" loading="lazy" />
  176. {{else}}
  177. <img src="/static/img/person_empty.webp" class="min-height-139px width-92px" decoding="async" loading="lazy" />
  178. {{end}}
  179. </div>
  180. <div class="margin-lr-1">
  181. <p class="sans text">{{.Character}}</p>
  182. <p class="sans font-_875">{{.Name}}</p>
  183. </div>
  184. </div>
  185. </a>
  186. {{end}}
  187. </div>
  188. </details>
  189. <details class="margin-lr-1 flex-force-40 min-width-13_5">
  190. <summary class="cursor-hand">
  191. <span class="material-icon font-1_5">&#xe7fc;</span> <span class="sans font-1_5">{{.Strings.Film.crew}}</span>
  192. </summary>
  193. <div>
  194. {{if not .Data.Credits.Crew}}
  195. <p class="sans indent-2 margin-top-1">{{.Strings.Film.empty_payroll}}</p>
  196. {{end}}
  197. {{range .Data.Credits.Crew}}
  198. <a href="/persons/{{.Id}}" class="decoration-none no-outline inline-block margin-tb-1">
  199. <div class="flex">
  200. <div>
  201. {{if .Profile_path}}
  202. <img src="https://image.tmdb.org/t/p/w92{{.Profile_path}}" class="min-height-139px width-92px" decoding="async" loading="lazy" />
  203. {{else}}
  204. <img src="/static/img/person_empty.webp" class="min-height-139px width-92px" decoding="async" loading="lazy" />
  205. {{end}}
  206. </div>
  207. <div class="margin-lr-1">
  208. <p class="sans text">{{.Job}}</p>
  209. <p class="sans font-_875">{{.Name}}</p>
  210. </div>
  211. </div>
  212. </a>
  213. {{end}}
  214. </div>
  215. </details>
  216. </div>
  217. </main>
  218. </body>
  219. </html>