aboutsummaryrefslogtreecommitdiffhomepage
path: root/app.js
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2019-02-19 22:20:46 -0800
committerBastien Wirtz <bastien.wirtz@gmail.com>2019-02-19 22:20:46 -0800
commit4877ec98e668b1741d7a2a4d3e4a177ec495db39 (patch)
tree39bc5d0bb4065ee2d96aa53501d51b1f3729c794 /app.js
parent9baec9aec294656fb632123906b4ac6a712267ba (diff)
downloadhomer-4877ec98e668b1741d7a2a4d3e4a177ec495db39.tar.gz
homer-4877ec98e668b1741d7a2a4d3e4a177ec495db39.tar.zst
homer-4877ec98e668b1741d7a2a4d3e4a177ec495db39.zip
Vertical layout support
Diffstat (limited to 'app.js')
-rw-r--r--app.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/app.js b/app.js
index 6e20ea3..dc8b6cc 100644
--- a/app.js
+++ b/app.js
@@ -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
50Vue.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
49if ('serviceWorker' in navigator) { 78if ('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');