about summary refs log tree commit diff stats
path: root/js
diff options
context:
space:
mode:
authorelioat <hi@eli.li>2024-01-15 18:55:08 -0500
committerelioat <hi@eli.li>2024-01-15 18:55:08 -0500
commit16224d4e55133737c2ae5a4959b307d372ac7706 (patch)
treee876596613d0f1649ea67df070c53c99a31fa510 /js
parent8a375e3797fbda8cbd738c3e5343880cc5a7ee0f (diff)
downloadtour-16224d4e55133737c2ae5a4959b307d372ac7706.tar.gz
*
Diffstat (limited to 'js')
-rw-r--r--js/inknswitch/android-icon-144x144.pngbin0 -> 12744 bytes
-rw-r--r--js/inknswitch/android-icon-192x192.pngbin0 -> 17828 bytes
-rw-r--r--js/inknswitch/android-icon-36x36.pngbin0 -> 2356 bytes
-rw-r--r--js/inknswitch/android-icon-48x48.pngbin0 -> 3184 bytes
-rw-r--r--js/inknswitch/android-icon-72x72.pngbin0 -> 4919 bytes
-rw-r--r--js/inknswitch/android-icon-96x96.pngbin0 -> 7235 bytes
-rw-r--r--js/inknswitch/apple-icon-114x114.pngbin0 -> 9087 bytes
-rw-r--r--js/inknswitch/apple-icon-120x120.pngbin0 -> 9825 bytes
-rw-r--r--js/inknswitch/apple-icon-144x144.pngbin0 -> 12744 bytes
-rw-r--r--js/inknswitch/apple-icon-152x152.pngbin0 -> 13912 bytes
-rw-r--r--js/inknswitch/apple-icon-180x180.pngbin0 -> 17779 bytes
-rw-r--r--js/inknswitch/apple-icon-57x57.pngbin0 -> 3736 bytes
-rw-r--r--js/inknswitch/apple-icon-60x60.pngbin0 -> 3993 bytes
-rw-r--r--js/inknswitch/apple-icon-72x72.pngbin0 -> 4919 bytes
-rw-r--r--js/inknswitch/apple-icon-76x76.pngbin0 -> 5281 bytes
-rw-r--r--js/inknswitch/apple-icon-precomposed.pngbin0 -> 18370 bytes
-rw-r--r--js/inknswitch/apple-icon.pngbin0 -> 18370 bytes
-rw-r--r--js/inknswitch/browserconfig.xml2
-rw-r--r--js/inknswitch/favicon-16x16.pngbin0 -> 1349 bytes
-rw-r--r--js/inknswitch/favicon-32x32.pngbin0 -> 2168 bytes
-rw-r--r--js/inknswitch/favicon-96x96.pngbin0 -> 7235 bytes
-rw-r--r--js/inknswitch/favicon.icobin0 -> 1150 bytes
-rw-r--r--js/inknswitch/index.html17
-rw-r--r--js/inknswitch/ink.js10
-rw-r--r--js/inknswitch/manifest.json47
-rw-r--r--js/inknswitch/ms-icon-144x144.pngbin0 -> 12744 bytes
-rw-r--r--js/inknswitch/ms-icon-150x150.pngbin0 -> 13521 bytes
-rw-r--r--js/inknswitch/ms-icon-310x310.pngbin0 -> 38419 bytes
-rw-r--r--js/inknswitch/ms-icon-70x70.pngbin0 -> 4760 bytes
-rw-r--r--js/inknswitch/sw.js19
30 files changed, 95 insertions, 0 deletions
diff --git a/js/inknswitch/android-icon-144x144.png b/js/inknswitch/android-icon-144x144.png
new file mode 100644
index 0000000..8cbc256
--- /dev/null
+++ b/js/inknswitch/android-icon-144x144.png
Binary files differdiff --git a/js/inknswitch/android-icon-192x192.png b/js/inknswitch/android-icon-192x192.png
new file mode 100644
index 0000000..ee4e6ba
--- /dev/null
+++ b/js/inknswitch/android-icon-192x192.png
Binary files differdiff --git a/js/inknswitch/android-icon-36x36.png b/js/inknswitch/android-icon-36x36.png
new file mode 100644
index 0000000..6e00986
--- /dev/null
+++ b/js/inknswitch/android-icon-36x36.png
Binary files differdiff --git a/js/inknswitch/android-icon-48x48.png b/js/inknswitch/android-icon-48x48.png
new file mode 100644
index 0000000..fa33ab9
--- /dev/null
+++ b/js/inknswitch/android-icon-48x48.png
Binary files differdiff --git a/js/inknswitch/android-icon-72x72.png b/js/inknswitch/android-icon-72x72.png
new file mode 100644
index 0000000..562df81
--- /dev/null
+++ b/js/inknswitch/android-icon-72x72.png
Binary files differdiff --git a/js/inknswitch/android-icon-96x96.png b/js/inknswitch/android-icon-96x96.png
new file mode 100644
index 0000000..6124fa5
--- /dev/null
+++ b/js/inknswitch/android-icon-96x96.png
Binary files differdiff --git a/js/inknswitch/apple-icon-114x114.png b/js/inknswitch/apple-icon-114x114.png
new file mode 100644
index 0000000..8fdb7e2
--- /dev/null
+++ b/js/inknswitch/apple-icon-114x114.png
Binary files differdiff --git a/js/inknswitch/apple-icon-120x120.png b/js/inknswitch/apple-icon-120x120.png
new file mode 100644
index 0000000..6f3d517
--- /dev/null
+++ b/js/inknswitch/apple-icon-120x120.png
Binary files differdiff --git a/js/inknswitch/apple-icon-144x144.png b/js/inknswitch/apple-icon-144x144.png
new file mode 100644
index 0000000..8cbc256
--- /dev/null
+++ b/js/inknswitch/apple-icon-144x144.png
Binary files differdiff --git a/js/inknswitch/apple-icon-152x152.png b/js/inknswitch/apple-icon-152x152.png
new file mode 100644
index 0000000..143a65b
--- /dev/null
+++ b/js/inknswitch/apple-icon-152x152.png
Binary files differdiff --git a/js/inknswitch/apple-icon-180x180.png b/js/inknswitch/apple-icon-180x180.png
new file mode 100644
index 0000000..05b1455
--- /dev/null
+++ b/js/inknswitch/apple-icon-180x180.png
Binary files differdiff --git a/js/inknswitch/apple-icon-57x57.png b/js/inknswitch/apple-icon-57x57.png
new file mode 100644
index 0000000..c9ff47c
--- /dev/null
+++ b/js/inknswitch/apple-icon-57x57.png
Binary files differdiff --git a/js/inknswitch/apple-icon-60x60.png b/js/inknswitch/apple-icon-60x60.png
new file mode 100644
index 0000000..01ff46f
--- /dev/null
+++ b/js/inknswitch/apple-icon-60x60.png
Binary files differdiff --git a/js/inknswitch/apple-icon-72x72.png b/js/inknswitch/apple-icon-72x72.png
new file mode 100644
index 0000000..562df81
--- /dev/null
+++ b/js/inknswitch/apple-icon-72x72.png
Binary files differdiff --git a/js/inknswitch/apple-icon-76x76.png b/js/inknswitch/apple-icon-76x76.png
new file mode 100644
index 0000000..81428bf
--- /dev/null
+++ b/js/inknswitch/apple-icon-76x76.png
Binary files differdiff --git a/js/inknswitch/apple-icon-precomposed.png b/js/inknswitch/apple-icon-precomposed.png
new file mode 100644
index 0000000..4daec91
--- /dev/null
+++ b/js/inknswitch/apple-icon-precomposed.png
Binary files differdiff --git a/js/inknswitch/apple-icon.png b/js/inknswitch/apple-icon.png
new file mode 100644
index 0000000..4daec91
--- /dev/null
+++ b/js/inknswitch/apple-icon.png
Binary files differdiff --git a/js/inknswitch/browserconfig.xml b/js/inknswitch/browserconfig.xml
new file mode 100644
index 0000000..c554148
--- /dev/null
+++ b/js/inknswitch/browserconfig.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
\ No newline at end of file
diff --git a/js/inknswitch/favicon-16x16.png b/js/inknswitch/favicon-16x16.png
new file mode 100644
index 0000000..f392be2
--- /dev/null
+++ b/js/inknswitch/favicon-16x16.png
Binary files differdiff --git a/js/inknswitch/favicon-32x32.png b/js/inknswitch/favicon-32x32.png
new file mode 100644
index 0000000..797a845
--- /dev/null
+++ b/js/inknswitch/favicon-32x32.png
Binary files differdiff --git a/js/inknswitch/favicon-96x96.png b/js/inknswitch/favicon-96x96.png
new file mode 100644
index 0000000..6124fa5
--- /dev/null
+++ b/js/inknswitch/favicon-96x96.png
Binary files differdiff --git a/js/inknswitch/favicon.ico b/js/inknswitch/favicon.ico
new file mode 100644
index 0000000..2bfc677
--- /dev/null
+++ b/js/inknswitch/favicon.ico
Binary files differdiff --git a/js/inknswitch/index.html b/js/inknswitch/index.html
index 3f4fbda..4c62315 100644
--- a/js/inknswitch/index.html
+++ b/js/inknswitch/index.html
@@ -4,6 +4,23 @@
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <title>ink n switch</title>
+    <link rel="apple-touch-icon" sizes="57x57" href="./apple-icon-57x57.png">
+    <link rel="apple-touch-icon" sizes="60x60" href="./apple-icon-60x60.png">
+    <link rel="apple-touch-icon" sizes="72x72" href="./apple-icon-72x72.png">
+    <link rel="apple-touch-icon" sizes="76x76" href="./apple-icon-76x76.png">
+    <link rel="apple-touch-icon" sizes="114x114" href="./apple-icon-114x114.png">
+    <link rel="apple-touch-icon" sizes="120x120" href="./apple-icon-120x120.png">
+    <link rel="apple-touch-icon" sizes="144x144" href="./apple-icon-144x144.png">
+    <link rel="apple-touch-icon" sizes="152x152" href="./apple-icon-152x152.png">
+    <link rel="apple-touch-icon" sizes="180x180" href="./apple-icon-180x180.png">
+    <link rel="icon" type="image/png" sizes="192x192"  href="./android-icon-192x192.png">
+    <link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png">
+    <link rel="icon" type="image/png" sizes="96x96" href="./favicon-96x96.png">
+    <link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png">
+    <meta name="msapplication-TileColor" content="#ffffff">
+    <meta name="msapplication-TileImage" content="./ms-icon-144x144.png">
+    <meta name="theme-color" content="#ffffff">
+    <link rel="manifest" href="./manifest.json">
     <style>
         @font-face {
             font-family: 'Shantell Sans';
diff --git a/js/inknswitch/ink.js b/js/inknswitch/ink.js
index b9fc758..dbfa0e4 100644
--- a/js/inknswitch/ink.js
+++ b/js/inknswitch/ink.js
@@ -1,3 +1,13 @@
+if ('serviceWorker' in navigator) {
+    navigator.serviceWorker.register('./sw.js')
+    .then(function(registration) {
+      console.log('Service Worker registered with scope:', registration.scope);
+    })
+    .catch(function(err) {
+      console.log('Service Worker registration failed:', err);
+    });
+  }
+
 document.getElementById('noteArea').focus(); // ensures that textarea is focused when the page loads
 
 const canvas = document.getElementById('drawingArea');
diff --git a/js/inknswitch/manifest.json b/js/inknswitch/manifest.json
new file mode 100644
index 0000000..6d136bc
--- /dev/null
+++ b/js/inknswitch/manifest.json
@@ -0,0 +1,47 @@
+{
+    "name": "ink n switch",
+    "short_name": "App",
+    "description": "a toy for taking notes and drawing pictures",
+    "start_url": ".\/index.html",
+    "display": "standalone",
+    "background_color": "#fff",
+    "theme_color": "#3f51b5",
+    "icons": [
+      {
+       "src": ".\/android-icon-36x36.png",
+       "sizes": "36x36",
+       "type": "image\/png",
+       "density": "0.75"
+      },
+      {
+       "src": ".\/android-icon-48x48.png",
+       "sizes": "48x48",
+       "type": "image\/png",
+       "density": "1.0"
+      },
+      {
+       "src": ".\/android-icon-72x72.png",
+       "sizes": "72x72",
+       "type": "image\/png",
+       "density": "1.5"
+      },
+      {
+       "src": ".\/android-icon-96x96.png",
+       "sizes": "96x96",
+       "type": "image\/png",
+       "density": "2.0"
+      },
+      {
+       "src": ".\/android-icon-144x144.png",
+       "sizes": "144x144",
+       "type": "image\/png",
+       "density": "3.0"
+      },
+      {
+       "src": ".\/android-icon-192x192.png",
+       "sizes": "192x192",
+       "type": "image\/png",
+       "density": "4.0"
+      }
+     ]
+  }
\ No newline at end of file
diff --git a/js/inknswitch/ms-icon-144x144.png b/js/inknswitch/ms-icon-144x144.png
new file mode 100644
index 0000000..8cbc256
--- /dev/null
+++ b/js/inknswitch/ms-icon-144x144.png
Binary files differdiff --git a/js/inknswitch/ms-icon-150x150.png b/js/inknswitch/ms-icon-150x150.png
new file mode 100644
index 0000000..eb5da61
--- /dev/null
+++ b/js/inknswitch/ms-icon-150x150.png
Binary files differdiff --git a/js/inknswitch/ms-icon-310x310.png b/js/inknswitch/ms-icon-310x310.png
new file mode 100644
index 0000000..9ce0ac1
--- /dev/null
+++ b/js/inknswitch/ms-icon-310x310.png
Binary files differdiff --git a/js/inknswitch/ms-icon-70x70.png b/js/inknswitch/ms-icon-70x70.png
new file mode 100644
index 0000000..02608a7
--- /dev/null
+++ b/js/inknswitch/ms-icon-70x70.png
Binary files differdiff --git a/js/inknswitch/sw.js b/js/inknswitch/sw.js
new file mode 100644
index 0000000..052c0a4
--- /dev/null
+++ b/js/inknswitch/sw.js
@@ -0,0 +1,19 @@
+self.addEventListener('install', function(event) {
+    event.waitUntil(
+      caches.open('inknswitch').then(function(cache) {
+        return cache.addAll([
+          './index.html',
+          './ink.js',
+          './icon.png'
+        ]);
+      })
+    );
+  });
+  
+  self.addEventListener('fetch', function(event) {
+    event.respondWith(
+      caches.match(event.request).then(function(response) {
+        return response || fetch(event.request);
+      })
+    );
+  });
\ No newline at end of file