漏掉的四处(都实测确认过):
- PWA manifest 的主图标是 /web-icons/dashy-logo.png(512x512),以及
dashy-pwa_{48,72,96,144,192,512}.png —— 全部仍是上游 Dashy 品牌,
浏览器「安装到桌面/主屏」时用的就是这批。由 favicon.svg 重新派生。
- portal/404.html、500.html 没有任何 icon 标签(浏览器只能退化去找
/favicon.ico)。实测两条路径都能取到图标,但仍显式声明更稳妥。
- 登录页模板(admin-server/auth.go)同样缺 icon 标签。
所有派生 PNG 都逐个解码验证(颜色数 111~1603,非空非纯色)。
64 lines
2.2 KiB
HTML
64 lines
2.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>500 - JianF Git</title>
|
|
<link rel="stylesheet" href="/css/portal.css">
|
|
<script src="https://code.iconify.design/3/3.1.0/iconify.min.js"></script>
|
|
<script>(function(){var s=localStorage.getItem('theme');var p=window.matchMedia('(prefers-color-scheme:dark)').matches;var t=s||(p?'dark':'light');document.documentElement.setAttribute('data-theme',t);})();function toggleTheme(){var n=document.documentElement.getAttribute('data-theme')==='dark'?'light':'dark';document.documentElement.setAttribute('data-theme',n);localStorage.setItem('theme',n)}</script>
|
|
<style>
|
|
.error-page {
|
|
display:flex;
|
|
align-items:center;
|
|
justify-content:center;
|
|
min-height:100vh;
|
|
text-align:center;
|
|
padding:20px;
|
|
}
|
|
.error-page .card {
|
|
padding:48px 40px;
|
|
max-width:420px;
|
|
width:100%;
|
|
}
|
|
.error-icon {
|
|
width:64px;
|
|
height:64px;
|
|
border-radius:16px;
|
|
background:var(--danger-bg);
|
|
color:var(--danger);
|
|
display:flex;
|
|
align-items:center;
|
|
justify-content:center;
|
|
margin:0 auto 20px;
|
|
}
|
|
.error-icon svg { width:32px; height:32px }
|
|
.error-page h1 { font-size:3rem; font-weight:800; margin-bottom:4px; color:var(--text-primary) }
|
|
.error-page p { color:var(--text-secondary); margin-bottom:28px; font-size:14px }
|
|
</style>
|
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
|
<link rel="icon" href="/favicon.ico" sizes="any">
|
|
</head>
|
|
<body>
|
|
<div class="error-page">
|
|
<div class="card">
|
|
<div class="error-icon"><span class="iconify" data-icon="mdi:alert-circle-outline"></span></div>
|
|
<h1>500</h1>
|
|
<p>服务器内部错误,请稍后重试或联系管理员</p>
|
|
<a href="/" class="btn btn-primary">
|
|
<span class="iconify" data-icon="mdi:home"></span>
|
|
返回首页
|
|
</a>
|
|
<a href="https://dashy.example.com" class="btn btn-ghost">
|
|
<span class="iconify" data-icon="mdi:view-dashboard"></span>
|
|
门户导航
|
|
</a>
|
|
<button class="btn btn-ghost" onclick="toggleTheme()" style="margin-top:12px">
|
|
<span class="iconify" data-icon="mdi:theme-light-dark"></span>
|
|
切换主题
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|