index.html 4.4 KB

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