diff --git a/client/build.js b/client/build.js index dd725738..23d54fa5 100644 --- a/client/build.js +++ b/client/build.js @@ -178,11 +178,48 @@ function bundleConfig(config) { } function bundleBinaryAssets() { - glob('./img/*.png', {}, (er, files) => { - for (let file of files) { - copyFile(file, path.join('./public/img/', path.basename(file))); - } - }); + copyFile('./img/favicon.png', './public/img/favicon.png'); + copyFile('./img/transparency_grid.png', './public/img/transparency_grid.png'); + + const Jimp = require('jimp'); + + for (let icon of [ + {name: 'android-chrome-192x192.png', size: 192}, + {name: 'android-chrome-512x512.png', size: 512}, + {name: 'apple-touch-icon.png', size: 180}, + {name: 'mstile-150x150.png', size: 150} + ]) { + Jimp.read('./img/app.png', (err, infile) => { + infile + .resize(icon.size, Jimp.AUTO, Jimp.RESIZE_BEZIER) + .write(path.join('./public/img/', icon.name)); + }); + } + console.info('Generated webapp icons'); + + for (let dim of [ + {w: 640, h: 1136, center: 320}, + {w: 750, h: 1294, center: 375}, + {w: 1125, h: 2436, center: 565}, + {w: 1242, h: 2148, center: 625}, + {w: 1536, h: 2048, center: 770}, + {w: 1668, h: 2224, center: 820}, + {w: 2048, h: 2732, center: 1024} + ]) { + Jimp.read('./img/splash.png', (err, infile) => { + infile + .resize(dim.center, Jimp.AUTO, Jimp.RESIZE_BEZIER) + .background(0xFFFFFFFF) + .contain(dim.w, dim.center, + Jimp.HORIZONTAL_ALIGN_CENTER | Jimp.VERTICAL_ALIGN_MIDDLE) + .contain(dim.w, dim.h, + Jimp.HORIZONTAL_ALIGN_CENTER | Jimp.VERTICAL_ALIGN_MIDDLE) + .write(path.join('./public/img/', + 'apple-touch-startup-image-' + + dim.w + '-' + dim.h + '.png')); + }); + } + console.info('Generated splash screens'); } function bundleWebAppFiles() { diff --git a/client/img/android-chrome-192x192.png b/client/img/android-chrome-192x192.png deleted file mode 100644 index 71c594a0..00000000 Binary files a/client/img/android-chrome-192x192.png and /dev/null differ diff --git a/client/img/android-chrome-512x512.png b/client/img/android-chrome-512x512.png deleted file mode 100644 index 0d579f80..00000000 Binary files a/client/img/android-chrome-512x512.png and /dev/null differ diff --git a/client/img/app.png b/client/img/app.png new file mode 100644 index 00000000..a93c1dbc Binary files /dev/null and b/client/img/app.png differ diff --git a/client/img/apple-touch-icon.png b/client/img/apple-touch-icon.png deleted file mode 100644 index 58809e58..00000000 Binary files a/client/img/apple-touch-icon.png and /dev/null differ diff --git a/client/img/apple-touch-startup-image-1125x2436.png b/client/img/apple-touch-startup-image-1125x2436.png deleted file mode 100644 index f8f2dc8c..00000000 Binary files a/client/img/apple-touch-startup-image-1125x2436.png and /dev/null differ diff --git a/client/img/apple-touch-startup-image-1242x2148.png b/client/img/apple-touch-startup-image-1242x2148.png deleted file mode 100644 index c73d3a2e..00000000 Binary files a/client/img/apple-touch-startup-image-1242x2148.png and /dev/null differ diff --git a/client/img/apple-touch-startup-image-1536x2048.png b/client/img/apple-touch-startup-image-1536x2048.png deleted file mode 100644 index 4c81eb21..00000000 Binary files a/client/img/apple-touch-startup-image-1536x2048.png and /dev/null differ diff --git a/client/img/apple-touch-startup-image-1668x2224.png b/client/img/apple-touch-startup-image-1668x2224.png deleted file mode 100644 index 3a811657..00000000 Binary files a/client/img/apple-touch-startup-image-1668x2224.png and /dev/null differ diff --git a/client/img/apple-touch-startup-image-2048x2732.png b/client/img/apple-touch-startup-image-2048x2732.png deleted file mode 100644 index ef8dfa64..00000000 Binary files a/client/img/apple-touch-startup-image-2048x2732.png and /dev/null differ diff --git a/client/img/apple-touch-startup-image-640x1136.png b/client/img/apple-touch-startup-image-640x1136.png deleted file mode 100644 index 6268f3cd..00000000 Binary files a/client/img/apple-touch-startup-image-640x1136.png and /dev/null differ diff --git a/client/img/apple-touch-startup-image-750x1294.png b/client/img/apple-touch-startup-image-750x1294.png deleted file mode 100644 index 971faf64..00000000 Binary files a/client/img/apple-touch-startup-image-750x1294.png and /dev/null differ diff --git a/client/img/mstile-150x150.png b/client/img/mstile-150x150.png deleted file mode 100644 index 8c5dbc9f..00000000 Binary files a/client/img/mstile-150x150.png and /dev/null differ diff --git a/client/img/splash.png b/client/img/splash.png new file mode 100644 index 00000000..a93c1dbc Binary files /dev/null and b/client/img/splash.png differ diff --git a/client/package-lock.json b/client/package-lock.json index 6d9dea88..c981c8a2 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -3,6 +3,16 @@ "requires": true, "lockfileVersion": 1, "dependencies": { + "@babel/polyfill": { + "version": "7.0.0-rc.2", + "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.0.0-rc.2.tgz", + "integrity": "sha512-nVq4QFaFiGiCxDVHUY6C9MxoXzkmFPgDSanhK762+X1I7dn71EryHQyaxQDh0BCUhz0ob77ChnyRFnbdz0AdrQ==", + "dev": true, + "requires": { + "core-js": "^2.5.7", + "regenerator-runtime": "^0.11.1" + } + }, "JSONStream": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.3.tgz", @@ -57,6 +67,12 @@ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, + "any-base": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/any-base/-/any-base-1.1.0.tgz", + "integrity": "sha512-uMgjozySS8adZZYePpaWs8cxB9/kdzmpX6SgJZ+wbz1K5eYk5QMYDVJaZKhxyIHUdnnJkfR7SVgStgH7LkGUyg==", + "dev": true + }, "array-filter": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", @@ -789,6 +805,12 @@ "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", "dev": true }, + "bmp-js": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/bmp-js/-/bmp-js-0.1.0.tgz", + "integrity": "sha1-4Fpj95amwf8l9Hcex62twUjAcjM=", + "dev": true + }, "bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", @@ -988,6 +1010,12 @@ "ieee754": "^1.1.4" } }, + "buffer-equal": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz", + "integrity": "sha1-kbx0sR6kBbyRa8aqkI+q+ltKrEs=", + "dev": true + }, "buffer-from": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", @@ -1321,6 +1349,12 @@ "randombytes": "^2.0.0" } }, + "dom-walk": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", + "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=", + "dev": true + }, "domain-browser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", @@ -1385,16 +1419,37 @@ "safe-buffer": "^5.1.1" } }, + "exif-parser": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/exif-parser/-/exif-parser-0.1.12.tgz", + "integrity": "sha1-WKnS1ywCwfbwKg70qRZicrd2CSI=", + "dev": true + }, "extend": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" }, + "file-type": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-9.0.0.tgz", + "integrity": "sha512-Qe/5NJrgIOlwijpq3B7BEpzPFcgzggOTagZmkXQY4LA6bsXKTUstK7Wp12lEJ/mLKTpvIZxmIuRcLYWT6ov9lw==", + "dev": true + }, "font-awesome": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz", "integrity": "sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM=" }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "requires": { + "is-callable": "^1.1.3" + } + }, "form-data": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", @@ -1442,6 +1497,24 @@ "path-is-absolute": "^1.0.0" } }, + "global": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", + "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", + "dev": true, + "requires": { + "min-document": "^2.19.0", + "process": "~0.5.1" + }, + "dependencies": { + "process": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", + "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=", + "dev": true + } + } + }, "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", @@ -1608,6 +1681,12 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true + }, "is-finite": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", @@ -1617,11 +1696,63 @@ "number-is-nan": "^1.0.0" } }, + "is-function": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.1.tgz", + "integrity": "sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU=", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, + "jimp": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/jimp/-/jimp-0.3.5.tgz", + "integrity": "sha512-V2pq7D1jImjZefgHjeoeOPbtt6Bz+F4HqV+v5GkxNthRfsBMMfk5h8DkTa05XYcXa1Qd5eb6YCQUYqHf7TZ2Gw==", + "dev": true, + "requires": { + "@babel/polyfill": "^7.0.0-rc.1", + "any-base": "^1.1.0", + "bmp-js": "0.1.0", + "buffer": "^5.2.0", + "exif-parser": "^0.1.12", + "file-type": "^9.0.0", + "jpeg-js": "^0.3.4", + "load-bmfont": "^1.3.0", + "mkdirp": "0.5.1", + "omggif": "^1.0.9", + "phin": "^2.9.1", + "pixelmatch": "^4.0.2", + "pngjs": "^3.3.3", + "tinycolor2": "^1.4.1", + "utif": "^2.0.0" + }, + "dependencies": { + "buffer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.0.tgz", + "integrity": "sha512-nUJyfChH7PMJy75eRDCCKtszSEFokUNXC1hNVSe+o+VdcgvDPLs20k3v8UXI8ruRYAJiYtyRea8mYyqPxoHWDw==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + } + } + }, + "jpeg-js": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.3.4.tgz", + "integrity": "sha512-6IzjQxvnlT8UlklNmDXIJMWxijULjqGrzgqc0OG7YadZdvm7KPQ1j0ehmQQHckgEWOfgpptzcnWgESovxudpTA==", + "dev": true + }, + "jpgjs": { + "version": "github:makr28/jpgjs#c83f107ad725b476a3441d20680a02590d8752cc", + "from": "github:makr28/jpgjs", + "dev": true + }, "js-cookie": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.0.tgz", @@ -1685,6 +1816,21 @@ } } }, + "load-bmfont": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/load-bmfont/-/load-bmfont-1.3.1.tgz", + "integrity": "sha512-lQkEawgez06lM2iw1vQEEOtVLJXyMzFcUqbwWMrB0g6zwhdUs/+e0KNd1zEJ7OFBbMVz0tbzQyjgjtTB47+PBg==", + "dev": true, + "requires": { + "buffer-equal": "0.0.1", + "mime": "^1.3.4", + "parse-bmfont-ascii": "^1.0.3", + "parse-bmfont-binary": "^1.0.5", + "parse-bmfont-xml": "^1.1.4", + "xhr": "^2.0.1", + "xtend": "^4.0.0" + } + }, "lodash": { "version": "4.17.10", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", @@ -1766,6 +1912,15 @@ "mime-db": "~1.33.0" } }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "dev": true, + "requires": { + "dom-walk": "^0.1.0" + } + }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -1855,6 +2010,12 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, + "omggif": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.9.tgz", + "integrity": "sha1-3LcCTazVDFK00wPwSALJHAV8dl8=", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1919,6 +2080,38 @@ "pbkdf2": "^3.0.3" } }, + "parse-bmfont-ascii": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/parse-bmfont-ascii/-/parse-bmfont-ascii-1.0.6.tgz", + "integrity": "sha1-Eaw8P/WPfCAgqyJ2kHkQjU36AoU=", + "dev": true + }, + "parse-bmfont-binary": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/parse-bmfont-binary/-/parse-bmfont-binary-1.0.6.tgz", + "integrity": "sha1-0Di0dtPp3Z2x4RoLDlOiJ5K2kAY=", + "dev": true + }, + "parse-bmfont-xml": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/parse-bmfont-xml/-/parse-bmfont-xml-1.1.4.tgz", + "integrity": "sha512-bjnliEOmGv3y1aMEfREMBJ9tfL3WR0i0CKPj61DnSLaoxWR3nLrsQrEbCId/8rF4NyRF0cCqisSVXyQYWM+mCQ==", + "dev": true, + "requires": { + "xml-parse-from-string": "^1.0.0", + "xml2js": "^0.4.5" + } + }, + "parse-headers": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.1.tgz", + "integrity": "sha1-aug6eqJanZtwCswoaYzR8e1+lTY=", + "dev": true, + "requires": { + "for-each": "^0.3.2", + "trim": "0.0.1" + } + }, "path-browserify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", @@ -1956,6 +2149,27 @@ "sha.js": "^2.4.8" } }, + "phin": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/phin/-/phin-2.9.1.tgz", + "integrity": "sha512-aRmHatimRP+73UipPJEK6AWHWjNcwssW6QmOpUcogYVgO8hbSi2Dv/yDWQKs/DmTjK3gCaf6CNsuYcIBWMnlVw==", + "dev": true + }, + "pixelmatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-4.0.2.tgz", + "integrity": "sha1-j0fc7FARtHe2fbA8JDvB8wheiFQ=", + "dev": true, + "requires": { + "pngjs": "^3.0.0" + } + }, + "pngjs": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.3.3.tgz", + "integrity": "sha512-1n3Z4p3IOxArEs1VRXnZ/RXdfEniAUS9jb68g58FIXMNkPJeZd+Qh4Uq7/e0LVxAQGos1eIUrqrt4FpjdnEd+Q==", + "dev": true + }, "private": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", @@ -2426,6 +2640,12 @@ "process": "~0.11.0" } }, + "tinycolor2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz", + "integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=", + "dev": true + }, "to-arraybuffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", @@ -2438,6 +2658,12 @@ "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", "dev": true }, + "trim": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", + "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=", + "dev": true + }, "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", @@ -2522,6 +2748,16 @@ } } }, + "utif": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/utif/-/utif-2.0.0.tgz", + "integrity": "sha512-9fl1Md7tUTsgjhWCLOra+nalQnDxWme+h0OB7WQsUBZbhrxEmzL6/suCPxI4ujrFAvv6KSu7B/74HhxfydVpfw==", + "dev": true, + "requires": { + "jpgjs": "github:makr28/jpgjs#c83f107ad725b476a3441d20680a02590d8752cc", + "pako": "^1.0.5" + } + }, "util": { "version": "0.10.4", "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", @@ -2548,6 +2784,48 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "xhr": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.5.0.tgz", + "integrity": "sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ==", + "dev": true, + "requires": { + "global": "~4.3.0", + "is-function": "^1.0.1", + "parse-headers": "^2.0.0", + "xtend": "^4.0.0" + } + }, + "xml-parse-from-string": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml-parse-from-string/-/xml-parse-from-string-1.0.1.tgz", + "integrity": "sha1-qQKekp09vN7RafPG4oI42VpdWig=", + "dev": true + }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "dev": true, + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + }, + "dependencies": { + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + } + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", + "dev": true + }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", diff --git a/client/package.json b/client/package.json index 99d1d7ba..9bbaab1f 100644 --- a/client/package.json +++ b/client/package.json @@ -23,6 +23,7 @@ "csso": "^3.5.1", "glob": "^7.1.2", "html-minifier": "^3.5.18", + "jimp": "^0.3.5", "stylus": "^0.54.5", "terser": "^3.7.7", "underscore": "^1.9.1"