Merge remote-tracking branch 'upstream/master' into travis

This commit is contained in:
nothink 2018-08-14 12:57:08 +09:00
commit ea29168697
19 changed files with 46 additions and 7 deletions

View file

@ -12,7 +12,7 @@ and Docker Compose (version 1.6.0 or greater) already installed.
2. Configure the application:
```console
user@host:szuru$ cp server/config.yaml.dist config.yaml
user@host:szuru$ cp server/config.yaml.dist server/config.yaml
user@host:szuru$ edit config.yaml
```

19
client/app/manifest.json Normal file
View file

@ -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"
}

View file

@ -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();
}

View file

@ -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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 569 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View file

@ -1,2 +1,3 @@
data/
manifest.json
index.htm

View file

@ -38,7 +38,7 @@ services:
## If more customizations that are not covered in `config.yaml.dist` are needed
## Comment this line if you are not going
## to supply a YAML file
- ./config.yaml:/opt/config.yaml
- ./server/config.yaml:/opt/app/config.yaml
## HTTP container for frontend
frontend:

View file

@ -3,7 +3,7 @@ WORKDIR /opt/app
COPY alembic.ini wait-for-es generate-thumb ./
COPY szurubooru/ ./szurubooru/
COPY config.yaml.dist ../
COPY config.yaml.dist ./
FROM python:3.6-slim

View file

@ -46,10 +46,10 @@ def docker_config() -> Dict:
def read_config() -> Dict:
with open('../config.yaml.dist') as handle:
with open('config.yaml.dist') as handle:
ret = yaml.load(handle.read())
if os.path.exists('../config.yaml'):
with open('../config.yaml') as handle:
if os.path.exists('config.yaml'):
with open('config.yaml') as handle:
ret = merge(ret, yaml.load(handle.read()))
if os.path.exists('/.dockerenv'):
ret = merge(ret, docker_config())