refactor: unify favicon for index.html and Electron (#4006)

In #3407 we already talked about unifying them.

- Create SVG favicon (better then png)
- Replace base64 placeholder in index.html with SVG favicon
- Update electron.js to use SVG favicon instead of mm2.png
- Add favicon.svg to server static routes
- Remove mm2.png
This commit is contained in:
Kristjan ESPERANTO
2026-01-05 10:51:43 +01:00
committed by GitHub
parent 40301f2a59
commit 9731ea28eb
5 changed files with 8 additions and 3 deletions

5
favicon.svg Normal file
View File

@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
<path fill="#797676" d="M9.18 35.96 3.13 16.72h-.19l.16 2.57.03 3.38v13.3H1V14h3.45l5.68 18h.15l5.8-18h3.4v22h-2.26V19.29l.15-2.57h-.12L11.08 36Zm20.84 0-6.06-19.24h-.08l.15 2.57.04 3.38v13.3H21.9V14h3.45l5.68 18h.12L37 14h3.41v22H38.1V22.48l.04-3.2.15-2.56h-.12L31.96 36Z"/>
<path fill="#a6a3a3" d="M47 19.84h-5.73v-1.1l2.23-2.83q.67-.8 1.12-1.43.45-.6.67-1.21.22-.64.22-1.36 0-.87-.41-1.32-.44-.46-1.11-.46-.63 0-1.12.27-.45.26-.93.75l-.6-.9q.53-.5 1.16-.87.67-.38 1.49-.38 1.23 0 1.9.76.74.75.74 2.07 0 .87-.3 1.59-.3.75-.79 1.43-.47.76-1.14 1.51l-1.8 2.23v.04h4.36Z"/>
</svg>

After

Width:  |  Height:  |  Size: 646 B

View File

@@ -10,7 +10,7 @@
<meta name="format-detection" content="telephone=no" />
<meta name="mobile-web-app-capable" content="yes" />
<link rel="icon" href="data:;base64,iVBORw0KGgo=" />
<link rel="icon" href="favicon.svg" />
<link rel="stylesheet" type="text/css" href="css/main.css" />
<link rel="stylesheet" type="text/css" href="css/roboto.css" />
<link rel="stylesheet" type="text/css" href="node_modules/animate.css/animate.min.css" />

View File

@@ -48,7 +48,7 @@ function createWindow () {
let electronOptionsDefaults = {
width: electronSize.width,
height: electronSize.height,
icon: "mm2.png",
icon: "favicon.svg",
x: 0,
y: 0,
darkTheme: true,

View File

@@ -89,7 +89,7 @@ function Server (config) {
app.use(helmet(config.httpHeaders));
app.use("/js", express.static(__dirname));
let directories = ["/config", "/css", "/modules", "/node_modules/animate.css", "/node_modules/@fontsource", "/node_modules/@fortawesome", "/translations", "/tests/configs", "/tests/mocks"];
let directories = ["/config", "/css", "/favicon.svg", "/modules", "/node_modules/animate.css", "/node_modules/@fontsource", "/node_modules/@fortawesome", "/translations", "/tests/configs", "/tests/mocks"];
for (const [key, value] of Object.entries(vendor)) {
const dirArr = value.split("/");
if (dirArr[0] === "node_modules") directories.push(`/${dirArr[0]}/${dirArr[1]}`);

BIN
mm2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB