Files
website/.vitepress/theme/styles/portal.css
T
Dai0814 ccb3f5e39a
mirror-to-gitee / mirror (push) Successful in 4s
feat(portal): 首页补齐产品功能、核心能力、界面预览、官方文档四个区块
用户反馈首页缺产品功能、核心能力与界面预览,且没有官方文档入口。

新增区块
- 产品功能:三条产品线(iotLCM / 秀杰 DTU / XiuAdmin),
  每条列 6 项能力,卡片底部直达详情页
- 核心能力:8 张带标签的卡片,讲工程层面的硬指标
  (部署、接入、开放、治理、韧性、交付、数据、维护),
  与"产品功能"区分开:前者是做什么,后者是凭什么能用住
- 界面预览:ScreenshotPreview 组件,Web 管理端 / 小程序端两组标签切换,
  首屏大图 + 缩略图条,带浏览器窗口装饰
- 官方文档:6 个入口卡片(文档中心、Web 手册、小程序手册、部署手册、
  OpenAPI 合同、门户部署说明),外链自动加 target=_blank

界面预览的占位机制
- previewShots 里 file 留空时渲染带图注的占位框,不报错、不影响构建
- 补图只改 file 字段,组件无需改动
- 新增 pages/public/screenshots/README.md 写清命名、尺寸、脱敏要求

导航
- 增加产品功能、核心能力、界面预览、官方文档四个锚点项
- 窄屏(≤860px)隐藏中间三个锚点项,避免挤压

验证
- 构建 13 页,208 条引用 0 失效
- 浏览器实测:7 个导航项、5 个 section 锚点齐全
- 移动端 390px 无横向溢出
- 文档站 5 个外链地址均实测 200 可达
2026-11-04 14:27:48 +08:00

922 lines
16 KiB
CSS

/* ============================================================
雪羊科技开源门户 —— 视觉系统
独立的排版语言:中性底色 + 单一强调色,正文以留白和层级取胜。
============================================================ */
:root {
--p-accent: #4f46e5;
--p-accent-2: #06b6d4;
--p-accent-soft: rgba(79, 70, 229, 0.08);
--p-accent-line: rgba(79, 70, 229, 0.22);
--p-surface: #ffffff;
--p-surface-alt: #f7f8fb;
--p-line: rgba(15, 23, 42, 0.08);
--p-line-strong: rgba(15, 23, 42, 0.14);
--p-ink: #0f172a;
--p-ink-2: #475569;
--p-ink-3: #8a94a6;
--p-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.12);
--p-shadow-hover: 0 1px 2px rgba(15, 23, 42, 0.05), 0 18px 40px -18px rgba(15, 23, 42, 0.22);
--p-radius: 16px;
--p-radius-sm: 10px;
--p-max: 1180px;
}
.portal {
color: var(--p-ink);
background: var(--p-surface);
}
html.dark {
--p-accent: #8b8bfa;
--p-accent-2: #45d3e8;
--p-accent-soft: rgba(139, 139, 250, 0.12);
--p-accent-line: rgba(139, 139, 250, 0.28);
--p-surface: #0c0f16;
--p-surface-alt: #11151e;
--p-line: rgba(255, 255, 255, 0.09);
--p-line-strong: rgba(255, 255, 255, 0.16);
--p-ink: #eef1f6;
--p-ink-2: #a8b2c4;
--p-ink-3: #6f7a8d;
--p-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
--p-shadow-hover: 0 1px 2px rgba(0, 0, 0, 0.35), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
}
/* 让 page 布局摆脱默认窄栏,门户整页自管宽度 */
.portal-page .VPPage,
.portal-page .vp-doc.container {
max-width: none !important;
padding: 0 !important;
}
.portal-page .VPContent {
padding: 0 !important;
}
.portal-page .vp-doc > div > h1:first-child,
.portal-page .vp-doc > h1:first-child {
display: none;
}
.portal *,
.portal *::before,
.portal *::after {
box-sizing: border-box;
}
/* ---------- 容器与分区 ---------- */
.p-wrap {
max-width: var(--p-max);
margin: 0 auto;
padding: 0 28px;
}
.p-section {
padding: 96px 0;
border-top: 1px solid var(--p-line);
}
.p-section--alt {
background: var(--p-surface-alt);
}
.p-section--tight {
padding: 72px 0;
}
/* ---------- 区块标题(居中) ---------- */
.p-head {
max-width: 720px;
margin: 0 auto 56px;
text-align: center;
}
.p-head--left {
margin-left: 0;
text-align: left;
}
.p-eyebrow {
display: inline-flex;
align-items: center;
gap: 8px;
margin-bottom: 16px;
padding: 4px 12px;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.06em;
color: var(--p-accent);
background: var(--p-accent-soft);
border: 1px solid var(--p-accent-line);
border-radius: 999px;
}
.p-title {
margin: 0;
font-size: 36px;
font-weight: 650;
line-height: 1.25;
letter-spacing: -0.02em;
color: var(--p-ink);
}
.p-desc {
margin: 16px 0 0;
font-size: 16px;
line-height: 1.75;
color: var(--p-ink-2);
}
@media (max-width: 720px) {
.p-section {
padding: 64px 0;
}
.p-title {
font-size: 26px;
}
.p-desc {
font-size: 15px;
}
.p-head {
margin-bottom: 36px;
}
}
/* ---------- Hero ---------- */
.p-hero {
position: relative;
padding: 104px 0 88px;
text-align: center;
overflow: hidden;
}
.p-hero::before {
content: '';
position: absolute;
inset: -40% -20% auto;
height: 620px;
background: radial-gradient(50% 50% at 50% 50%, var(--p-accent-soft) 0%, transparent 70%);
pointer-events: none;
}
.p-hero > .p-wrap {
position: relative;
}
.p-hero-title {
margin: 20px 0 0;
font-size: 60px;
font-weight: 700;
line-height: 1.1;
letter-spacing: -0.035em;
color: var(--p-ink);
}
.p-hero-title em {
font-style: normal;
background: linear-gradient(100deg, var(--p-accent), var(--p-accent-2));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}
.p-hero-sub {
margin: 22px auto 0;
max-width: 640px;
font-size: 17px;
line-height: 1.8;
color: var(--p-ink-2);
}
.p-hero-actions {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 12px;
margin-top: 34px;
}
.p-btn {
display: inline-flex;
align-items: center;
gap: 8px;
height: 46px;
padding: 0 26px;
font-size: 15px;
font-weight: 600;
border-radius: 999px;
border: 1px solid transparent;
text-decoration: none !important;
transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.p-btn:hover {
transform: translateY(-1px);
}
.p-btn--primary {
color: #fff !important;
background: var(--p-accent);
box-shadow: 0 8px 20px -8px var(--p-accent);
}
.p-btn--primary:hover {
box-shadow: 0 14px 28px -10px var(--p-accent);
}
.p-btn--ghost {
color: var(--p-ink) !important;
background: var(--p-surface);
border-color: var(--p-line-strong);
}
.p-btn--ghost:hover {
border-color: var(--p-accent);
color: var(--p-accent) !important;
}
@media (max-width: 720px) {
.p-hero {
padding: 56px 0 48px;
}
.p-hero-title {
font-size: 29px;
letter-spacing: -0.02em;
line-height: 1.28;
}
.p-hero-sub {
font-size: 14.5px;
line-height: 1.75;
margin-top: 18px;
}
.p-hero-actions {
margin-top: 26px;
}
.p-btn {
height: 44px;
padding: 0 22px;
font-size: 14.5px;
}
}
/* ---------- 数据条 ---------- */
.p-stats {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 0;
max-width: 900px;
margin: 64px auto 0;
padding: 28px 0;
border-top: 1px solid var(--p-line);
border-bottom: 1px solid var(--p-line);
}
.p-stat {
text-align: center;
padding: 0 12px;
}
.p-stat + .p-stat {
border-left: 1px solid var(--p-line);
}
.p-stat-num {
display: block;
font-size: 34px;
font-weight: 700;
letter-spacing: -0.03em;
line-height: 1.1;
color: var(--p-ink);
}
.p-stat-num span {
font-size: 18px;
font-weight: 600;
color: var(--p-accent);
}
.p-stat-label {
display: block;
margin-top: 8px;
font-size: 13px;
color: var(--p-ink-3);
}
@media (max-width: 720px) {
.p-stats {
grid-template-columns: repeat(2, 1fr);
gap: 24px 0;
margin-top: 44px;
}
.p-stat:nth-child(3) {
border-left: none;
}
.p-stat-num {
font-size: 26px;
}
}
/* ---------- 通用卡片网格 ---------- */
.p-grid {
display: grid;
gap: 20px;
}
.p-grid--3 {
grid-template-columns: repeat(3, 1fr);
}
.p-grid--4 {
grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1024px) {
.p-grid--4 {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 860px) {
.p-grid--3,
.p-grid--4 {
grid-template-columns: 1fr;
}
}
.p-card {
display: flex;
flex-direction: column;
padding: 28px 26px;
background: var(--p-surface);
border: 1px solid var(--p-line);
border-radius: var(--p-radius);
box-shadow: var(--p-shadow);
transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.p-card:hover {
transform: translateY(-3px);
border-color: var(--p-accent-line);
box-shadow: var(--p-shadow-hover);
}
.p-card-index {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
margin-bottom: 16px;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.02em;
color: var(--p-accent);
background: var(--p-accent-soft);
border-radius: 8px;
}
.p-card-title {
margin: 0;
font-size: 16px;
font-weight: 650;
line-height: 1.4;
color: var(--p-ink);
}
.p-card-text {
margin: 10px 0 0;
font-size: 14px;
line-height: 1.75;
color: var(--p-ink-2);
}
/* ---------- 标签切换 ---------- */
.p-tabs {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 8px;
margin-bottom: 40px;
}
.p-tab {
height: 38px;
padding: 0 18px;
font-family: inherit;
font-size: 14px;
font-weight: 500;
color: var(--p-ink-2);
background: transparent;
border: 1px solid var(--p-line-strong);
border-radius: 999px;
cursor: pointer;
transition: all 0.18s;
}
.p-tab:hover {
color: var(--p-ink);
border-color: var(--p-ink-3);
}
.p-tab.is-active {
color: #fff;
background: var(--p-accent);
border-color: var(--p-accent);
}
html.dark .p-tab.is-active {
color: #0c0f16;
}
/* ---------- 左右图文 ---------- */
.p-split {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 64px;
align-items: center;
}
@media (max-width: 960px) {
.p-split {
grid-template-columns: 1fr;
gap: 40px;
}
}
.p-list {
margin: 28px 0 0;
padding: 0;
list-style: none;
}
.p-list li {
position: relative;
padding: 14px 0 14px 30px;
font-size: 15px;
line-height: 1.7;
color: var(--p-ink-2);
border-top: 1px solid var(--p-line);
}
.p-list li::before {
content: '';
position: absolute;
left: 4px;
top: 22px;
width: 7px;
height: 7px;
border-radius: 2px;
background: var(--p-accent);
}
.p-list strong {
color: var(--p-ink);
font-weight: 600;
}
/* ---------- 代码面板 ---------- */
.p-panel {
padding: 22px 24px;
font-family: var(--vp-font-family-mono);
font-size: 13px;
line-height: 1.9;
color: var(--p-ink-2);
background: var(--p-surface-alt);
border: 1px solid var(--p-line);
border-radius: var(--p-radius);
}
.p-panel .c {
color: var(--p-ink-3);
}
.p-panel .k {
color: var(--p-accent);
}
/* ---------- 步骤 ---------- */
.p-steps {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
margin-top: 8px;
}
@media (max-width: 860px) {
.p-steps {
grid-template-columns: 1fr;
}
}
.p-step {
padding: 26px;
background: var(--p-surface);
border: 1px solid var(--p-line);
border-radius: var(--p-radius);
}
.p-step-num {
display: inline-block;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.08em;
color: var(--p-accent);
}
.p-step h3 {
margin: 10px 0 0;
font-size: 16px;
font-weight: 650;
color: var(--p-ink);
}
.p-step p {
margin: 8px 0 0;
font-size: 14px;
line-height: 1.75;
color: var(--p-ink-2);
}
.p-step code {
display: block;
margin-top: 14px;
padding: 10px 12px;
font-size: 12.5px;
color: var(--p-ink);
background: var(--p-surface-alt);
border: 1px solid var(--p-line);
border-radius: var(--p-radius-sm);
word-break: break-all;
white-space: pre-wrap;
}
/* ---------- 底部 CTA ---------- */
.p-cta {
text-align: center;
padding: 88px 0;
}
.p-cta .p-title {
font-size: 32px;
}
/* ---------- 项目卡片 ---------- */
.p-proj {
display: flex;
flex-direction: column;
padding: 30px 28px;
background: var(--p-surface);
border: 1px solid var(--p-line);
border-radius: var(--p-radius);
box-shadow: var(--p-shadow);
color: var(--p-ink) !important;
text-decoration: none !important;
transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.p-proj:hover {
transform: translateY(-3px);
border-color: var(--p-accent-line);
box-shadow: var(--p-shadow-hover);
}
.p-proj-top {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
}
.p-proj-name {
margin: 0;
font-size: 21px;
font-weight: 680;
letter-spacing: -0.01em;
color: var(--p-ink);
border: none;
padding: 0;
}
.p-badge {
flex: none;
padding: 3px 10px;
font-size: 11.5px;
font-weight: 600;
color: var(--p-accent);
background: var(--p-accent-soft);
border: 1px solid var(--p-accent-line);
border-radius: 999px;
}
.p-proj-tagline {
margin: 10px 0 0;
font-size: 14px;
font-weight: 600;
color: var(--p-ink-2);
}
.p-proj-summary {
margin: 12px 0 0;
font-size: 14px;
line-height: 1.8;
color: var(--p-ink-2);
}
.p-tags {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin: 18px 0 0;
padding: 0;
list-style: none;
}
.p-tags li {
padding: 3px 9px;
font-size: 11.5px;
color: var(--p-ink-3);
background: var(--p-surface-alt);
border: 1px solid var(--p-line);
border-radius: 6px;
}
.p-proj-foot {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-top: 22px;
padding-top: 18px;
border-top: 1px solid var(--p-line);
font-size: 12.5px;
color: var(--p-ink-3);
}
.p-proj-more {
font-weight: 600;
color: var(--p-accent);
}
/* ============================================================
内容页(非首页)的细节调整
============================================================ */
/* 属性表首列不要挤成竖排 */
.vp-doc table th:first-child,
.vp-doc table td:first-child {
white-space: nowrap;
}
/* 表格更轻,去掉重边框感 */
.vp-doc table {
display: table;
width: 100%;
}
.vp-doc tr {
background: transparent !important;
}
.vp-doc th {
font-weight: 600;
color: var(--p-ink, inherit);
}
/* 详情页一级标题更醒目 */
.vp-doc h1 {
font-size: 38px;
font-weight: 700;
letter-spacing: -0.025em;
line-height: 1.2;
}
@media (max-width: 720px) {
.vp-doc h1 {
font-size: 28px;
}
}
/* 二级标题加一条短强调线 */
.vp-doc h2 {
padding-top: 40px;
margin-top: 56px;
font-size: 26px;
font-weight: 650;
letter-spacing: -0.02em;
}
.vp-doc h2::before {
content: '';
display: block;
width: 32px;
height: 3px;
margin-bottom: 18px;
border-radius: 2px;
background: var(--p-accent, #4f46e5);
}
.vp-doc h3 {
font-size: 18px;
font-weight: 650;
}
/* 提示块圆角统一 */
.vp-doc .custom-block {
border-radius: 10px;
}
/* 行内代码轻一点 */
.vp-doc :not(pre) > code {
border-radius: 5px;
font-size: 0.86em;
}
/* 内容页正文用强调色变量,避免与默认主题脱节 */
.vp-doc a {
color: var(--p-accent);
text-decoration-color: var(--p-accent-line);
}
.vp-doc a:hover {
text-decoration-color: var(--p-accent);
}
/* ============================================================
产品功能卡片
============================================================ */
.pf-card {
position: relative;
}
.pf-name {
font-size: 17px;
}
.pf-tagline {
margin: 8px 0 0;
font-size: 13.5px;
font-weight: 600;
color: var(--p-accent);
}
.pf-list {
margin: 20px 0 0;
padding: 0;
list-style: none;
flex: 1;
}
.pf-list li {
position: relative;
padding: 9px 0 9px 22px;
font-size: 13.5px;
line-height: 1.6;
color: var(--p-ink-2);
border-top: 1px solid var(--p-line);
}
.pf-list li:first-child {
border-top: none;
}
.pf-list li::before {
content: '';
position: absolute;
left: 2px;
top: 17px;
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--p-accent);
opacity: 0.55;
}
.pf-more {
display: inline-block;
margin-top: 20px;
font-size: 13px;
font-weight: 600;
color: var(--p-accent);
text-decoration: none !important;
}
.pf-more:hover {
text-decoration: underline !important;
text-underline-offset: 3px;
}
/* ============================================================
核心能力卡片
============================================================ */
.ca-card {
position: relative;
padding: 26px 24px;
}
.ca-tag {
display: inline-block;
align-self: flex-start;
width: auto;
margin-bottom: 14px;
padding: 2px 9px;
font-size: 11.5px;
font-weight: 600;
letter-spacing: 0.04em;
color: var(--p-accent);
background: var(--p-accent-soft);
border-radius: 5px;
}
.ca-card .p-card-title {
font-size: 15.5px;
}
.ca-card .p-card-text {
font-size: 13.5px;
line-height: 1.7;
}
/* ============================================================
官方文档
============================================================ */
.doc-grid {
margin-bottom: 8px;
}
.doc-card {
text-decoration: none !important;
color: var(--p-ink) !important;
}
.doc-top {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
}
.doc-top .p-card-title {
font-size: 15.5px;
}
.doc-arrow {
flex: none;
margin-top: 3px;
color: var(--p-ink-3);
transition: color 0.18s, transform 0.18s;
}
.doc-card:hover .doc-arrow {
color: var(--p-accent);
transform: translate(1px, -1px);
}
.doc-card .p-card-text {
flex: 1;
font-size: 13.5px;
line-height: 1.7;
}
.doc-project {
display: inline-block;
align-self: flex-start;
margin-top: 18px;
padding: 2px 9px;
font-size: 11.5px;
color: var(--p-ink-3);
background: var(--p-surface-alt);
border: 1px solid var(--p-line);
border-radius: 5px;
}
html.dark .doc-project {
background: rgba(255, 255, 255, 0.04);
}
.doc-note {
margin: 28px 0 0;
text-align: center;
font-size: 13px;
color: var(--p-ink-3);
}
.doc-note a {
color: var(--p-accent);
text-decoration: none;
}
.doc-note a:hover {
text-decoration: underline;
text-underline-offset: 3px;
}
/* ============================================================
导航:锚点项在窄屏隐藏,避免挤压
============================================================ */
@media (max-width: 860px) {
.VPNavBarMenuGroup:nth-child(n + 5):nth-child(-n + 7) {
display: none;
}
}