diff options
Diffstat (limited to 'app.js')
-rw-r--r-- | app.js | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -4,6 +4,7 @@ const app = new Vue({ | |||
4 | config: null, | 4 | config: null, |
5 | offline: false, | 5 | offline: false, |
6 | filter: '', | 6 | filter: '', |
7 | vlayout: true | ||
7 | }, | 8 | }, |
8 | created: function () { | 9 | created: function () { |
9 | let that = this; | 10 | let that = this; |
@@ -46,6 +47,34 @@ const app = new Vue({ | |||
46 | } | 47 | } |
47 | }); | 48 | }); |
48 | 49 | ||
50 | Vue.component('service', { | ||
51 | props: ['item'], | ||
52 | template: `<div> | ||
53 | <div class="card"> | ||
54 | <a :href="item.url"> | ||
55 | <div class="card-content"> | ||
56 | <div class="media"> | ||
57 | <div v-if="item.logo" class="media-left"> | ||
58 | <figure class="image is-48x48"> | ||
59 | <img :src="item.logo" /> | ||
60 | </figure> | ||
61 | </div> | ||
62 | <div v-if="item.icon" class="media-left"> | ||
63 | <figure class="image is-48x48"> | ||
64 | <i style="font-size: 35px" :class="item.icon"></i> | ||
65 | </figure> | ||
66 | </div> | ||
67 | <div class="media-content"> | ||
68 | <p class="title is-4">{{ item.name }}</p> | ||
69 | <p class="subtitle is-6">{{ item.subtitle }}</p> | ||
70 | </div> | ||
71 | </div> | ||
72 | <strong class="tag" v-if="item.tag">#{{ item.tag }}</strong> | ||
73 | </div> | ||
74 | </a> | ||
75 | </div></div>` | ||
76 | }); | ||
77 | |||
49 | if ('serviceWorker' in navigator) { | 78 | if ('serviceWorker' in navigator) { |
50 | window.addEventListener('load', function () { | 79 | window.addEventListener('load', function () { |
51 | navigator.serviceWorker.register('/worker.js'); | 80 | navigator.serviceWorker.register('/worker.js'); |