diff --git a/icons/apple-icon-180.png b/icons/apple-icon-180.png new file mode 100644 index 0000000..f6aba50 Binary files /dev/null and b/icons/apple-icon-180.png differ diff --git a/icons/apple-splash-1125-2436.jpg b/icons/apple-splash-1125-2436.jpg new file mode 100644 index 0000000..5d2e277 Binary files /dev/null and b/icons/apple-splash-1125-2436.jpg differ diff --git a/icons/apple-splash-1136-640.jpg b/icons/apple-splash-1136-640.jpg new file mode 100644 index 0000000..02fa8a9 Binary files /dev/null and b/icons/apple-splash-1136-640.jpg differ diff --git a/icons/apple-splash-1170-2532.jpg b/icons/apple-splash-1170-2532.jpg new file mode 100644 index 0000000..ac230e9 Binary files /dev/null and b/icons/apple-splash-1170-2532.jpg differ diff --git a/icons/apple-splash-1179-2556.jpg b/icons/apple-splash-1179-2556.jpg new file mode 100644 index 0000000..1c0661d Binary files /dev/null and b/icons/apple-splash-1179-2556.jpg differ diff --git a/icons/apple-splash-1242-2208.jpg b/icons/apple-splash-1242-2208.jpg new file mode 100644 index 0000000..8d1abb5 Binary files /dev/null and b/icons/apple-splash-1242-2208.jpg differ diff --git a/icons/apple-splash-1242-2688.jpg b/icons/apple-splash-1242-2688.jpg new file mode 100644 index 0000000..a7e886f Binary files /dev/null and b/icons/apple-splash-1242-2688.jpg differ diff --git a/icons/apple-splash-1284-2778.jpg b/icons/apple-splash-1284-2778.jpg new file mode 100644 index 0000000..0aa7c0d Binary files /dev/null and b/icons/apple-splash-1284-2778.jpg differ diff --git a/icons/apple-splash-1290-2796.jpg b/icons/apple-splash-1290-2796.jpg new file mode 100644 index 0000000..8c8e0e8 Binary files /dev/null and b/icons/apple-splash-1290-2796.jpg differ diff --git a/icons/apple-splash-1334-750.jpg b/icons/apple-splash-1334-750.jpg new file mode 100644 index 0000000..2c46fdf Binary files /dev/null and b/icons/apple-splash-1334-750.jpg differ diff --git a/icons/apple-splash-1536-2048.jpg b/icons/apple-splash-1536-2048.jpg new file mode 100644 index 0000000..25c379f Binary files /dev/null and b/icons/apple-splash-1536-2048.jpg differ diff --git a/icons/apple-splash-1620-2160.jpg b/icons/apple-splash-1620-2160.jpg new file mode 100644 index 0000000..98fc8ad Binary files /dev/null and b/icons/apple-splash-1620-2160.jpg differ diff --git a/icons/apple-splash-1668-2224.jpg b/icons/apple-splash-1668-2224.jpg new file mode 100644 index 0000000..f349ebc Binary files /dev/null and b/icons/apple-splash-1668-2224.jpg differ diff --git a/icons/apple-splash-1668-2388.jpg b/icons/apple-splash-1668-2388.jpg new file mode 100644 index 0000000..8b271ff Binary files /dev/null and b/icons/apple-splash-1668-2388.jpg differ diff --git a/icons/apple-splash-1792-828.jpg b/icons/apple-splash-1792-828.jpg new file mode 100644 index 0000000..3997412 Binary files /dev/null and b/icons/apple-splash-1792-828.jpg differ diff --git a/icons/apple-splash-2048-1536.jpg b/icons/apple-splash-2048-1536.jpg new file mode 100644 index 0000000..8e83a8d Binary files /dev/null and b/icons/apple-splash-2048-1536.jpg differ diff --git a/icons/apple-splash-2048-2732.jpg b/icons/apple-splash-2048-2732.jpg new file mode 100644 index 0000000..8ac1975 Binary files /dev/null and b/icons/apple-splash-2048-2732.jpg differ diff --git a/icons/apple-splash-2160-1620.jpg b/icons/apple-splash-2160-1620.jpg new file mode 100644 index 0000000..e7afbda Binary files /dev/null and b/icons/apple-splash-2160-1620.jpg differ diff --git a/icons/apple-splash-2208-1242.jpg b/icons/apple-splash-2208-1242.jpg new file mode 100644 index 0000000..0bbd212 Binary files /dev/null and b/icons/apple-splash-2208-1242.jpg differ diff --git a/icons/apple-splash-2224-1668.jpg b/icons/apple-splash-2224-1668.jpg new file mode 100644 index 0000000..c9ae2b8 Binary files /dev/null and b/icons/apple-splash-2224-1668.jpg differ diff --git a/icons/apple-splash-2388-1668.jpg b/icons/apple-splash-2388-1668.jpg new file mode 100644 index 0000000..46659c9 Binary files /dev/null and b/icons/apple-splash-2388-1668.jpg differ diff --git a/icons/apple-splash-2436-1125.jpg b/icons/apple-splash-2436-1125.jpg new file mode 100644 index 0000000..de66a6e Binary files /dev/null and b/icons/apple-splash-2436-1125.jpg differ diff --git a/icons/apple-splash-2532-1170.jpg b/icons/apple-splash-2532-1170.jpg new file mode 100644 index 0000000..6e1cb54 Binary files /dev/null and b/icons/apple-splash-2532-1170.jpg differ diff --git a/icons/apple-splash-2556-1179.jpg b/icons/apple-splash-2556-1179.jpg new file mode 100644 index 0000000..5f145d5 Binary files /dev/null and b/icons/apple-splash-2556-1179.jpg differ diff --git a/icons/apple-splash-2688-1242.jpg b/icons/apple-splash-2688-1242.jpg new file mode 100644 index 0000000..9cebf7d Binary files /dev/null and b/icons/apple-splash-2688-1242.jpg differ diff --git a/icons/apple-splash-2732-2048.jpg b/icons/apple-splash-2732-2048.jpg new file mode 100644 index 0000000..7b764bb Binary files /dev/null and b/icons/apple-splash-2732-2048.jpg differ diff --git a/icons/apple-splash-2778-1284.jpg b/icons/apple-splash-2778-1284.jpg new file mode 100644 index 0000000..d185674 Binary files /dev/null and b/icons/apple-splash-2778-1284.jpg differ diff --git a/icons/apple-splash-2796-1290.jpg b/icons/apple-splash-2796-1290.jpg new file mode 100644 index 0000000..abd8f4b Binary files /dev/null and b/icons/apple-splash-2796-1290.jpg differ diff --git a/icons/apple-splash-640-1136.jpg b/icons/apple-splash-640-1136.jpg new file mode 100644 index 0000000..5eb827e Binary files /dev/null and b/icons/apple-splash-640-1136.jpg differ diff --git a/icons/apple-splash-750-1334.jpg b/icons/apple-splash-750-1334.jpg new file mode 100644 index 0000000..ce3e427 Binary files /dev/null and b/icons/apple-splash-750-1334.jpg differ diff --git a/icons/apple-splash-828-1792.jpg b/icons/apple-splash-828-1792.jpg new file mode 100644 index 0000000..1058ff3 Binary files /dev/null and b/icons/apple-splash-828-1792.jpg differ diff --git a/icons/manifest-icon-192.maskable.png b/icons/manifest-icon-192.maskable.png new file mode 100644 index 0000000..03523e1 Binary files /dev/null and b/icons/manifest-icon-192.maskable.png differ diff --git a/icons/manifest-icon-512.maskable.png b/icons/manifest-icon-512.maskable.png new file mode 100644 index 0000000..7a1d193 Binary files /dev/null and b/icons/manifest-icon-512.maskable.png differ diff --git a/index.html b/index.html index 88dd5ef..96a7fdf 100644 --- a/index.html +++ b/index.html @@ -21,9 +21,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..a3a2503 --- /dev/null +++ b/manifest.json @@ -0,0 +1,36 @@ +{ + "name": "Large Type", + "short_name": "Large Type", + "background_color": "white", + "theme_color": "white", + "description": "Display & share text in a large font.", + "display": "fullscreen", + "start_url": "index.html", + "orientation": "portrait", + "icons": [ + { + "src": "icons/manifest-icon-192.maskable.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "any" + }, + { + "src": "icons/manifest-icon-192.maskable.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/manifest-icon-512.maskable.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "any" + }, + { + "src": "icons/manifest-icon-512.maskable.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] + } \ No newline at end of file diff --git a/scripts.js b/scripts.js index 3dbffd9..e6ad37e 100644 --- a/scripts.js +++ b/scripts.js @@ -118,30 +118,33 @@ window.addEventListener('DOMContentLoaded', function() { } function initAnalytics() { - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - - ga('set', 'anonymizeIp', true); - ga('create', 'UA-37242602-2', 'auto'); - ga('send', 'pageview'); - - window.twttr = window.twttr || { - _e: [], - ready: function(f) { - this._e.push(f); - } - }; - - twttr.ready(function (twttr) { - twttr.events.bind('follow', function(event) { - ga('send', 'event', 'twitter', 'follow'); - }); - twttr.events.bind('tweet', function(event) { - ga('send', 'event', 'twitter', 'tweet'); + // this check is needed to make sure the app still works on mobile without internet connection + if (window.navigator.onLine) { + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + + ga('set', 'anonymizeIp', true); + ga('create', 'UA-37242602-2', 'auto'); + ga('send', 'pageview'); + + window.twttr = window.twttr || { + _e: [], + ready: function(f) { + this._e.push(f); + } + }; + + twttr.ready(function (twttr) { + twttr.events.bind('follow', function(event) { + ga('send', 'event', 'twitter', 'follow'); + }); + twttr.events.bind('tweet', function(event) { + ga('send', 'event', 'twitter', 'tweet'); + }); }); - }); + } } document.querySelector('.js-help-button').addEventListener('click', function(evt) { diff --git a/service-worker.js b/service-worker.js new file mode 100644 index 0000000..9ebe4e8 --- /dev/null +++ b/service-worker.js @@ -0,0 +1,8 @@ +importScripts( + 'https://storage.googleapis.com/workbox-cdn/releases/6.4.1/workbox-sw.js' +); + +workbox.routing.registerRoute( + () => true, + new workbox.strategies.CacheFirst({ cacheName: 'large-type-pwa-assets' }) +); \ No newline at end of file