diff options
| author | Michael Serajnik <ms@mserajnik.at> | 2018-08-05 02:58:59 +0200 |
|---|---|---|
| committer | Marcin Kurczewski <rr-@sakuya.pl> | 2018-08-06 14:12:29 +0200 |
| commit | b22c887e4b7ebc3c11d72f2ce9e8086403616c46 (patch) | |
| tree | 31b57209f98e5bb84ae089c6a33ff9bdb862a140 | |
| parent | 45b6df020a49815a941a412dac4247ce66188fa2 (diff) | |
client: add basic web app support
| -rw-r--r-- | client/app/manifest.json | 19 | ||||
| -rw-r--r-- | client/build.js | 5 | ||||
| -rw-r--r-- | client/html/index.htm | 16 | ||||
| -rw-r--r-- | client/img/android-chrome-192x192.png | bin | 0 -> 48491 bytes | |||
| -rw-r--r-- | client/img/android-chrome-512x512.png | bin | 0 -> 189787 bytes | |||
| -rw-r--r-- | client/img/apple-touch-icon.png | bin | 0 -> 44063 bytes | |||
| -rw-r--r-- | client/img/apple-touch-startup-image-1125x2436.png | bin | 0 -> 383528 bytes | |||
| -rw-r--r-- | client/img/apple-touch-startup-image-1242x2148.png | bin | 0 -> 434501 bytes | |||
| -rw-r--r-- | client/img/apple-touch-startup-image-1536x2048.png | bin | 0 -> 582746 bytes | |||
| -rw-r--r-- | client/img/apple-touch-startup-image-1668x2224.png | bin | 0 -> 654121 bytes | |||
| -rw-r--r-- | client/img/apple-touch-startup-image-2048x2732.png | bin | 0 -> 869871 bytes | |||
| -rw-r--r-- | client/img/apple-touch-startup-image-640x1136.png | bin | 0 -> 146797 bytes | |||
| -rw-r--r-- | client/img/apple-touch-startup-image-750x1294.png | bin | 0 -> 192868 bytes | |||
| -rw-r--r-- | client/img/mstile-150x150.png | bin | 0 -> 32731 bytes | |||
| -rw-r--r-- | client/public/.gitignore | 1 |
15 files changed, 40 insertions, 1 deletions
diff --git a/client/app/manifest.json b/client/app/manifest.json new file mode 100644 index 0000000..067677a --- /dev/null +++ b/client/app/manifest.json @@ -0,0 +1,19 @@ +{ + "name": "szurubooru", + "icons": [ + { + "src": "/img/android-chrome-192x192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "/img/android-chrome-512x512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": "/", + "theme_color": "#24aadd", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/client/build.js b/client/build.js index e551384..dd72573 100644 --- a/client/build.js +++ b/client/build.js @@ -185,9 +185,14 @@ function bundleBinaryAssets() { }); } +function bundleWebAppFiles() { + copyFile('./app/manifest.json', './public/manifest.json'); +} + const config = getConfig(); bundleConfig(config); bundleBinaryAssets(); +bundleWebAppFiles(); if (!process.argv.includes('--no-html')) { bundleHtml(); } diff --git a/client/html/index.htm b/client/html/index.htm index 5df8e6d..7d67ae3 100644 --- a/client/html/index.htm +++ b/client/html/index.htm @@ -2,11 +2,25 @@ <html> <head> <meta charset='utf-8'/> - <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'> + <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'/> + <meta name='theme-color' content='#24aadd'/> + <meta name='apple-mobile-web-app-capable' content='yes'/> + <meta name='apple-mobile-web-app-status-bar-style' content='black'/> + <meta name='msapplication-TileColor' content='#ffffff'/> + <meta name="msapplication-TileImage" content="/img/mstile-150x150.png"> <title>Loading...</title> <link href='/css/app.min.css' rel='stylesheet' type='text/css'/> <link href='/css/vendor.min.css' rel='stylesheet' type='text/css'/> <link rel='shortcut icon' type='image/png' href='/img/favicon.png'/> + <link rel='apple-touch-icon' sizes='180x180' href='/img/apple-touch-icon.png'/> + <link rel='apple-touch-startup-image' href='/img/apple-touch-startup-image-640x1136.png' media='(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)'/> + <link rel='apple-touch-startup-image' href='/img/apple-touch-startup-image-750x1294.png' media='(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)'/> + <link rel='apple-touch-startup-image' href='/img/apple-touch-startup-image-1242x2148.png' media='(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)'/> + <link rel='apple-touch-startup-image' href='/img/apple-touch-startup-image-1125x2436.png' media='(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)'/> + <link rel='apple-touch-startup-image' href='/img/apple-touch-startup-image-1536x2048.png' media='(min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)'/> + <link rel='apple-touch-startup-image' href='/img/apple-touch-startup-image-1668x2224.png' media='(min-device-width: 834px) and (max-device-width: 834px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)'/> + <link rel='apple-touch-startup-image' href='/img/apple-touch-startup-image-2048x2732.png' media='(min-device-width: 1024px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)'/> + <link rel='manifest' href='/manifest.json'/> </head> <body> <div id='top-navigation-holder'></div> diff --git a/client/img/android-chrome-192x192.png b/client/img/android-chrome-192x192.png Binary files differnew file mode 100644 index 0000000..71c594a --- /dev/null +++ b/client/img/android-chrome-192x192.png diff --git a/client/img/android-chrome-512x512.png b/client/img/android-chrome-512x512.png Binary files differnew file mode 100644 index 0000000..0d579f8 --- /dev/null +++ b/client/img/android-chrome-512x512.png diff --git a/client/img/apple-touch-icon.png b/client/img/apple-touch-icon.png Binary files differnew file mode 100644 index 0000000..58809e5 --- /dev/null +++ b/client/img/apple-touch-icon.png diff --git a/client/img/apple-touch-startup-image-1125x2436.png b/client/img/apple-touch-startup-image-1125x2436.png Binary files differnew file mode 100644 index 0000000..f8f2dc8 --- /dev/null +++ b/client/img/apple-touch-startup-image-1125x2436.png diff --git a/client/img/apple-touch-startup-image-1242x2148.png b/client/img/apple-touch-startup-image-1242x2148.png Binary files differnew file mode 100644 index 0000000..c73d3a2 --- /dev/null +++ b/client/img/apple-touch-startup-image-1242x2148.png diff --git a/client/img/apple-touch-startup-image-1536x2048.png b/client/img/apple-touch-startup-image-1536x2048.png Binary files differnew file mode 100644 index 0000000..4c81eb2 --- /dev/null +++ b/client/img/apple-touch-startup-image-1536x2048.png diff --git a/client/img/apple-touch-startup-image-1668x2224.png b/client/img/apple-touch-startup-image-1668x2224.png Binary files differnew file mode 100644 index 0000000..3a81165 --- /dev/null +++ b/client/img/apple-touch-startup-image-1668x2224.png diff --git a/client/img/apple-touch-startup-image-2048x2732.png b/client/img/apple-touch-startup-image-2048x2732.png Binary files differnew file mode 100644 index 0000000..ef8dfa6 --- /dev/null +++ b/client/img/apple-touch-startup-image-2048x2732.png diff --git a/client/img/apple-touch-startup-image-640x1136.png b/client/img/apple-touch-startup-image-640x1136.png Binary files differnew file mode 100644 index 0000000..6268f3c --- /dev/null +++ b/client/img/apple-touch-startup-image-640x1136.png diff --git a/client/img/apple-touch-startup-image-750x1294.png b/client/img/apple-touch-startup-image-750x1294.png Binary files differnew file mode 100644 index 0000000..971faf6 --- /dev/null +++ b/client/img/apple-touch-startup-image-750x1294.png diff --git a/client/img/mstile-150x150.png b/client/img/mstile-150x150.png Binary files differnew file mode 100644 index 0000000..8c5dbc9 --- /dev/null +++ b/client/img/mstile-150x150.png diff --git a/client/public/.gitignore b/client/public/.gitignore index 425d6f8..2e4c0a2 100644 --- a/client/public/.gitignore +++ b/client/public/.gitignore @@ -1,2 +1,3 @@ data/ +manifest.json index.htm |