diff --git a/Dockerfile b/Dockerfile index 7568757..f96a64a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,5 +4,6 @@ COPY nginx.conf /etc/nginx/conf.d/default.conf COPY index.html /usr/share/nginx/html/ COPY marszalek-architekten-infosheet.pdf /usr/share/nginx/html/ COPY images/ /usr/share/nginx/html/images/ +COPY favicon.svg favicon-16x16.png favicon-32x32.png apple-touch-icon.png /usr/share/nginx/html/ EXPOSE 80 diff --git a/apple-touch-icon.png b/apple-touch-icon.png new file mode 100644 index 0000000..f744202 Binary files /dev/null and b/apple-touch-icon.png differ diff --git a/favicon-16x16.png b/favicon-16x16.png new file mode 100644 index 0000000..22f0160 Binary files /dev/null and b/favicon-16x16.png differ diff --git a/favicon-32x32.png b/favicon-32x32.png new file mode 100644 index 0000000..b4985b2 Binary files /dev/null and b/favicon-32x32.png differ diff --git a/favicon.svg b/favicon.svg new file mode 100644 index 0000000..96adf5a --- /dev/null +++ b/favicon.svg @@ -0,0 +1,6 @@ + diff --git a/generate-favicons.js b/generate-favicons.js new file mode 100644 index 0000000..f66eb64 --- /dev/null +++ b/generate-favicons.js @@ -0,0 +1,40 @@ +const puppeteer = require('puppeteer-core'); +const path = require('path'); +const fs = require('fs'); + +const CHROME = 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe'; +const SVG = fs.readFileSync(path.join(__dirname, 'favicon.svg'), 'utf8'); + +const sizes = [ + { name: 'favicon-16x16.png', px: 16 }, + { name: 'favicon-32x32.png', px: 32 }, + { name: 'apple-touch-icon.png', px: 180 }, +]; + +(async () => { + const browser = await puppeteer.launch({ + executablePath: CHROME, + headless: 'new', + args: ['--no-sandbox'], + }); + + const page = await browser.newPage(); + + for (const { name, px } of sizes) { + await page.setViewport({ width: px, height: px, deviceScaleFactor: 1 }); + await page.setContent(` +
+