fix(player): 修复主题分支网站图标不显示
favicon.svg 原外链 /logo.png 浏览器无法加载;改为内嵌 base64 index.html 增加 logo.png 作为 favicon 回退;theme-3 theme-color 对齐 #0F2027
This commit is contained in:
@@ -3,7 +3,8 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||||
<meta name="theme-color" content="#003D6B" />
|
<meta name="theme-color" content="#0F2027" />
|
||||||
|
<link rel="icon" type="image/png" href="/logo.png" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
<link rel="apple-touch-icon" href="/logo.png" />
|
<link rel="apple-touch-icon" href="/logo.png" />
|
||||||
<link rel="manifest" href="/site.webmanifest" />
|
<link rel="manifest" href="/site.webmanifest" />
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 157 KiB |
16
scripts/gen-favicon-svg.mjs
Normal file
16
scripts/gen-favicon-svg.mjs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import { readFileSync, writeFileSync } from 'node:fs';
|
||||||
|
import { resolve, dirname } from 'node:path';
|
||||||
|
import { fileURLToPath } from 'node:url';
|
||||||
|
|
||||||
|
const root = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
||||||
|
const logoPath = resolve(root, 'packages/shared/public/logo.png');
|
||||||
|
const outPath = resolve(root, 'packages/shared/public/favicon.svg');
|
||||||
|
const b64 = readFileSync(logoPath).toString('base64');
|
||||||
|
|
||||||
|
writeFileSync(
|
||||||
|
outPath,
|
||||||
|
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><image href="data:image/png;base64,${b64}" width="512" height="512"/></svg>`,
|
||||||
|
'utf8',
|
||||||
|
);
|
||||||
|
|
||||||
|
console.log('Wrote', outPath);
|
||||||
Reference in New Issue
Block a user