summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2018-06-02 11:50:49 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2018-12-13 17:09:11 +0100
commit7cc84923fdb59956890f69fe6363d9ab333cf46a (patch)
tree165f24fcda9dcca032d7cdfeacb6bec58a52d73d /src
parent0cd076c85f05fad581ae3ac34338e20e443ecdb1 (diff)
downloadbrokentalents-7cc84923fdb59956890f69fe6363d9ab333cf46a.tar.gz
brokentalents-7cc84923fdb59956890f69fe6363d9ab333cf46a.zip
Create a PWA
Diffstat (limited to 'src')
-rw-r--r--src/HeroImage.vue2
-rw-r--r--src/TalentImage.vue2
-rw-r--r--src/index.html4
-rw-r--r--src/index.js5
4 files changed, 11 insertions, 2 deletions
diff --git a/src/HeroImage.vue b/src/HeroImage.vue
index 4dd7672..f72d0fc 100644
--- a/src/HeroImage.vue
+++ b/src/HeroImage.vue
@@ -1,6 +1,6 @@
<template>
<figure class="image">
- <img :src="`dist/assets/hero-icons/${hero.toLowerCase()}.png`"
+ <img :src="`/dist/assets/hero-icons/${hero.toLowerCase()}.png`"
:style="round? 'border-radius: 50%' : ''"
:alt="hero"
:title="hero">
diff --git a/src/TalentImage.vue b/src/TalentImage.vue
index 4a8ffaa..3857c9f 100644
--- a/src/TalentImage.vue
+++ b/src/TalentImage.vue
@@ -1,7 +1,7 @@
<template>
<div v-if="rarity != 'None'"
class="talent-image"
- :style="`background-image: url('dist/assets/talent-icons-small/${hero}/${hero}_${rarity}.png'); width: ${size}px; height: ${size}px`"
+ :style="`background-image: url('/dist/assets/talent-icons-small/${hero}/${hero}_${rarity}.png'); width: ${size}px; height: ${size}px`"
:alt="`${hero} ${rarity}`"
:title="`${hero} ${rarity}`">
</div>
diff --git a/src/index.html b/src/index.html
index 41110e0..0ef6fb8 100644
--- a/src/index.html
+++ b/src/index.html
@@ -7,6 +7,9 @@
<meta name="description" content="Vainglory Talent and Hero statistics. Find the best Talent for Blitz and Battle Royale. Check Vainglory Hero pick and win rates.">
<meta name="keywords" content="Vainglory,Talents,5v5,Blitz,Battle Royale">
<meta property="og:image" content="/dist/assets/TalentGrab_square.jpg">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-status-bar-style" content="black">
+ <meta name="apple-mobile-web-app-title" content="Broken Talents Fun">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
@@ -22,6 +25,7 @@
gtag('config', 'UA-118868480-1');
</script>
<link rel="stylesheet" href="//cdn.materialdesignicons.com/2.3.54/css/materialdesignicons.min.css">
+ <link rel="manifest" href="/dist/manifest.json">
<link rel="shortcut icon" type="image/x-icon" href="/dist/assets/TalentGrab_square.jpg">
</head>
<body>
diff --git a/src/index.js b/src/index.js
index 1c498bb..21e04c3 100644
--- a/src/index.js
+++ b/src/index.js
@@ -24,4 +24,9 @@ new Vue({
router,
el: '#app',
render: h => h(App),
+ mounted: function() {
+ if ('serviceWorker' in navigator) {
+ navigator.serviceWorker.register('/service-worker.js');
+ }
+ },
});