diff --git a/package-lock.json b/package-lock.json index 902ab0d..6352087 100644 --- a/package-lock.json +++ b/package-lock.json @@ -506,6 +506,12 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, + "ast-types": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz", + "integrity": "sha1-ECyenpAF0+fjgpvwxPok7oYu6bk=", + "dev": true + }, "async": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", @@ -1201,6 +1207,57 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", "dev": true }, + "copy-webpack-plugin": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.1.1.tgz", + "integrity": "sha512-P15M5ZC8dyCjQHWwd4Ia/dm0SgVvZJMYeykVIVYXbGyqO4dWB5oyPHp9i7wjwo5LhtlhKbiBCdS2NvM07Wlybg==", + "dev": true, + "requires": { + "cacache": "^12.0.3", + "find-cache-dir": "^2.1.0", + "glob-parent": "^3.1.0", + "globby": "^7.1.1", + "is-glob": "^4.0.1", + "loader-utils": "^1.2.3", + "minimatch": "^3.0.4", + "normalize-path": "^3.0.0", + "p-limit": "^2.2.1", + "schema-utils": "^1.0.0", + "serialize-javascript": "^2.1.2", + "webpack-log": "^2.0.0" + }, + "dependencies": { + "globby": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", + "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + } + }, + "p-limit": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", + "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -1515,6 +1572,15 @@ "randombytes": "^2.0.0" } }, + "dir-glob": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", + "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", + "dev": true, + "requires": { + "path-type": "^3.0.0" + } + }, "dns-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", @@ -1717,6 +1783,16 @@ "is-symbol": "^1.0.2" } }, + "es6-templates": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/es6-templates/-/es6-templates-0.2.3.tgz", + "integrity": "sha1-XLmsn7He1usSOTQrgdeSu7QHjuQ=", + "dev": true, + "requires": { + "recast": "~0.11.12", + "through": "~2.3.6" + } + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -1739,6 +1815,12 @@ "estraverse": "^4.1.1" } }, + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": true + }, "esrecurse": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", @@ -1994,6 +2076,12 @@ "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", "dev": true }, + "fastparse": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", + "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==", + "dev": true + }, "faye-websocket": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", @@ -3030,6 +3118,19 @@ "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", "dev": true }, + "html-loader": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/html-loader/-/html-loader-0.5.5.tgz", + "integrity": "sha512-7hIW7YinOYUpo//kSYcPB6dCKoceKLmOwjEMmhIobHuWGDVl0Nwe4l68mdG/Ru0wcUxQjVMEoZpkalZ/SE7zog==", + "dev": true, + "requires": { + "es6-templates": "^0.2.3", + "fastparse": "^1.1.1", + "html-minifier": "^3.5.8", + "loader-utils": "^1.1.0", + "object-assign": "^4.1.1" + } + }, "html-minifier": { "version": "3.5.21", "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz", @@ -3217,6 +3318,12 @@ "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", "dev": true }, + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, "import-local": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", @@ -4382,6 +4489,23 @@ "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", "dev": true }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, "pbkdf2": { "version": "3.0.17", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", @@ -4544,6 +4668,12 @@ "utila": "~0.4" } }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -4726,6 +4856,18 @@ "readable-stream": "^2.0.2" } }, + "recast": { + "version": "0.11.23", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.11.23.tgz", + "integrity": "sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM=", + "dev": true, + "requires": { + "ast-types": "0.9.6", + "esprima": "~3.1.0", + "private": "~0.1.5", + "source-map": "~0.5.0" + } + }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -5101,6 +5243,12 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -5695,6 +5843,12 @@ } } }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, "through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", diff --git a/package.json b/package.json index 2819806..2385925 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,10 @@ "@beyonk/google-fonts-webpack-plugin": "^1.2.3", "chart.js": "^2.9.3", "clean-webpack-plugin": "^3.0.0", + "copy-webpack-plugin": "^5.1.1", "css-loader": "^3.4.2", "google-fonts-webpack-plugin": "^0.4.4", + "html-loader": "^0.5.5", "html-webpack-plugin": "^3.2.0", "idb-keyval": "^3.2.0", "reset-css": "^5.0.1", diff --git a/src/icon/android-chrome-192x192.png b/src/icon/android-chrome-192x192.png new file mode 100644 index 0000000..d2257c6 Binary files /dev/null and b/src/icon/android-chrome-192x192.png differ diff --git a/src/icon/android-chrome-512x512.png b/src/icon/android-chrome-512x512.png new file mode 100644 index 0000000..9c8e5bc Binary files /dev/null and b/src/icon/android-chrome-512x512.png differ diff --git a/src/icon/apple-touch-icon.png b/src/icon/apple-touch-icon.png new file mode 100644 index 0000000..ba79189 Binary files /dev/null and b/src/icon/apple-touch-icon.png differ diff --git a/src/icon/browserconfig.xml b/src/icon/browserconfig.xml new file mode 100644 index 0000000..69f865a --- /dev/null +++ b/src/icon/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #dce6ef + + + diff --git a/src/icon/favicon-16x16.png b/src/icon/favicon-16x16.png new file mode 100644 index 0000000..fbb8f4a Binary files /dev/null and b/src/icon/favicon-16x16.png differ diff --git a/src/icon/favicon-32x32.png b/src/icon/favicon-32x32.png new file mode 100644 index 0000000..14e59b8 Binary files /dev/null and b/src/icon/favicon-32x32.png differ diff --git a/src/icon/favicon.ico b/src/icon/favicon.ico new file mode 100644 index 0000000..6134040 Binary files /dev/null and b/src/icon/favicon.ico differ diff --git a/src/icon/html_code.html b/src/icon/html_code.html new file mode 100644 index 0000000..89e4588 --- /dev/null +++ b/src/icon/html_code.html @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/icon/mstile-144x144.png b/src/icon/mstile-144x144.png new file mode 100644 index 0000000..bfd8737 Binary files /dev/null and b/src/icon/mstile-144x144.png differ diff --git a/src/icon/mstile-150x150.png b/src/icon/mstile-150x150.png new file mode 100644 index 0000000..e31f8c4 Binary files /dev/null and b/src/icon/mstile-150x150.png differ diff --git a/src/icon/mstile-310x150.png b/src/icon/mstile-310x150.png new file mode 100644 index 0000000..24a783b Binary files /dev/null and b/src/icon/mstile-310x150.png differ diff --git a/src/icon/mstile-310x310.png b/src/icon/mstile-310x310.png new file mode 100644 index 0000000..8ee11e3 Binary files /dev/null and b/src/icon/mstile-310x310.png differ diff --git a/src/icon/mstile-70x70.png b/src/icon/mstile-70x70.png new file mode 100644 index 0000000..60a1604 Binary files /dev/null and b/src/icon/mstile-70x70.png differ diff --git a/src/icon/ncounter-nobg.svg b/src/icon/ncounter-nobg.svg new file mode 100644 index 0000000..7c6b4fe --- /dev/null +++ b/src/icon/ncounter-nobg.svg @@ -0,0 +1,87 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/src/icon/safari-pinned-tab.svg b/src/icon/safari-pinned-tab.svg new file mode 100644 index 0000000..75b4141 --- /dev/null +++ b/src/icon/safari-pinned-tab.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icon/site.webmanifest b/src/icon/site.webmanifest new file mode 100644 index 0000000..d859732 --- /dev/null +++ b/src/icon/site.webmanifest @@ -0,0 +1,21 @@ +{ + "name": "NCounter", + "short_name": "NCounter", + "description": "Counter app", + "icons": [ + { + "src": "icons/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#dce6ef", + "background_color": "#dce6ef", + "start_url": "https://apps.jhollen.com/ncounter/", + "display": "standalone" +} diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..bc76dc6 --- /dev/null +++ b/src/index.html @@ -0,0 +1,11 @@ + + + + + + NCounter + ${require('./icon/html_code.html')} + + + + \ No newline at end of file diff --git a/src/ncounter/site.css b/src/ncounter/site.css index 397b497..ca0d340 100644 --- a/src/ncounter/site.css +++ b/src/ncounter/site.css @@ -23,9 +23,9 @@ body { } :root { - --background-color: #8baec6; + --background-color: #DCE6EF; --button-color: #3A86B7; - --highlight-color: #303030; + --highlight-color: #163345; --background-primary: #FCFCFC; --background-alternate: #CDCDCD; diff --git a/webpack.common.js b/webpack.common.js index 2e7fa03..f736503 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -4,6 +4,7 @@ const GoogleFontsPlugin = require('@beyonk/google-fonts-webpack-plugin'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const ServiceWorkerWebpackPlugin = require('serviceworker-webpack-plugin'); const LicensePlugin = require('webpack-license-plugin'); +const CopyWebpackPlugin = require('copy-webpack-plugin'); const now = new Date(); const year = now.getFullYear().toString(); @@ -15,7 +16,7 @@ module.exports = { new CleanWebpackPlugin(), new HtmlWebpackPlugin({ title: 'NCounter', - meta: {viewport: 'width=device-width, initial-scale=1.0'} + template: 'src/index.html' }), new GoogleFontsPlugin({ fonts: [ @@ -27,7 +28,19 @@ module.exports = { entry: path.join(__dirname, 'src/sw.js'), publicPath: './' }), - new LicensePlugin() + new LicensePlugin(), + new CopyWebpackPlugin( + [ + 'src/icon/*.png', + 'src/icon/safari-pinned-tab.svg', + 'src/icon/favicon.ico', + 'src/icon/site.webmanifest', + 'src/icon/browserconfig.xml' + ], + { + to: 'icons' + } + ) ], output: { filename: 'index.js', @@ -35,6 +48,13 @@ module.exports = { }, module: { rules: [ + { + test: /\.html$/, + loader: 'html-loader', + options: { + interpolate: true + } + }, { test: /\.svelte$/, exclude: /node_modules/,