diff --git a/assets/icon-144.png b/assets/icon-144.png new file mode 100755 index 00000000..f3e53ce8 Binary files /dev/null and b/assets/icon-144.png differ diff --git a/assets/icon-192.png b/assets/icon-192.png index 3fe89e5c..bea59407 100644 Binary files a/assets/icon-192.png and b/assets/icon-192.png differ diff --git a/assets/icon-48.png b/assets/icon-48.png new file mode 100755 index 00000000..02c6a237 Binary files /dev/null and b/assets/icon-48.png differ diff --git a/assets/icon-512.png b/assets/icon-512.png new file mode 100755 index 00000000..2d2353f9 Binary files /dev/null and b/assets/icon-512.png differ diff --git a/assets/icon-72.png b/assets/icon-72.png new file mode 100755 index 00000000..7b86d8e7 Binary files /dev/null and b/assets/icon-72.png differ diff --git a/assets/icon-96.png b/assets/icon-96.png new file mode 100755 index 00000000..255743a9 Binary files /dev/null and b/assets/icon-96.png differ diff --git a/assets/manifest.json b/assets/manifest.json index 90a4971d..6d7fc8df 100644 --- a/assets/manifest.json +++ b/assets/manifest.json @@ -1,15 +1,40 @@ { - "background_color": "#ffffff", - "theme_color": "#4169e1", - "name": "Pinafore for Mastodon", - "short_name": "Pinafore", - "display": "minimal-ui", - "start_url": "/", - "icons": [ - { - "src": "icon-192.png", - "sizes": "192x192", - "type": "image/png" - } - ] + "background_color": "#ffffff", + "theme_color": "#4169e1", + "name": "Pinafore for Mastodon", + "short_name": "Pinafore", + "display": "minimal-ui", + "start_url": "/", + "icons": [ + { + "src": "icon-48.png", + "sizes": "48x48", + "type": "image/png" + }, + { + "src": "icon-72.png", + "sizes": "72x72", + "type": "image/png" + }, + { + "src": "icon-96.png", + "sizes": "96x96", + "type": "image/png" + }, + { + "src": "icon-144.png", + "sizes": "144x144", + "type": "image/png" + }, + { + "src": "icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icon-512.png", + "sizes": "512x512", + "type": "image/png" + } + ] } diff --git a/bin/build-sass.js b/bin/build-sass.js index 721c2ab9..9d78a282 100755 --- a/bin/build-sass.js +++ b/bin/build-sass.js @@ -9,12 +9,13 @@ const fs = require('fs') const pify = require('pify') const writeFile = pify(fs.writeFile.bind(fs)) const readdir = pify(fs.readdir.bind(fs)) +const readFile = pify(fs.readFile.bind(fs)) const render = pify(sass.render.bind(sass)) const now = require('performance-now') const globalScss = path.join(__dirname, '../scss/global.scss') const defaultThemeScss = path.join(__dirname, '../scss/themes/_default.scss') -const globalCss = path.join(__dirname, '../assets/global.css') +const html2xxFile = path.join(__dirname, '../templates/2xx.html') const scssDir = path.join(__dirname, '../scss') const themesScssDir = path.join(__dirname, '../scss/themes') const assetsDir = path.join(__dirname, '../assets') @@ -35,13 +36,17 @@ function doWatch() { async function compileGlobalSass() { let results = await Promise.all([ - render({file: defaultThemeScss}), - render({file: globalScss}) + render({file: defaultThemeScss, outputStyle: argv.watch ? 'nested': 'compressed'}), + render({file: globalScss, outputStyle: argv.watch ? 'nested': 'compressed'}) ]) - let css = results.map(_ => _.css).join('\n') + let css = results.map(_ => _.css).join('') - await writeFile(globalCss, css, 'utf8') + let html = await readFile(html2xxFile, 'utf8') + html = html.replace(/`) + + await writeFile(html2xxFile, html, 'utf8') } async function compileThemesSass() { diff --git a/scss/themes/_default.scss b/scss/themes/_default.scss index c3993519..eace05cd 100644 --- a/scss/themes/_default.scss +++ b/scss/themes/_default.scss @@ -8,6 +8,8 @@ $secondary-text-color: white; $toast-border: #fafafa; $toast-bg: #333; +$whatever: royalblue; + @import "_base.scss"; :root { diff --git a/templates/2xx.html b/templates/2xx.html index 13233402..95cfceae 100644 --- a/templates/2xx.html +++ b/templates/2xx.html @@ -1,11 +1,10 @@ - +
- @@ -15,6 +14,13 @@ } + +