ac1354da9e
mirror-to-gitee / mirror (push) Successful in 5s
排版语言 - 引入独立视觉系统 .vitepress/theme/styles/portal.css: 中性底色 + 单一强调色(#4f46e5),正文靠留白与层级取胜, 不使用大面积彩色底、渐变铺满或装饰性图形 - CSS 变量定义在 :root(原先挂在 .portal 下,导致内容页拿不到值) - 完整支持暗色模式,变量在 html.dark 下整体替换 首页(pages/index.md → HomePage.vue) - hero:居中大标题(强调色渐变仅作用于一个词组)、双按钮、四格数据条 - 项目区:三栏卡片,标题 + 状态徽标 + 定位 + 说明 + 技术栈标签 - 通用能力:六格编号卡片 - 组合方式:三栏场景步骤卡,每张带一条可复制命令 - 底部 CTA 区块 - 页面改用 layout: page,通过 Layout 包装层去掉默认窄栏 项目详情页 - iotLCM / DTU:能力矩阵改为标签切换(CapabilityTabs), 每个业务域一屏,点击切换,替代原先的大宽表 - XiuAdmin:22 项内置功能按用途归为四组标签墙(FeatureGrid) - 内容页二级标题加短强调线,表格首列不换行,属性表不再竖排 数据 - 新增 data/content.ts 承载首页文案、能力分组、长期事实统计, 与 projects.ts 并列;文案口径取自各项目 README/详情页,无凭空数字 - 修正 scripts/check-registry.mjs:原先扫描 data/ 下所有 .ts 的 id, 新增 content.ts 后把业务分组 id 误判为项目;改为只读 projects.ts 验证 - 构建通过,12 个页面,193 条引用 0 失效 - HTTP 实测 12 个路径全 200,不存在路径 404 - 暗色模式与移动端(390px)已截图核对,无横向溢出
33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
import DefaultTheme from 'vitepress/theme'
|
|
import type { Theme } from 'vitepress'
|
|
import { h } from 'vue'
|
|
import { useData } from 'vitepress'
|
|
|
|
import ProjectList from './components/ProjectList.vue'
|
|
import HomePage from './components/HomePage.vue'
|
|
import CapabilityTabs from './components/CapabilityTabs.vue'
|
|
import FeatureGrid from './components/FeatureGrid.vue'
|
|
|
|
import './styles/portal.css'
|
|
|
|
/**
|
|
* 首页用 layout: page 承载自定义整页排版,
|
|
* 这里给它套一层 .portal-page,把默认窄栏与 padding 去掉。
|
|
*/
|
|
const PortalLayout = () => {
|
|
const { frontmatter } = useData()
|
|
const isPortal = frontmatter.value.layout === 'page'
|
|
return h('div', { class: isPortal ? 'portal-page' : '' }, h(DefaultTheme.Layout))
|
|
}
|
|
|
|
export default {
|
|
extends: DefaultTheme,
|
|
Layout: PortalLayout,
|
|
enhanceApp({ app }) {
|
|
app.component('ProjectList', ProjectList)
|
|
app.component('HomePage', HomePage)
|
|
app.component('CapabilityTabs', CapabilityTabs)
|
|
app.component('FeatureGrid', FeatureGrid)
|
|
},
|
|
} satisfies Theme
|