add missing pieces so Chrome sees an installable PWA

This commit is contained in:
Jesse D. McDonald 2020-04-11 18:12:19 -05:00
parent 3010e4bb84
commit cc083e4d52
11 changed files with 277 additions and 7 deletions

View File

@ -4,7 +4,11 @@
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<link rel="manifest" href="<%=require('./manifest.js')%>">
<meta name="application-name" content="Paco Ŝako">
<link rel="icon" sizes="160x160" type="image/png" href="<%=require('./png/pacosako-logo.png')%>">
<link rel="icon" sizes="64x64" type="image/png" href="<%=require('./png/pacosako-logo-64x64.png')%>">
<link rel="icon" sizes="128x128" type="image/png" href="<%=require('./png/pacosako-logo-128x128.png')%>">
<link rel="icon" sizes="192x192" type="image/png" href="<%=require('./png/pacosako-logo-192x192.png')%>">
<link rel="icon" sizes="256x256" type="image/png" href="<%=require('./png/pacosako-logo-256x256.png')%>">
<link rel="icon" sizes="512x512" type="image/png" href="<%=require('./png/pacosako-logo-512x512.png')%>">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto|Vollkorn:700&display=swap">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
@ -244,7 +248,7 @@
</div>
<div class="badges">
<div class="badge official-badge"><a href="https://pacosako.com/" target="_blank"><img src="<%=require('./png/pacosako-logo.png')%>" alt="Official Site" title="Official Site"></a></div>
<div class="badge official-badge"><a href="https://pacosako.com/" target="_blank"><img src="<%=require('./svg/pacosako-logo.svg')%>" alt="Official Site" title="Official Site"></a></div>
<div class="badge gogs-badge"><a href="https://jessemcdonald.info/gogs/nybble/paco_sako" target="_blank"><img src="<%=require('./png/gogs.png')%>" alt="Source Code" title="Source Code"></a></div>
</div>

View File

@ -660,10 +660,10 @@ $(function (){
}
try {
navigator.serviceWorker.register('sw.js').catch(disableNotify);
if (Notification.permission === 'denied') {
disableNotify();
} else {
navigator.serviceWorker.register('sw.js').catch(disableNotify);
}
} catch (err) {
disableNotify();

View File

@ -1,4 +1,8 @@
const icon = require('./png/pacosako-logo.png');
const icon64 = require('./png/pacosako-logo-64x64.png');
const icon128 = require('./png/pacosako-logo-128x128.png');
const icon192 = require('./png/pacosako-logo-192x192.png');
const icon256 = require('./png/pacosako-logo-256x256.png');
const icon512 = require('./png/pacosako-logo-512x512.png');
module.exports = JSON.stringify({
"lang": "en-US",
@ -7,8 +11,28 @@ module.exports = JSON.stringify({
"description": "Play the Paco Ŝake variant of Chess online",
"icons": [
{
"src": icon,
"sizes": "160x160",
"src": icon64,
"sizes": "64x64",
"type": "image/png",
},
{
"src": icon128,
"sizes": "128x128",
"type": "image/png",
},
{
"src": icon192,
"sizes": "192x192",
"type": "image/png",
},
{
"src": icon256,
"sizes": "256x256",
"type": "image/png",
},
{
"src": icon512,
"sizes": "512x512",
"type": "image/png",
},
],

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
png/pacosako-logo-64x64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

235
svg/pacosako-logo.svg Normal file
View File

@ -0,0 +1,235 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg2"
width="213.33333"
height="213.33333"
viewBox="0 0 213.33333 213.33333"
sodipodi:docname="pacosako-logo.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
inkscape:export-filename="/home/nybble/home/src/js/paco_sako/png/pacosako-logo-16x16.png"
inkscape:export-xdpi="7.1999998"
inkscape:export-ydpi="7.1999998">
<metadata
id="metadata8">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs6">
<inkscape:path-effect
effect="mirror_symmetry"
start_point="106.596,93.333328"
end_point="106.6,163.33333"
center_point="106.598,128.33333"
id="path-effect4848"
is_visible="true"
mode="free"
discard_orig_path="false"
fuse_paths="false"
oposite_fuse="false" />
<inkscape:path-effect
effect="mirror_symmetry"
start_point="106.596,23.333328"
end_point="106.6,163.33333"
center_point="106.598,93.333329"
id="path-effect4839"
is_visible="true"
mode="free"
discard_orig_path="false"
fuse_paths="false"
oposite_fuse="false" />
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Colorize"
id="filter4628">
<feColorMatrix
values="0.471204 0 0 0 0.264398 0 0.471204 0 0 0.264398 0 0 0.471204 0 0.264398 0 0 0 1 0"
id="feColorMatrix4626"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix4630" />
<feColorMatrix
id="feColorMatrix4632"
values="0.4712 0 0 0 0.2644 0 0.4712 0 0 0.2644 0 0 0.4712 0 0.2644 0 0 0 1 0"
in="fbSourceGraphic"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix4746" />
<feComposite
in2="fbSourceGraphic"
id="feComposite4748"
operator="arithmetic"
k1="0"
k2="1.8"
result="composite1"
in="fbSourceGraphic"
k3="0"
k4="0" />
<feColorMatrix
id="feColorMatrix4750"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood4752"
flood-opacity="1"
flood-color="rgb(158,67,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend4754"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend4756"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix4758"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite4760"
in="colormatrix2"
operator="in"
result="composite2" />
</filter>
</defs>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="999"
id="namedview4"
showgrid="false"
inkscape:pagecheckerboard="true"
inkscape:snap-global="false"
inkscape:zoom="2.8284271"
inkscape:cx="43.81999"
inkscape:cy="116.6636"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer3" />
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="Background"
style="display:inline"
sodipodi:insensitive="true">
<path
style="opacity:1;vector-effect:none;fill:#040404;fill-opacity:1;stroke:none;stroke-width:2.66666675;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
d="m 63.785156,16.775391 a 96.291519,96.291519 0 0 0 -53.302734,86.124999 96.291519,96.291519 0 0 0 96.291018,96.29102 96.291519,96.291519 0 0 0 96.29101,-96.29102 96.291519,96.291519 0 0 0 -51.42187,-85.128906 92.25,92.25 0 0 1 47.38086,80.5625 92.25,92.25 0 0 1 -92.25,92.249996 A 92.25,92.25 0 0 1 14.523438,98.333984 92.25,92.25 0 0 1 63.785156,16.775391 Z"
id="path4765"
inkscape:connector-curvature="0" />
<g
id="g4932">
<path
inkscape:connector-curvature="0"
id="path4771"
d="m 106.875,14.083984 a 84.375,84.375 0 0 0 -1.80859,0.08984 48.030132,43.212715 0 0 1 1.80859,0.08203 v 84.203125 1.896481 82.16992 a 54.999996,46.125 0 0 0 4.375,0.18359 54.999996,46.125 0 0 0 55,-46.125 54.999996,46.125 0 0 0 -24.13672,-38.124991 H 191.25 a 84.375,84.375 0 0 0 -84.375,-84.375 z M 87.892578,16.332031 A 84.375,84.375 0 0 0 22.5,98.458984 H 88.613281 A 48.030132,43.212715 0 0 1 55.023438,57.296875 48.030132,43.212715 0 0 1 87.892578,16.332031 Z"
style="opacity:1;vector-effect:none;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.66666675;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
<path
inkscape:connector-curvature="0"
id="path4806"
d="m 22.5,98.333984 a 84.375,84.375 0 0 0 84.375,84.374996 V 98.333984 Z"
style="opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2.66666675;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
<circle
r="84.375"
cy="98.458328"
cx="106.875"
id="path4771-3"
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
</g>
</g>
<g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="Pawn"
style="display:inline;opacity:1"
sodipodi:insensitive="true">
<g
id="g4927">
<path
inkscape:connector-curvature="0"
id="path4880"
d="m 107.07454,39.738281 c -6.8e-4,0 -0.001,0 -0.002,0 -13.611689,3.89e-4 -21.389202,12.729487 -21.388677,21.921875 5.25e-4,9.192389 8.747792,20.416566 18.384767,20.416016 -0.0883,2.651655 -0.88347,5.03979 -4.242189,5.570312 -3.35873,0.530522 -22.361626,1.326103 -22.361328,6.541016 2.98e-4,5.214913 13.347228,5.745319 17.236328,5.92188 3.8891,0.17655 3.534329,3.3578 0.175781,7.07031 -3.358548,3.7125 -8.213001,7.55418 -12.373046,10.2539 -4.160047,2.69974 -9.191518,5.56914 -9.191407,7.51368 1.12e-4,1.94454 2.473578,1.67846 1.94336,3.62304 -0.530219,1.94457 -11.488875,6.188 -9.013672,12.02149 2.475204,5.83349 18.384926,18.4717 40.832033,18.4707 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path4837"
d="M 106.675,39.738281 V 159.0625 c 22.4471,0 38.35716,-12.63903 40.83203,-18.47266 2.47487,-5.83363 -8.48529,-10.07694 -9.01562,-12.02148 -0.53033,-1.94455 1.94531,-1.67851 1.94531,-3.62305 0,-1.94454 -5.03316,-4.81417 -9.19336,-7.51367 -4.1602,-2.69949 -9.01429,-6.53964 -12.37305,-10.25195 -3.35876,-3.71231 -3.71331,-6.89549 0.17578,-7.07227 3.88909,-0.176773 17.23633,-0.70696 17.23633,-5.921873 0,-5.214913 -19.00452,-6.010686 -22.36328,-6.541016 -3.35875,-0.53033 -4.15379,-2.916709 -4.24219,-5.568359 9.63697,0 18.38477,-11.22558 18.38477,-20.417969 0,-9.191929 -7.7763,-21.919041 -21.38672,-21.919922 z"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path4889"
d="M 107.07454,41.505859 A 16.484426,19.401241 0 0 0 90.590163,60.908203 16.484426,19.401241 0 0 0 107.07454,80.308594 Z"
style="opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
<path
inkscape:connector-curvature="0"
id="path4842"
d="M 106.675,41.505859 V 80.308594 A 16.484426,19.401241 0 0 0 123.15938,60.908203 16.484426,19.401241 0 0 0 106.675,41.505859 Z"
style="opacity:1;vector-effect:none;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
<path
inkscape:connector-curvature="0"
id="path4898"
d="m 107.07454,89.412109 a 21.124815,4.1100578 0 0 0 -21.125002,4.111329 21.124815,4.1100578 0 0 0 21.125002,4.109374 z"
style="opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
<path
inkscape:connector-curvature="0"
id="path4844"
d="m 106.675,89.412109 v 8.220703 A 21.124815,4.1100578 0 0 0 127.8,93.523438 21.124815,4.1100578 0 0 0 106.675,89.412109 Z"
style="opacity:1;vector-effect:none;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
<path
inkscape:connector-curvature="0"
id="path4909"
d="m 107.07259,100.28516 c -3.97744,0.26562 -3.88596,7.24215 -8.218755,15.99804 -4.332789,8.75587 -15.289285,11.22733 -15.289063,13.17188 2.22e-4,1.94454 1.32599,1.50276 1.326172,3.09375 1.81e-4,1.59099 -6.62938,3.44731 -6.628906,7.60156 4.75e-4,4.15378 10.99171,14.60121 28.810552,14.60156 z"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path4846"
d="m 106.675,100.28516 v 18.15625 l 0.004,36.31054 c 17.81883,-0.002 28.80859,-10.44973 28.80859,-14.60351 0,-4.15425 -6.62891,-6.01057 -6.62891,-7.60156 0,-1.591 1.32618,-1.14922 1.32618,-3.09376 0,-1.94455 -10.95723,-4.41454 -15.29102,-13.16992 -4.33306,-8.7539 -4.24333,-15.73064 -8.21875,-15.99804 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
</g>
<path
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 106.875,100.28516 c -6.7e-4,-5e-5 -0.001,4e-5 -0.002,0 l 0.002,18.15625 z"
id="path4907"
inkscape:connector-curvature="0" />
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

7
sw.js
View File

@ -0,0 +1,7 @@
self.addEventListener('fetch', function(event) {
event.respondWith(
fetch(event.request).catch(function() {
return caches.match(event.request);
})
);
});