watchlist.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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>{{.Strings.Watchlist.title}}</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">
  13. <a href="/" class="decoration-none">
  14. <h1 class="inline valign-mid text sans margin-lr-1">a·muse</h1>
  15. </a>
  16. <div class="margin-lr-1 text">
  17. <nav>
  18. <label for="hamburger" class="cursor-hand">
  19. <img src="/users/{{.State.User.Username}}/avatar?size=small" class="border-radius-25 width-1_5"/>
  20. </label>
  21. <input type="checkbox" id="hamburger" class="display-none" />
  22. <ul class="absolute right top-1 padding-lr-1 padding-tb-_5 bg align-right list-style-none sans">
  23. <!--<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>-->
  24. <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>
  25. <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>
  26. <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>
  27. <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>
  28. <li class="bg-error">
  29. <form action="/users/{{.State.User.Username}}/sessions/{{.State.User.Session}}" method="POST" class="inline">
  30. <input type="hidden" value="DELETE" name="method" />
  31. <input type="submit" value="{{.Strings.Global.log_out}}" class="border-none bg-none font-normal text-accent padding-lr-0 cursor-hand font-1" />
  32. </form><span class="material-icon padding-lr-_5">&#xe7ff;</span>
  33. </li>
  34. </ul>
  35. </nav>
  36. </div>
  37. </header>
  38. <main class="margin-lr-1">
  39. <!-- search, filter, order -->
  40. <div class="flex flex-row flex-wrap flex-centre flex-align-start margin-top-1">
  41. <form method="GET" class="flex inline margin-lr-1 border-bottom">
  42. <input type="search" name="filter" class="border-none bg-none sans text" placeholder="{{.Strings.Watchlist.filter}}" value="{{.Data.Query}}" />
  43. </form>
  44. </div>
  45. {{if .Data.List}}
  46. <div class="flex flex-row flex-wrap flex-justify-space flex-align-start margin-top-1">
  47. <div>
  48. {{if gt .Data.Page 1}}
  49. <a href="/users/{{.State.User.Username}}/watchlist?filter={{.Data.Query}}&page={{.Data.PrevPage}}" class="decoration-none" title="{{.Strings.Search.prev_link_title}}"><span class="material-icon font-2">&#xe408;</span></a>
  50. {{end}}
  51. </div>
  52. <div>Page {{.Data.Page}}/{{.Data.Pages}}</div>
  53. <div>
  54. {{if lt .Data.Page .Data.Pages}}
  55. <a href="/users/{{.State.User.Username}}/watchlist?filter={{.Data.Query}}&page={{.Data.NextPage}}" class="decoration-none" title="{{.Strings.Search.next_link_title}}"><span class="material-icon font-2">&#xe409;</span></a>
  56. {{end}}
  57. </div>
  58. </div>
  59. <div class="flex flex-row flex-wrap flex-justify-space flex-align-start">
  60. {{range .Data.List}}
  61. <a href="/films/{{.Id}}" class="decoration-none force-width-18 margin-tb-1 no-outline border-solid border-gradient border-tb-transparent border-_5 padding-tb-_25 padding-lr-_25">
  62. <div class="flex">
  63. <div>
  64. {{if .Cover}}
  65. <img src="https://image.tmdb.org/t/p/w154{{.Cover}}" class="min-height-231px width-154px{{if .IsUnreleased "film"}} bw{{end}}" />
  66. {{else}}
  67. <img src="/static/img/poster_empty.webp" class="min-height-231px width-154px" />
  68. {{end}}
  69. </div>
  70. <div class="margin-lr-1">
  71. <p class="sans">{{.Title}}</p>
  72. {{if eq .Status "Canceled"}}
  73. <p class="sans font-_875 text-error">Cancelled</p>
  74. {{else if gt .YearStart 1}}
  75. <p class="sans font-_875 text-grey">{{.YearStart}}</p>
  76. {{end}}
  77. <p class="sans font-_875">
  78. {{.GetGenres $.Data.Genres}}
  79. </p>
  80. {{if gt .Runtime 0}}
  81. <p class="sans font-_875 text-grey">{{.Runtime}} min</p>
  82. {{end}}
  83. <p class="font-_875 text-grey">
  84. {{if .HasPrevious}}<span class="material-icon" title="Watch previous part first">&#xe02c;</span>{{end}}
  85. <!-- todo based on -->
  86. </p>
  87. </div>
  88. </div>
  89. </a>
  90. {{end}}
  91. </div>
  92. <div class="flex flex-row flex-wrap flex-justify-space flex-align-start margin-top-1">
  93. <div>
  94. {{if gt .Data.Page 1}}
  95. <a href="/users/{{.State.User.Username}}/watchlist?filter={{.Data.Query}}&page={{.Data.PrevPage}}" class="decoration-none" title="{{.Strings.Search.prev_link_title}}"><span class="material-icon font-2">&#xe408;</span></a>
  96. {{end}}
  97. </div>
  98. <div>
  99. {{if lt .Data.Page .Data.Pages}}
  100. <a href="/users/{{.State.User.Username}}/watchlist?filter={{.Data.Query}}&page={{.Data.NextPage}}" class="decoration-none" title="{{.Strings.Search.next_link_title}}"><span class="material-icon font-2">&#xe409;</span></a>
  101. {{end}}
  102. </div>
  103. </div>
  104. {{else if and (gt .Data.Page .Data.Pages) (gt .Data.Pages 0)}}
  105. <div class="font-2 w12 flex flex-centre margin-top-10">
  106. <div>
  107. <p>{{.Strings.Global.too_far_quote}}</p>
  108. <p class="indent-2 sans">—{{.Strings.Global.too_far_character}} (<span class="italic sans">{{.Strings.Global.too_far_title}}</span>, {{.Strings.Global.too_far_code}} {{.Strings.Global.too_far_episode}})</p>
  109. </div>
  110. </div>
  111. {{else}}
  112. <div class="font-2 w12 flex flex-centre margin-top-10">
  113. <div>
  114. <p>{{.Strings.Global.empty_quote}}</p>
  115. <p class="indent-2 sans">—{{.Strings.Global.empty_character}} (<span class="italic sans">{{.Strings.Global.empty_title}}</span>)</p>
  116. </div>
  117. </div>
  118. {{end}}
  119. </main>
  120. </body>
  121. </html>