index.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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 @click="search_visible = !search_visible">Sucheinstellungen</button>
  38. <button @click="window.location.hash = ''; window.location.reload()">Logout</button>
  39. </div>
  40. </nav>
  41. <div class="content">
  42. <div class="panel" v-if="search_visible">
  43. <div align="right">
  44. <button @click="search_visible = !search_visible">X</button>
  45. </div>
  46. <h1>Neue Suche</h1>
  47. <form>
  48. <div class="form-group">
  49. <label>Suchbegriff(e), durch Leerzeichen getrennt</label>
  50. <input v-model="query.search">
  51. </div>
  52. <div class="form-group">
  53. <label>Maximalpreis</label>
  54. <input type="number" v-model="query.maxprice">
  55. </div>
  56. <div class="form-group">
  57. <label>Mindestpreis</label>
  58. <input type="number" v-model="query.minprice">
  59. </div>
  60. <div class="form-group">
  61. <input type="checkbox" v-model="query.restricted">
  62. <label>WBK noetig?</label>
  63. </div>
  64. <div class="form-group">
  65. <label>Such-URL (Kann man alternativ von eGun-Suche kopieren)</label>
  66. <input v-model="query_url">
  67. </div>
  68. </form>
  69. <div>
  70. <a v-if="query_url" v-bind:href="query_url" target="_">Suche testen</a>
  71. </div>
  72. <div align="right">
  73. <button @click="add_query()">Suche hinzufuegen</button>
  74. </div>
  75. Bestehende Suchen:
  76. <div v-for="(query, url) in queries" style="font-size: 0.8em">
  77. <button @click="delete_query(url)">X</button> <i>
  78. "{{display_query(url)}}"
  79. </i>
  80. </div>
  81. <div align="right">
  82. <button @click="save_account()">Alle Suchen permanent speichern</button>
  83. </div>
  84. </div>
  85. <div v-for="query in queries">
  86. <div class="panel" v-for="auction in query.auctions" v-if="auction.price != null && !auction.is_price_final">
  87. <div class="grid-auto">
  88. <div>
  89. <img :src="auction.thumb" style="vertical-align:middle;">
  90. </div>
  91. <div><a :href="auction.url">{{auction.desc}}</a></div>
  92. <div>
  93. <div class="badge">{{auction.price}} EUR</div>
  94. </div>
  95. <div>{{ts_to_remaining(auction.timestamp)}}</div>
  96. <a v-bind:href="auction.gcal">Add to cal</a>
  97. </div>
  98. </div>
  99. </div>
  100. <template>
  101. <div class="panel" v-if="!account">
  102. {{account}}
  103. Hi! Du hast noch keinen Account oder es ist keiner geladen. Macht aber nichts, gib einfach Deinen ein oder
  104. denke Dir einen aus.
  105. <input v-model="new_account" v-on:keyup.enter="window.location.hash = new_account;">
  106. <button @click="window.location.hash = new_account">OK</button>
  107. </div>
  108. </template>
  109. </div>
  110. </div>
  111. </body>
  112. <link rel="stylesheet" href="https://rawgit.com/woelper/lilac/master/lilac.min.css">
  113. <!-- Moment.js library -->
  114. <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
  115. <!-- moment-duration-format plugin -->
  116. <script
  117. src="https://cdnjs.cloudflare.com/ajax/libs/moment-duration-format/1.3.0/moment-duration-format.min.js"></script>
  118. <script defer src="https://cdn.jsdelivr.net/npm/vue@2.5.13/dist/vue.min.js"></script>
  119. <script defer src="app.js"></script>
  120. <style>
  121. :root {
  122. --main-color: #2e442f;
  123. }
  124. .nav-items {
  125. margin-left:auto; margin-right:0;
  126. }
  127. </style>