feat(polaris): 实现静态分类页

新增七个预生成分类路由、工具卡片网格与空状态。启用侧栏分类导航和当前分类选中态,修复 Windows 静态导出 RSC 路径并补充产物验证,保持静态导出与安全外链约束。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-15 19:24:57 +08:00
co-authored by Claude Opus 5
parent e9f3bf6934
commit 4a032ea742
24 changed files with 2332 additions and 46 deletions
+186 -8
View File
@@ -255,14 +255,9 @@ a {
font-weight: 650;
}
.sidebar__nav-item[aria-disabled="true"] {
cursor: not-allowed;
opacity: 0.82;
}
.sidebar__nav-item[aria-disabled="true"]:hover {
color: #334155;
background: rgba(255, 255, 255, 0.28);
.sidebar__nav-item:hover {
color: var(--primary-hover);
background: var(--primary-soft);
}
.sidebar__label {
@@ -575,6 +570,183 @@ a {
white-space: nowrap;
}
.category-page {
min-height: 100svh;
padding: 20px 20px 20px 0;
}
.category-page__panel {
min-height: calc(100svh - 40px);
padding: 48px clamp(32px, 4vw, 64px) 56px;
background: var(--surface-sidebar);
box-shadow: var(--shadow-panel);
-webkit-backdrop-filter: blur(18px) saturate(132%);
backdrop-filter: blur(18px) saturate(132%);
}
.category-header {
max-width: 720px;
}
.category-header__title {
margin: 0;
color: var(--text-primary);
font-size: clamp(36px, 3.4vw, 44px);
font-weight: 700;
line-height: 1.15;
letter-spacing: -0.03em;
}
.category-header__description {
margin: 12px 0 0;
color: var(--text-secondary);
font-size: 16px;
line-height: 1.7;
}
.category-tools {
margin-top: 36px;
}
.category-section-header {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 20px;
}
.category-section-header__title {
margin: 0;
font-size: 18px;
font-weight: 700;
}
.category-section-header__count {
padding: 4px 10px;
color: var(--text-muted);
font-size: 14px;
border: 1px solid rgba(255, 255, 255, 0.24);
border-radius: 999px;
background: rgba(255, 255, 255, 0.3);
}
.tool-card {
position: relative;
display: flex;
min-width: 0;
height: 96px;
align-items: center;
gap: 16px;
padding: 20px 22px;
color: var(--text-primary);
text-decoration: none;
border: 1px solid var(--border-glass);
border-radius: 18px;
background: var(--surface-card);
box-shadow: var(--shadow-soft);
-webkit-backdrop-filter: blur(16px) saturate(134%);
backdrop-filter: blur(16px) saturate(134%);
transition:
transform 180ms ease,
background 180ms ease,
border-color 180ms ease;
}
.tool-card:hover {
transform: translateY(-2px);
border-color: rgba(255, 255, 255, 0.54);
background: var(--surface-card-hover);
}
.tool-card__icon {
flex: none;
}
.tool-card__copy {
display: flex;
min-width: 0;
flex: 1;
flex-direction: column;
gap: 4px;
}
.tool-card__title,
.tool-card__description {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tool-card__title {
font-size: 17px;
font-weight: 700;
}
.tool-card__description {
color: var(--text-secondary);
font-size: 14px;
line-height: 1.5;
}
.tool-card__external {
width: 16px;
height: 16px;
flex: none;
align-self: flex-start;
color: var(--text-secondary);
opacity: 0.72;
transition:
color 180ms ease,
opacity 180ms ease;
}
.tool-card:hover .tool-card__external {
color: var(--primary-hover);
opacity: 1;
}
.tool-grid {
display: grid;
margin: 0;
padding: 0;
list-style: none;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 20px 24px;
}
.tool-grid__item {
min-width: 0;
}
.category-empty-state {
display: flex;
min-height: 280px;
align-items: center;
justify-content: center;
flex-direction: column;
color: var(--text-secondary);
text-align: center;
}
.category-empty-state > svg {
width: 36px;
height: 36px;
color: var(--text-muted);
}
.category-empty-state__title {
margin: 16px 0 0;
color: var(--text-primary);
font-size: 17px;
font-weight: 700;
}
.category-empty-state__description {
margin: 6px 0 0;
font-size: 14px;
line-height: 1.6;
}
.site-icon {
position: relative;
display: inline-flex;
@@ -626,6 +798,12 @@ a {
scrollbar-width: thin;
}
@media (min-width: 1280px) {
.tool-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
@media (max-width: 1199px) {
:root {
--sidebar-expanded: 220px;