index.html 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. <!doctype html>
  2. <head>
  3. <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
  4. <meta content="utf-8" http-equiv="encoding">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <meta name="mobile-web-app-capable" content="yes">
  7. <meta name="theme-color" content="#dddddd">
  8. <link rel="icon" sizes="128x128" href="icon.png">
  9. <link rel="apple-touch-icon" sizes="128x128" href="icon.png">
  10. <meta name="theme-color" content="#216e51">
  11. <meta name="apple-mobile-web-app-status-bar-style" content="#216e51">
  12. <link rel="manifest" href="manifest.json">
  13. <!-- <meta name="theme-color" content="#f7d723">
  14. <meta name="apple-mobile-web-app-status-bar-style" content="#f7d723"> -->
  15. <style>
  16. * {
  17. margin: 0;
  18. padding: 0;
  19. }
  20. #splash {
  21. background-color: #216e51;
  22. color: rgb(207, 207, 207);
  23. padding: 10%;
  24. margin: 0%;
  25. font-size: 4em;
  26. font-weight: bolder;
  27. padding-bottom: 200%;
  28. height: 100%;
  29. font-family: Arial, Helvetica, sans-serif;
  30. }
  31. </style>
  32. </head>
  33. <body>
  34. <div id="splash">
  35. loading
  36. </div>
  37. <div id="app" style="display: none">
  38. <nav>
  39. <div class="logo">{{title}}</div>
  40. <div id="nav-icon">M</div>
  41. <input id="nav-toggle" type="checkbox">
  42. <div id="nav-items">
  43. <button v-if="account" @click="search_visible = !search_visible">Sucheinstellungen</button>
  44. <button v-if="account" @click="window.location.hash = ''; window.location.reload()">Logout</button>
  45. </div>
  46. </nav>
  47. <div class="content">
  48. <div v-for="auction in ordered_auctions()"
  49. v-if="auction.price != null && !auction.is_price_final && !search_visible">
  50. <div class="auction">
  51. <div class="thumb">
  52. <div class="blurredthumb" v-bind:style="{ 'background-image': 'url(' + auction.thumb+ ')' }"></div>
  53. <img class="thumbimg" :src="auction.thumb">
  54. </div>
  55. <div style="overflow: hidden">
  56. <a :href="auction.url" target="_">{{auction.desc}}</a>
  57. <div class="currency">€ {{auction.price}}</div>
  58. <div>{{ts_to_remaining(auction.timestamp)}}</div>
  59. <a v-bind:href="auction.gcal">Kalendereintrag</a>
  60. </div>
  61. </div>
  62. <hr>
  63. </div>
  64. <div v-if="account" class="panel">
  65. <h3>Deine Suchen:</h3>
  66. <div v-for="(query, url) in queries">
  67. Suche <i>"{{display_query(url)}}"</i>: {{Math.round(query.avg_price)}} EUR im Schnitt
  68. </div>
  69. <button @click="search_visible = !search_visible">Sucheinstellungen</button>
  70. <h3>Abgelaufene Suchen:</h3>
  71. </div>
  72. <div v-for="auction in ordered_auctions()"
  73. v-if="auction.price != null && auction.is_price_final && !search_visible">
  74. <div class="auction">
  75. <div class="thumb">
  76. <div class="blurredthumb" v-bind:style="{ 'background-image': 'url(' + auction.thumb+ ')' }"></div>
  77. <img class="thumbimg" :src="auction.thumb">
  78. </div>
  79. <div style="overflow: hidden">
  80. <a :href="auction.url" target="_">{{auction.desc}}</a>
  81. <div class="currency">€ {{auction.price}}</div>
  82. </div>
  83. </div>
  84. <hr>
  85. </div>
  86. <template>
  87. <div class="panel" v-if="!account">
  88. {{account}}
  89. Hi! Du hast noch keinen Account oder es ist keiner geladen. Macht aber nichts, gib einfach Deinen ein oder
  90. denke Dir einen aus.
  91. <input autocapitalize="none" v-model="new_account" v-on:keyup.enter="window.location.hash = new_account;">
  92. <button @click="window.location.hash = new_account">OK</button>
  93. <div>
  94. Tip: der Accountname sollte einem Passwort aehnlich sein wenn Du nicht willst dass jemand anderes Deine
  95. Suchen sieht.
  96. </div>
  97. </div>
  98. </template>
  99. <div class="panel" v-if="search_visible">
  100. <div align="right">
  101. <button @click="search_visible = !search_visible">X</button>
  102. </div>
  103. <h1>Neue Suche</h1>
  104. Suchen sind das Herzstueck dieser Anwendung. Suchen laufen immer, auch wenn Du nicht online bist. Erstelle eine
  105. Suche die moeglichst nur das liefert was Dich interessiert. Das Ausschliessen von Sofortkauf-Artikeln, ein
  106. Mindestpreis sowie nur Artikel die eine WBK erfordern kann sinnvoll sein. Vergiss nicht am Ende alle zu
  107. speichern!
  108. <br>
  109. <br>
  110. <form>
  111. <div class="form-group">
  112. <label>Suchbegriff(e), durch Leerzeichen getrennt</label>
  113. <input autocapitalize="none" v-model="query.search">
  114. </div>
  115. <div class="form-group">
  116. <label>Maximalpreis</label>
  117. <input type="number" v-model="query.maxprice">
  118. </div>
  119. <div class="form-group">
  120. <label>Mindestpreis</label>
  121. <input type="number" v-model="query.minprice">
  122. </div>
  123. <div class="form-group">
  124. <input type="checkbox" v-model="query.restricted">
  125. <label>WBK noetig?</label>
  126. </div>
  127. <label>Auktionstyp</label>
  128. <div class="form-group">
  129. <select v-model="query.type">
  130. <option v-bind:value="1">Nur Auktionen</option>
  131. <option v-bind:value="2">Nur Sofortkauf</option>
  132. <option v-bind:value="3">Alles</option>
  133. </select>
  134. </div>
  135. <div class="form-group">
  136. <label>Such-URL (Kann man alternativ von eGun-Suche kopieren)</label>
  137. <input autocapitalize="none" v-model="query_url">
  138. </div>
  139. </form>
  140. <div>
  141. <a v-if="query_url" v-bind:href="query_url" target="_">Suche testen</a>
  142. </div>
  143. <div align="right">
  144. <button @click="add_query()">Suche hinzufuegen</button>
  145. </div>
  146. Bestehende Suchen:
  147. <div v-for="(query, url) in queries" style="font-size: 0.8em">
  148. <button @click="delete_query(url)">X</button> <i>
  149. "{{display_query(url)}}"
  150. </i>
  151. </div>
  152. <div align="right">
  153. <button @click="save_account()">Alle Suchen permanent speichern</button>
  154. </div>
  155. </div>
  156. </div>
  157. </div>
  158. </body>
  159. <!-- <link rel="stylesheet" href="https://rawgit.com/woelper/lilac/master/lilac.css"> -->
  160. <link rel="stylesheet" href="https://rawgit.com/woelper/lilac/master/lilac.min.css">
  161. <!-- Moment.js library -->
  162. <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
  163. <!-- moment-duration-format plugin -->
  164. <script
  165. src="https://cdnjs.cloudflare.com/ajax/libs/moment-duration-format/1.3.0/moment-duration-format.min.js"></script>
  166. <script defer src="https://cdn.jsdelivr.net/npm/vue@2.5.13/dist/vue.min.js"></script>
  167. <script defer src="app.js"></script>
  168. <style>
  169. :root {
  170. --main-color: rgb(33, 110, 81);
  171. }
  172. .nav-items {
  173. margin-left: auto;
  174. margin-right: 0;
  175. }
  176. .auction {
  177. margin: 10px;
  178. overflow: hidden;
  179. }
  180. .auction a {
  181. color: aquamarine;
  182. text-decoration: none;
  183. color: #444;
  184. }
  185. .currency {
  186. font-weight: bold
  187. }
  188. .blurredthumb {
  189. filter: blur(8px);
  190. width: 100%;
  191. height: 100%;
  192. background-size: 100% 100%;
  193. }
  194. .thumb {
  195. width: 100px;
  196. height: 100px;
  197. float: left;
  198. margin-right: 30px;
  199. position: relative;
  200. background-color: #ccc;
  201. overflow: hidden;
  202. }
  203. .thumbimg {
  204. position: absolute;
  205. top: 0;
  206. bottom: 0;
  207. margin: auto;
  208. }
  209. @media screen and (max-width:600px) {
  210. #nav-items {
  211. width: 50%;
  212. box-shadow: 0px 8px 8px rgba(0, 0, 0, 0.404);
  213. }
  214. }
  215. hr {
  216. display: block;
  217. height: 1px;
  218. border: 0;
  219. border-top: 1px solid #ccc;
  220. margin: 1em 0;
  221. margin-left: 10px;
  222. margin-right: 10px;
  223. padding: 0;
  224. }
  225. </style>