排版语言 - 引入独立视觉系统 .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)已截图核对,无横向溢出
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { iotlcmGroups, dtuGroups, type CapGroup } from '../../../data/content'
|
||||
|
||||
const props = defineProps<{ source?: 'iotlcm' | 'dtu' }>()
|
||||
|
||||
const groups: CapGroup[] = props.source === 'dtu' ? dtuGroups : iotlcmGroups
|
||||
|
||||
const active = ref(groups[0]?.id ?? '')
|
||||
const current = computed(() => groups.find((g) => g.id === active.value) ?? groups[0])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="cap-tabs">
|
||||
<div class="p-tabs" role="tablist">
|
||||
<button
|
||||
v-for="g in groups"
|
||||
:key="g.id"
|
||||
class="p-tab"
|
||||
:class="{ 'is-active': g.id === active }"
|
||||
role="tab"
|
||||
:aria-selected="g.id === active"
|
||||
@click="active = g.id"
|
||||
>
|
||||
{{ g.name }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<p v-if="current" class="cap-intro">{{ current.intro }}</p>
|
||||
|
||||
<div v-if="current" :key="current.id" class="p-grid p-grid--3 cap-grid">
|
||||
<div v-for="(item, i) in current.items" :key="item.title" class="p-card">
|
||||
<span class="p-card-index">{{ String(i + 1).padStart(2, '0') }}</span>
|
||||
<h3 class="p-card-title">{{ item.title }}</h3>
|
||||
<p class="p-card-text">{{ item.text }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.cap-intro {
|
||||
max-width: 760px;
|
||||
margin: 0 auto 36px;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
line-height: 1.8;
|
||||
color: var(--p-ink-2);
|
||||
}
|
||||
|
||||
.cap-grid {
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user