Browse Source

Install Wekan to mobile homescreen icon and use fullscreen PWA.
Docs at https://github.com/wekan/wekan/wiki/PWA

Thanks to xet7 !

Closes #2879

Lauri Ojansivu 5 years ago
parent
commit
8d5adc0464

+ 6 - 0
client/00-startup.js

@@ -0,0 +1,6 @@
+// PWA
+if ('serviceWorker' in navigator) {
+  window.addEventListener('load', function() {
+    navigator.serviceWorker.register('/pwa-service-worker.js');
+  });
+}

+ 10 - 4
client/components/main/layouts.jade

@@ -6,10 +6,16 @@ head
     where the application is deployed with a path prefix, but it seems to be
     difficult to do that cleanly with Blaze -- at least without adding extra
     packages.
-  link(rel="shortcut icon" href="/wekan-favicon.png")
-  link(rel="apple-touch-icon" href="/wekan-favicon.png")
-  link(rel="mask-icon" href="/wekan-logo-150.svg")
-  link(rel="manifest" href="/wekan-manifest.json")
+  link(rel="shortcut icon" type="image/x-icon" href="/favicon.ico")
+  link(rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png")
+  link(rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png")
+  link(rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png")
+  link(rel="manifest" href="/site.webmanifest")
+  link(rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5")
+  meta(name="apple-mobile-web-app-title" content="Wekan")
+  meta(name="application-name" content="Wekan")
+  meta(name="msapplication-TileColor" content="#00aba9")
+  meta(name="theme-color" content="#ffffff")
 
 template(name="userFormsLayout")
   section.auth-layout

BIN
public/android-chrome-192x192.png


BIN
public/android-chrome-512x512.png


BIN
public/apple-touch-icon.png


+ 9 - 0
public/browserconfig.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<browserconfig>
+    <msapplication>
+        <tile>
+            <square150x150logo src="/mstile-150x150.png"/>
+            <TileColor>#2d89ef</TileColor>
+        </tile>
+    </msapplication>
+</browserconfig>

BIN
public/favicon-16x16.png


BIN
public/favicon-32x32.png


BIN
public/favicon.ico


+ 9 - 0
public/html_code.html

@@ -0,0 +1,9 @@
+<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
+<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
+<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
+<link rel="manifest" href="/site.webmanifest">
+<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
+<meta name="apple-mobile-web-app-title" content="Wekan">
+<meta name="application-name" content="Wekan">
+<meta name="msapplication-TileColor" content="#2d89ef">
+<meta name="theme-color" content="#ffffff">

BIN
public/mstile-144x144.png


BIN
public/mstile-150x150.png


BIN
public/mstile-310x150.png


BIN
public/mstile-310x310.png


BIN
public/mstile-70x70.png


+ 4 - 0
public/pwa-service-worker.js

@@ -0,0 +1,4 @@
+self.addEventListener('install', function(event) {
+  // Dummy service worker that does nothing,
+  // for mobile browsers "Add to home screen".
+});

+ 51 - 0
public/safari-pinned-tab.svg

@@ -0,0 +1,51 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
+ width="700.000000pt" height="700.000000pt" viewBox="0 0 700.000000 700.000000"
+ preserveAspectRatio="xMidYMid meet">
+<metadata>
+Created by potrace 1.11, written by Peter Selinger 2001-2013
+</metadata>
+<g transform="translate(0.000000,700.000000) scale(0.100000,-0.100000)"
+fill="#000000" stroke="none">
+<path d="M4950 5425 c-18 -22 -5 -69 38 -139 51 -82 70 -131 85 -229 23 -139
+13 -332 -24 -517 -43 -212 -156 -565 -234 -737 -8 -17 -15 -34 -15 -37 0 -7
+-28 -69 -108 -241 -291 -626 -622 -1090 -904 -1267 -23 -15 -27 -15 -32 -2 -7
+17 0 285 8 329 3 17 10 57 16 90 6 33 12 74 15 90 3 17 8 46 11 65 2 19 9 58
+14 85 5 28 12 66 15 85 3 19 17 89 30 155 13 66 26 131 29 145 2 14 9 45 15
+70 13 54 141 635 147 670 3 14 12 48 20 76 8 28 16 60 18 70 3 11 9 39 15 64
+32 141 32 217 1 263 -29 42 -49 55 -277 176 -132 70 -195 99 -210 95 -24 -7
+-45 -50 -88 -184 -15 -47 -43 -125 -62 -175 -19 -49 -44 -115 -55 -145 -12
+-30 -29 -73 -38 -95 -10 -22 -39 -94 -65 -160 -83 -213 -154 -384 -272 -650
+-347 -786 -602 -1192 -728 -1161 -18 5 -23 15 -28 58 -6 53 -1 162 9 208 4 14
+8 39 10 55 16 106 72 359 136 605 22 85 41 163 43 174 3 10 11 42 19 70 12 41
+95 360 111 426 5 18 42 151 85 305 18 61 36 128 41 149 6 22 30 103 54 180 64
+207 77 265 70 303 -8 43 -56 98 -109 125 -23 11 -96 54 -164 95 -210 127 -225
+130 -397 70 -181 -64 -611 -244 -642 -269 -7 -6 -13 -8 -13 -5 0 9 -340 -162
+-476 -239 -322 -182 -495 -303 -629 -438 -99 -99 -139 -161 -161 -246 -58
+-230 48 -440 307 -610 87 -57 130 -72 144 -50 4 6 8 67 11 136 2 70 10 153 18
+185 33 125 132 280 278 429 82 85 242 230 303 275 22 17 42 32 45 35 36 40
+339 241 485 323 143 79 391 194 401 185 1 -2 -15 -69 -36 -148 -45 -169 -79
+-300 -121 -460 -17 -63 -43 -164 -59 -225 -46 -173 -89 -342 -94 -367 -3 -13
+-30 -126 -61 -253 -31 -126 -58 -239 -61 -250 -2 -11 -17 -85 -33 -165 -17
+-80 -32 -156 -34 -170 -3 -14 -8 -36 -11 -50 -11 -42 -13 -181 -4 -233 32
+-175 198 -333 386 -367 173 -31 345 65 509 285 220 293 421 705 633 1295 29
+80 59 161 66 180 17 41 16 28 -14 -115 -12 -55 -24 -114 -26 -131 -18 -104
+-46 -274 -50 -304 -3 -19 -7 -44 -9 -55 -3 -11 -8 -42 -12 -70 -5 -27 -9 -52
+-10 -55 -1 -3 -5 -34 -9 -70 -5 -36 -10 -72 -11 -80 -2 -8 -6 -44 -10 -80 -4
+-36 -9 -73 -10 -82 -24 -121 -22 -299 3 -369 26 -76 90 -167 151 -218 65 -54
+199 -116 283 -130 84 -14 132 -4 236 48 155 78 309 210 565 485 l65 70 1 -60
+c3 -212 132 -378 383 -493 147 -67 251 -90 434 -96 144 -4 282 20 404 72 70
+30 86 38 164 85 43 27 101 58 130 70 80 34 178 102 236 165 93 103 205 288
+225 375 6 22 3 27 -17 30 -12 2 -39 0 -58 -5 -31 -8 -40 -19 -87 -105 -120
+-221 -314 -431 -483 -524 -114 -62 -298 -87 -399 -53 -104 34 -180 132 -220
+285 -26 101 -22 311 9 450 11 52 23 105 26 118 10 50 58 189 82 241 71 155
+183 227 241 157 20 -23 18 -163 -4 -261 -56 -262 -154 -450 -287 -550 -71 -54
+-60 -73 27 -48 167 47 235 72 368 136 197 95 348 216 402 322 93 184 -27 371
+-291 453 -186 57 -388 48 -593 -28 -30 -11 -56 -18 -58 -17 -1 2 24 47 57 101
+33 53 60 101 60 106 0 6 5 10 10 10 6 0 10 4 10 9 0 5 28 57 62 117 122 215
+214 422 288 644 124 374 136 570 49 756 -52 112 -125 175 -259 222 -213 76
+-421 111 -450 77z"/>
+</g>
+</svg>

+ 20 - 0
public/site.webmanifest

@@ -0,0 +1,20 @@
+{
+    "name": "Wekan",
+    "short_name": "Wekan",
+    "icons": [
+        {
+            "src": "/android-chrome-192x192.png",
+            "sizes": "192x192",
+            "type": "image/png"
+        },
+        {
+            "src": "/android-chrome-512x512.png",
+            "sizes": "512x512",
+            "type": "image/png"
+        }
+    ],
+    "theme_color": "#ffffff",
+    "background_color": "#ffffff",
+    "start_url": "/sign-in",
+    "display": "standalone"
+}

+ 41 - 0
public/svg-etc/manifest.json

@@ -0,0 +1,41 @@
+{
+  "name": "Wekan",
+  "short_name": "Wekan",
+  "description": "Open-Source kanban",
+  "icons": [
+    {
+      "src": "wekan-logo-150.png",
+      "sizes": "150x150",
+      "type": "image/png"
+    },
+    {
+      "src": "wekan-logo-150.svg",
+      "sizes": "150x150",
+      "type": "image/svg+xml"
+    },
+    {
+      "src": "wekan-logo-256.png",
+      "sizes": "256x256",
+      "type": "image/png"
+    },
+    {
+      "src": "wekan-logo-256.svg",
+      "sizes": "256x256",
+      "type": "image/svg+xml"
+    },
+    {
+      "src": "wekan-logo-512.png",
+      "sizes": "512x512",
+      "type": "image/png"
+    },
+    {
+      "src": "wekan-logo-512.svg",
+      "sizes": "512x512",
+      "type": "image/svg+xml"
+    }
+  ],
+  "display": "fullscreen",
+  "background_color": "#dedede",
+  "theme_color": "#dedede",
+  "start_url": "/"
+}

+ 0 - 0
public/wekan-favicon.png → public/svg-etc/wekan-favicon.png


+ 0 - 0
public/wekan-logo-150.png → public/svg-etc/wekan-logo-150.png


+ 0 - 0
public/wekan-logo-150.svg → public/svg-etc/wekan-logo-150.svg


BIN
public/svg-etc/wekan-logo-256.png


File diff suppressed because it is too large
+ 182 - 0
public/svg-etc/wekan-logo-256.svg


BIN
public/svg-etc/wekan-logo-32.png


BIN
public/svg-etc/wekan-logo-512.png


File diff suppressed because it is too large
+ 179 - 0
public/svg-etc/wekan-logo-512.svg


+ 0 - 22
public/wekan-manifest.json

@@ -1,22 +0,0 @@
-{
-  "name": "Wekan",
-  "short_name": "Wekan",
-  "description": "The open-source kanban",
-  "lang": "en-US",
-  "icons": [
-    {
-      "src": "/wekan-logo-150.png",
-      "type": "image/png",
-      "sizes": "150x150"
-    },
-    {
-      "src": "/wekan-logo-150.svg",
-      "type": "image/svg+xml",
-      "sizes": "150x150"
-    }
-  ],
-  "display": "standalone",
-  "background_color": "#dedede",
-  "theme_color": "#dedede",
-  "start_url": "/"
-}

Some files were not shown because too many files changed in this diff