diff --git a/gulpfile.js b/gulpfile.js index f77cf566..a8550b55 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -89,22 +89,15 @@ function generateManifest(done) { const themeName = projectConf.theme; const faviconDir = path.join(__dirname, 'theme', themeName, 'favicons'); - const manifestPath = path.join(faviconDir, 'manifest.json'); - - let icons; - if (fs.existsSync(manifestPath)) { - const existing = JSON.parse(fs.readFileSync(manifestPath, 'utf8')); - icons = existing.icons || []; - } else { - const pngFiles = fs.existsSync(faviconDir) - ? fs.readdirSync(faviconDir).filter(f => f.startsWith('android-chrome') && f.endsWith('.png')) - : []; - icons = pngFiles.map(f => { - const match = f.match(/(\d+)x(\d+)/); - const size = match ? `${match[1]}x${match[2]}` : '192x192'; - return { src: `/favicons/${f}`, sizes: size, type: 'image/png' }; - }); - } + + const pngFiles = fs.existsSync(faviconDir) + ? fs.readdirSync(faviconDir).filter(f => f.startsWith('android-chrome') && f.endsWith('.png')) + : []; + const icons = pngFiles.map(f => { + const match = f.match(/(\d+)x(\d+)/); + const size = match ? `${match[1]}x${match[2]}` : '192x192'; + return { src: `/favicons/${f}`, sizes: size, type: 'image/png' }; + }); const manifest = { name: projectConf.title, diff --git a/theme/lspl/favicons/site.webmanifest b/theme/lspl/favicons/site.webmanifest deleted file mode 100644 index 45dc8a20..00000000 --- a/theme/lspl/favicons/site.webmanifest +++ /dev/null @@ -1 +0,0 @@ -{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file diff --git a/theme/lspv/favicons/site.webmanifest b/theme/lspv/favicons/site.webmanifest deleted file mode 100644 index 45dc8a20..00000000 --- a/theme/lspv/favicons/site.webmanifest +++ /dev/null @@ -1 +0,0 @@ -{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file diff --git a/theme/lsze/favicons/site.webmanifest b/theme/lsze/favicons/site.webmanifest deleted file mode 100644 index 45dc8a20..00000000 --- a/theme/lsze/favicons/site.webmanifest +++ /dev/null @@ -1 +0,0 @@ -{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file diff --git a/theme/lszk/favicons/manifest.json b/theme/lszk/favicons/manifest.json deleted file mode 100644 index 0877aadf..00000000 --- a/theme/lszk/favicons/manifest.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "FGZO Bewegungen", - "icons": [ - { - "src": "\/android-chrome-36x36.png", - "sizes": "36x36", - "type": "image\/png" - }, - { - "src": "\/android-chrome-48x48.png", - "sizes": "48x48", - "type": "image\/png" - }, - { - "src": "\/android-chrome-72x72.png", - "sizes": "72x72", - "type": "image\/png" - }, - { - "src": "\/android-chrome-96x96.png", - "sizes": "96x96", - "type": "image\/png" - }, - { - "src": "\/android-chrome-144x144.png", - "sizes": "144x144", - "type": "image\/png" - }, - { - "src": "\/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image\/png" - } - ], - "theme_color": "#ffffff", - "display": "standalone" -} diff --git a/theme/lszm/favicons/site.webmanifest b/theme/lszm/favicons/site.webmanifest deleted file mode 100644 index 45dc8a20..00000000 --- a/theme/lszm/favicons/site.webmanifest +++ /dev/null @@ -1 +0,0 @@ -{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file diff --git a/theme/lszo/favicons/site.webmanifest b/theme/lszo/favicons/site.webmanifest deleted file mode 100644 index 45dc8a20..00000000 --- a/theme/lszo/favicons/site.webmanifest +++ /dev/null @@ -1 +0,0 @@ -{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file diff --git a/theme/lszt/favicons/manifest.json b/theme/lszt/favicons/manifest.json deleted file mode 100644 index a4c79988..00000000 --- a/theme/lszt/favicons/manifest.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "MFGT Bewegungen", - "icons": [ - { - "src": "/android-chrome-36x36.png?v=2", - "sizes": "36x36", - "type": "image/png" - }, - { - "src": "/android-chrome-48x48.png?v=2", - "sizes": "48x48", - "type": "image/png" - }, - { - "src": "/android-chrome-72x72.png?v=2", - "sizes": "72x72", - "type": "image/png" - }, - { - "src": "/android-chrome-96x96.png?v=2", - "sizes": "96x96", - "type": "image/png" - }, - { - "src": "/android-chrome-144x144.png?v=2", - "sizes": "144x144", - "type": "image/png" - }, - { - "src": "/android-chrome-192x192.png?v=2", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-256x256.png?v=2", - "sizes": "256x256", - "type": "image/png" - }, - { - "src": "/android-chrome-384x384.png?v=2", - "sizes": "384x384", - "type": "image/png" - }, - { - "src": "/android-chrome-512x512.png?v=2", - "sizes": "512x512", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" -}