diff --git a/assets/icon-144.png b/assets/icon-144.png new file mode 100755 index 0000000..f3e53ce Binary files /dev/null and b/assets/icon-144.png differ diff --git a/assets/icon-192.png b/assets/icon-192.png index 3fe89e5..bea5940 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 0000000..02c6a23 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 0000000..2d2353f 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 0000000..7b86d8e 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 0000000..255743a Binary files /dev/null and b/assets/icon-96.png differ diff --git a/assets/manifest.json b/assets/manifest.json index 90a4971..6d7fc8d 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 721c2ab..9d78a28 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 c399351..eace05c 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 1323340..95cfcea 100644 --- a/templates/2xx.html +++ b/templates/2xx.html @@ -1,11 +1,10 @@ - + - @@ -15,6 +14,13 @@ } + +