index.html 7.4 KB

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