Commit 793676fc authored by Tobias Zeumer's avatar Tobias Zeumer

WPA - proof of concept; see #55

parent 0305e9cd
[InternetShortcut]
URL=https://github.com/SirFaenor/pwa-skeleton
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>About</title>
<script type="text/javascript" src="app.js"></script>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="theme-color" content="#000000">
<link rel="manifest" href="manifest.json">
</head>
<body>
<p>Hello, I am the About Page.</p>
<p>
<a href="index.html">home &gt;</a>
</p>
</body>
</html>
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="512px" height="512px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"><rect width="512" height="512"/><g><path fill="#FFFFFF" d="M156.504,117.356c-1.095-20.572-2.405-45.529-2.405-63.686h-0.438 c-5.255,17.07-11.164,35.674-18.603,56.024l-26.042,71.563H94.573l-24.075-70.253c-7.002-21.01-12.686-39.827-16.848-57.333h-0.437 c-0.436,18.38-1.531,42.891-2.85,65.209l-3.938,63.25H28.267L38.548,34.63h24.297l25.162,71.339 c6.13,18.167,10.941,34.366,14.879,49.681h0.444c3.939-14.879,9.187-31.077,15.752-49.681L145.35,34.63h24.288l9.195,147.499 h-18.827L156.504,117.356z"/><path fill="#FFFFFF" d="M216.118,76.212l22.98,62.59c2.628,7.003,5.253,15.315,7.002,21.659h0.437 c1.969-6.344,4.161-14.442,6.789-22.095l21.007-62.154h20.354l-28.886,75.5c-13.794,36.325-23.203,54.707-36.334,66.305 c-9.622,8.1-18.82,11.387-23.628,12.261l-4.82-15.976c4.82-1.531,11.163-4.597,16.855-9.417 c5.248-4.152,11.593-11.592,16.19-21.446c0.871-1.968,1.53-3.501,1.53-4.587c0-1.097-0.437-2.629-1.53-5.034L195.11,76.212H216.118 z"/><path fill="#FFFFFF" d="M56.056,398.493l-15.315,46.393H21.042l50.331-147.5h22.764l50.332,147.5h-20.351l-15.761-46.393H56.056z M104.64,383.614L89.975,341.15c-3.278-9.622-5.47-18.382-7.654-26.916h-0.444c-2.182,8.534-4.374,17.729-7.44,26.701 l-14.442,42.679H104.64z"/><path fill="#FFFFFF" d="M164.897,373.546c0-13.57-0.438-24.512-0.874-34.578h17.072l1.087,18.157h0.444 c7.654-12.911,20.351-20.35,37.636-20.35c25.828,0,45.082,21.669,45.082,53.619c0,38.078-23.414,56.896-48.362,56.896 c-14.005,0-26.265-6.13-32.609-16.634h-0.438v57.557h-19.039V373.546z M183.937,401.771c0,2.853,0.223,5.473,0.875,7.878 c3.5,13.355,15.101,22.54,28.892,22.54c20.352,0,32.164-16.625,32.164-40.921c0-21.009-11.153-39.176-31.513-39.176 c-13.132,0-25.606,9.193-29.107,23.638c-0.649,2.405-1.31,5.255-1.31,7.66V401.771z"/><path fill="#FFFFFF" d="M289.481,373.546c0-13.57-0.438-24.512-0.875-34.578h17.072l1.094,18.157h0.438 c7.653-12.911,20.351-20.35,37.636-20.35c25.828,0,45.08,21.669,45.08,53.619c0,38.078-23.413,56.896-48.359,56.896 c-14.006,0-26.266-6.13-32.607-16.634h-0.437v57.557h-19.041V373.546z M308.522,401.771c0,2.853,0.223,5.473,0.87,7.878 c3.503,13.355,15.103,22.54,28.888,22.54c20.356,0,32.171-16.625,32.171-40.921c0-21.009-11.164-39.176-31.514-39.176 c-13.132,0-25.604,9.193-29.107,23.638c-0.65,2.405-1.308,5.255-1.308,7.66V401.771z"/></g></svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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="Livello_1"
x="0px"
y="0px"
width="512px"
height="512px"
viewBox="0 0 512 512"
enable-background="new 0 0 512 512"
xml:space="preserve"
sodipodi:docname="logo.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
inkscape:export-filename="T:\ProgrammePortable\!_NoSync\Seafile\Filesafe\Programme\UniServerZ\www\_tub\tub-floorplan\img\pwa\logo-4x.png"
inkscape:export-xdpi="36"
inkscape:export-ydpi="36"><metadata
id="metadata21"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs19" /><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="1027"
id="namedview17"
showgrid="false"
inkscape:zoom="0.4609375"
inkscape:cx="-611.79661"
inkscape:cy="256"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="Livello_1" /><rect
width="512"
height="512"
id="rect2"
x="-4.7683716e-07"
y="0"
style="fill:#1a1a1a" /><text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:253.33332825px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="20.231781"
y="232.10168"
id="text3728"><tspan
sodipodi:role="line"
id="tspan3726"
x="20.231781"
y="232.10168"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:253.33332825px;font-family:'Leelawadee UI';-inkscape-font-specification:'Leelawadee UI Bold';fill:#6bc1bb;fill-opacity:1">tub.</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:240px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="3.4023433"
y="427.97345"
id="text3728-2"><tspan
sodipodi:role="line"
id="tspan3726-1"
x="3.4023433"
y="427.97345"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:240px;font-family:'Leelawadee UI';-inkscape-font-specification:'Leelawadee UI Bold';fill:#6bc1bb;fill-opacity:1">map</tspan></text>
</svg>
\ No newline at end of file
......@@ -52,8 +52,8 @@
<link rel="apple-touch-icon-precomposed" href="https://www.tub.tuhh.de/wp-content/uploads/2016/02/cropped-TUB-512px-180x180.png?neverExpires" />
<!-- start WPA-Test -->
<script type="text/javascript" src="assets-pwa/app.js"></script>
<link rel="manifest" href="assets-pwa/manifest.json">
<script type="text/javascript" src="pwa-app.js"></script>
<link rel="manifest" href="pwa-manifest.json">
<script>
// test standalone mode
window.addEventListener('load', function() {
......
......@@ -9,10 +9,10 @@ if ('serviceWorker' in navigator) {
* You can call register() every time a page loads without concern;
* the browser will figure out if the service worker is already registered or not and handle it accordingly.
*/
navigator.serviceWorker.register('./serviceWorker.js', {scope : "./"} ).then(function(registration) {
navigator.serviceWorker.register('./pwa-serviceWorker.js', {scope : "./"} ).then(function(registration) {
// everything is ok
console.log('ServiceWorker registrato con successo, scope: ', registration.scope);
console.log('ServiceWorker sucessfully registered, scope: ', registration.scope);
}, function(err) {
// an error occurred
......
......@@ -3,22 +3,22 @@
"name": "tub.map - Library Floorplan",
"icons": [
{
"src": "img/logo-1x.png",
"src": "img/pwa/logo-1x.png",
"type": "image/png",
"sizes": "48x48"
},
{
"src": "img/logo-2x.png",
"src": "img/pwa/logo-2x.png",
"type": "image/png",
"sizes": "96x96"
},
{
"src": "img/logo-4x.png",
"src": "img/pwa/logo-4x.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "img/logo-large.png",
"src": "img/pwa/logo-large.png",
"type": "image/png",
"sizes": "512x512"
}
......
/**
* Cache version, change name to force reload
*/
var CACHE_VERSION = 'v1';
var CACHE_VERSION = 'v0.8.8';
/**
* Stuff to put in the cache at install
*/
var CACHE_FILES = [
'index.php',
'img/pwa/logo.svg',
'css/css-responsive-nav.css',
'css/svgWebStyle.css',
'js/tubmap.js',
'locale/en.json',
'node_modules/*',
'res/tub_floorplan.min.svg',
*/
var CACHE_FILES = [
'index.html',
'img/logo.svg'
'node_modules/jquery/dist/jquery.min.js',
'node_modules/jquery-lang-js/js/jquery-lang.js',
'node_modules/jquery.panzoom/dist/jquery.panzoom.min.js',
'node_modules/save-svg-as-png/lib/saveSvgAsPng.js',
'node_modules/jquery.mousewheel/jquery.mousewheel.js',
'res/tub_floorplan.min.svg',
'res/symbols.svg'
];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment