feat(ui): 新增站点外壳组件 Brand / SearchField / Ticker

把应用里各自手写的三块收进库,风格沿用前台、行为参数化:

- Brand:logo 图片或首字圆形标记 + 名称,href 决定是链接还是纯展示,size/tone 可选
- SearchField:语义版搜索框(onChange 直接给字符串),variant 切 plain / card,
  支持 shortcut 提示与 hotkey 聚焦
- Ticker:无限滚动信息条,内部三份内容按实测宽度位移,循环不跳帧;
  speed / paused / label 可配
- 令牌补展示级字号 --su-font-size-2xl / --su-line-height-2xl(32 / 40)
- 展示页新增 #site-chrome(Brand / Ticker / SearchField),COMPONENTS.md 补契约与 changelog
This commit is contained in:
2026-11-01 15:28:17 +08:00
parent 93bb5cbb28
commit 707cf98fe0
12 changed files with 524 additions and 0 deletions
+56
View File
@@ -0,0 +1,56 @@
.root {
display: inline-flex;
align-items: center;
gap: var(--su-space-2);
color: var(--su-text-main);
text-decoration: none;
}
.mark {
display: grid;
place-items: center;
flex-shrink: 0;
width: 32px;
height: 32px;
border-radius: var(--su-radius-pill);
background-color: var(--su-text-main);
color: var(--su-white);
font-size: var(--su-font-size-base);
font-weight: var(--su-font-weight-strong);
}
.logo {
flex-shrink: 0;
width: 32px;
height: 32px;
border-radius: var(--su-radius-sm);
object-fit: contain;
}
.name {
font-size: var(--su-font-size-lg);
line-height: var(--su-line-height-lg);
letter-spacing: 0.04em;
}
/* 小号:标记 24,文字回到正文尺寸 */
.sm .mark,
.sm .logo {
width: 24px;
height: 24px;
}
.sm .mark {
font-size: var(--su-font-size-sm);
}
.sm .name {
font-size: var(--su-font-size-base);
line-height: var(--su-line-height-base);
}
/* 浅底标记:主色字 + 主色柔和底 */
.soft .mark {
background-color: var(--su-color-primary-soft);
color: var(--su-color-primary);
}