1cb8f11acd
- 简化前端 useSiteSettings,直接使用后端注入的 window.__SITE_CONFIG__ - 修复后端 serveIndexHTML 中的设置 key 名,与前端的 key 名一致 - site_name 替换为正确的数据库字段名 - logo 和 favicon 使用 site_logo 和 site_favicon - 添加 getLogo 函数根据主题自动选择 logo Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
30 lines
1013 B
HTML
30 lines
1013 B
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>{{.SiteName}}</title>
|
|
<meta name="description" content="{{.SiteDescription}}" />
|
|
|
|
<!-- Google Fonts - Inter -->
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
|
|
<!-- 后端注入的系统配置 -->
|
|
<script>
|
|
window.__SITE_CONFIG__ = {
|
|
siteName: '{{.SiteName}}',
|
|
siteDescription: '{{.SiteDescription}}',
|
|
logoLight: '{{.LogoLight}}',
|
|
logoDark: '{{.LogoDark}}',
|
|
favicon: '{{.Favicon}}',
|
|
};
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="app"></div>
|
|
<script type="module" src="/src/main.ts"></script>
|
|
</body>
|
|
</html> |