fix(web): enforce single brand icon asset
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" role="img" aria-labelledby="title">
|
||||
<title id="title">森林AI</title>
|
||||
<rect x="4" y="4" width="120" height="120" rx="28" fill="#165DFF"/>
|
||||
<path d="M64 23C43 23 27 40 27 61c0 13 7 24 17 30h40c10-6 17-17 17-30 0-21-16-38-37-38Z" fill="#F4F8FF"/>
|
||||
<path d="M64 99V65M64 76 47 61M64 82l18-16M64 68l12-13" fill="none" stroke="#F4F8FF" stroke-linecap="round" stroke-linejoin="round" stroke-width="10"/>
|
||||
<path d="M42 58c6-15 29-22 45-7M39 69c12-11 38-13 50 2M48 78c9-5 24-6 33-1" fill="none" stroke="#165DFF" stroke-linecap="round" stroke-width="5"/>
|
||||
<circle cx="47" cy="61" r="6" fill="#14B8A6"/>
|
||||
<circle cx="76" cy="55" r="6" fill="#60A5FA"/>
|
||||
<circle cx="82" cy="66" r="6" fill="#A7F3D0"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 770 B |
@@ -1,5 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" role="img" aria-labelledby="title">
|
||||
<title id="title">森林AI</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
|
||||
<rect x="4" y="4" width="120" height="120" rx="28" fill="#165DFF"/>
|
||||
<path d="M64 23C43 23 27 40 27 61c0 13 7 24 17 30h40c10-6 17-17 17-30 0-21-16-38-37-38Z" fill="#F4F8FF"/>
|
||||
<path d="M64 99V65M64 76 47 61M64 82l18-16M64 68l12-13" fill="none" stroke="#F4F8FF" stroke-linecap="round" stroke-linejoin="round" stroke-width="10"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 770 B After Width: | Height: | Size: 698 B |
@@ -48,6 +48,18 @@ const html = readFileSync('index.html', 'utf8')
|
||||
if (!html.includes('<html lang="zh-CN">')) failures.push('index language must be zh-CN')
|
||||
if (!html.includes('<title>森林AI</title>')) failures.push('document title must be 森林AI')
|
||||
if (!existsSync('public/senlinai-icon.svg')) failures.push('missing public/senlinai-icon.svg')
|
||||
if (!html.includes('href="/senlinai-icon.svg"')) failures.push('index must use senlinai-icon.svg as the canonical favicon')
|
||||
if (existsSync('public/favicon.svg')) failures.push('legacy public/favicon.svg must be removed; senlinai-icon.svg is the only brand asset')
|
||||
if (existsSync('public/senlinai-icon.svg')) {
|
||||
const icon = readFileSync('public/senlinai-icon.svg', 'utf8')
|
||||
if (icon.includes('<text') || icon.includes('<title')) failures.push('brand SVG must not include text or title metadata')
|
||||
if (icon.includes('role=') || icon.includes('aria-labelledby=')) failures.push('brand SVG must not expose presentation ARIA')
|
||||
}
|
||||
const appStyles = readFileSync('src/App.css', 'utf8')
|
||||
if (!appStyles.includes('.brand-icon {')) failures.push('brand-icon must have an explicit base size')
|
||||
if (!appStyles.includes('.brand-lockup.large .brand-icon')) failures.push('login brand icon must have an explicit size')
|
||||
if (!appStyles.includes('.rail-brand {')) failures.push('rail brand button must have explicit layout')
|
||||
if (appStyles.includes('.brand-symbol')) failures.push('legacy brand-symbol styles must be removed')
|
||||
for (const file of ['src/pages/login.tsx', 'src/pages/projects/project-topbar.tsx', 'src/pages/projects/project-rail.tsx']) {
|
||||
const source = readFileSync(file, 'utf8')
|
||||
if (!source.includes('/senlinai-icon.svg')) failures.push(`${file} must use the brand icon`)
|
||||
|
||||
@@ -113,23 +113,17 @@
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.brand-symbol {
|
||||
.brand-icon {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border-radius: 8px;
|
||||
background: var(--senlin-primary);
|
||||
color: white;
|
||||
font-weight: 800;
|
||||
font-size: 18px;
|
||||
display: block;
|
||||
flex: 0 0 32px;
|
||||
}
|
||||
|
||||
.brand-lockup.large .brand-symbol {
|
||||
.brand-lockup.large .brand-icon {
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
border-radius: 12px;
|
||||
font-size: 24px;
|
||||
flex-basis: 46px;
|
||||
}
|
||||
|
||||
.brand-name {
|
||||
@@ -332,6 +326,25 @@
|
||||
width: 48px;
|
||||
}
|
||||
|
||||
.rail-brand {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
min-width: 48px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 8px;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.rail-brand .brand-icon {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
flex-basis: auto;
|
||||
}
|
||||
|
||||
.dashboard-button,
|
||||
.create-project {
|
||||
width: 48px !important;
|
||||
|
||||
Reference in New Issue
Block a user