123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281 |
- <!doctype html>
- <head>
- <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
- <meta content="utf-8" http-equiv="encoding">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="mobile-web-app-capable" content="yes">
- <link rel="icon" sizes="128x128" href="icon.png">
- <link rel="apple-touch-icon" sizes="128x128" href="icon.png">
- <meta name="theme-color" content="#216e51">
- <meta name="apple-mobile-web-app-status-bar-style" content="#216e51">
- <!-- <meta name="theme-color" content="#f7d723">
- <meta name="apple-mobile-web-app-status-bar-style" content="#f7d723"> -->
- <style>
- * {
- margin: 0;
- padding: 0;
- }
- #splash {
- background-color: #216e51;
- color: rgb(207, 207, 207);
- padding: 10%;
- margin: 0%;
- font-size: 4em;
- font-weight: bolder;
- padding-bottom: 200%;
- height: 100%;
- font-family: Arial, Helvetica, sans-serif;
- }
- </style>
- </head>
- <body>
- <div id="splash">
- loading
- </div>
- <div id="app" style="display: none">
- <nav>
- <div class="logo">{{title}}</div>
- <div id="nav-icon">☰</div>
- <input id="nav-toggle" type="checkbox">
- <div id="nav-items">
- <button v-if="account" @click="search_visible = !search_visible">Sucheinstellungen</button>
- <button v-if="account" @click="window.location.hash = ''; window.location.reload()">Logout</button>
- </div>
- </nav>
- <div class="content">
- <div v-for="auction in ordered_auctions()"
- v-if="auction.price != null && !auction.is_price_final && !search_visible">
- <div class="auction">
- <div class="thumb">
- <div class="blurredthumb" v-bind:style="{ 'background-image': 'url(' + auction.thumb+ ')' }"></div>
- <img class="thumbimg" :src="auction.thumb">
- </div>
- <div style="overflow: hidden">
- <a :href="auction.url" target="_">{{auction.desc}}</a>
- <div class="currency">€ {{auction.price}}</div>
- <div>{{ts_to_remaining(auction.timestamp)}}</div>
- <a v-bind:href="auction.gcal">Kalendereintrag</a>
- <div v-if="auction.avg_price > auction.price">
- Preistipp
- </div>
- </div>
- </div>
- <hr>
- </div>
- <div v-if="account" class="panel">
- <h3>Deine Suchen:</h3>
- <div v-for="(query, url) in queries">
- Suche <i>"{{display_query(url)}}"</i>: {{Math.round(query.avg_price)}} EUR im Schnitt
- </div>
- <button @click="search_visible = !search_visible">Sucheinstellungen</button>
- <h3>Abgelaufene Suchen:</h3>
- </div>
- <div v-for="auction in ordered_auctions()"
- v-if="auction.price != null && auction.is_price_final && !search_visible">
- <div class="auction">
- <div class="thumb">
- <div class="blurredthumb" v-bind:style="{ 'background-image': 'url(' + auction.thumb+ ')' }"></div>
- <img class="thumbimg" :src="auction.thumb">
- </div>
- <div style="overflow: hidden">
- <a :href="auction.url" target="_">{{auction.desc}}</a>
- <div class="currency">€ {{auction.price}}</div>
- </div>
- </div>
- <hr>
- </div>
- <template>
- <div class="panel" v-if="!account">
- {{account}}
- Hi! Du hast noch keinen Account oder es ist keiner geladen. Macht aber nichts, gib einfach Deinen ein oder
- denke Dir einen aus.
- <input autocapitalize="none" v-model="new_account" v-on:keyup.enter="window.location.hash = new_account;">
- <button @click="window.location.hash = new_account">OK</button>
- <div>
- Tip: der Accountname sollte einem Passwort aehnlich sein wenn Du nicht willst dass jemand anderes Deine
- Suchen sieht.
- </div>
- </div>
- </template>
- <div class="panel" v-if="search_visible">
- <div align="right">
- <button @click="search_visible = !search_visible">X</button>
- </div>
- <h1>Neue Suche</h1>
- 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!
- <br>
- <br>
- <form>
- <div class="form-group">
- <label>Suchbegriff(e), durch Leerzeichen getrennt</label>
- <input autocapitalize="none" v-model="query.search">
- </div>
- <div class="form-group">
- <label>Maximalpreis</label>
- <input type="number" v-model="query.maxprice">
- </div>
- <div class="form-group">
- <label>Mindestpreis</label>
- <input type="number" v-model="query.minprice">
- </div>
- <div class="form-group">
- <input type="checkbox" v-model="query.restricted">
- <label>WBK noetig?</label>
- </div>
- <label>Auktionstyp</label>
- <div class="form-group">
- <select v-model="query.type">
- <option v-bind:value="1">Nur Auktionen</option>
- <option v-bind:value="2">Nur Sofortkauf</option>
- <option v-bind:value="3">Alles</option>
- </select>
- </div>
- <div class="form-group">
- <label>Such-URL (Kann man alternativ von eGun-Suche kopieren)</label>
- <input autocapitalize="none" v-model="query_url">
- </div>
- </form>
- <div>
- <a v-if="query_url" v-bind:href="query_url" target="_">Suche testen</a>
- </div>
- <div align="right">
- <button @click="add_query()">Suche hinzufuegen</button>
- </div>
- Bestehende Suchen:
- <div v-for="(query, url) in queries" style="font-size: 0.8em">
- <button @click="delete_query(url)">X</button> <i>
- "{{display_query(url)}}"
- </i>
- </div>
- <div align="right">
- <button @click="save_account()">Alle Suchen permanent speichern</button>
- </div>
- </div>
- </div>
- </div>
- </body>
- <!-- <link rel="stylesheet" href="https://rawgit.com/woelper/lilac/master/lilac.css"> -->
- <link rel="stylesheet" href="https://rawgit.com/woelper/lilac/master/lilac.min.css">
- <!-- Moment.js library -->
- <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment-with-locales.min.js"></script>
- <!-- moment-duration-format plugin -->
- <script
- src="https://cdnjs.cloudflare.com/ajax/libs/moment-duration-format/1.3.0/moment-duration-format.min.js"></script>
- <script defer src="https://cdn.jsdelivr.net/npm/vue@2.5.13/dist/vue.min.js"></script>
- <script defer src="app.js"></script>
- <style>
- :root {
- --main-color: rgb(33, 110, 81);
- }
- .nav-items {
- margin-left: auto;
- margin-right: 0;
- }
- .auction {
- margin: 10px;
- overflow: hidden;
- }
- .auction a {
- text-decoration: none;
- color: rgb(27, 162, 216);
- }
- .currency {
- font-weight: bold
- }
- .blurredthumb {
- filter: blur(8px);
- width: 100%;
- height: 100%;
- background-size: 100% 100%;
- }
- .thumb {
- width: 100px;
- height: 100px;
- float: left;
- margin-right: 30px;
- position: relative;
- background-color: #ccc;
- overflow: hidden;
- }
- .thumbimg {
- position: absolute;
- top: 0;
- bottom: 0;
- margin: auto;
- }
- #nav-icon {
- text-align: center;
- box-sizing: content-box;
- }
- @media screen and (max-width:600px) {
- #nav-items {
- width: 50%;
- box-shadow: 0px 8px 8px rgba(0, 0, 0, 0.404);
- }
- }
- hr {
- display: block;
- height: 1px;
- border: 0;
- border-top: 1px solid #ccc;
- margin: 1em 0;
- margin-left: 10px;
- margin-right: 10px;
- padding: 0;
- }
- </style>
|