Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ VekUI WeApp 的重要版本变更会记录在这里,方便跟进 registry、CL
- 为 Image、Fab 和 Input OTP 增加独立组件契约测试,覆盖状态属性、token class 和小程序兼容规则。
- 为全部 80 个公开 registry UI 组件补齐独立单元测试覆盖,校验 API、状态属性、语义 token class 和小程序兼容规则。
- 组件文档目录改为 registry-driven 统计,明确区分公开 UI 组件数、registry item 总数和 shadcn planned 项。
- 在 README 和 GitHub Pages 页脚加入公众号二维码入口。

### Changed

Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,13 @@ pnpm build:docs
- v0 的推荐分发方式是源码 registry,不是传统 npm 组件包。

更多内容见 [开发者指南](docs/DEVELOPER_GUIDE.md) 和 [AI Coding 规范](AGENTS.md)。

## 公众号

<p align="center">
<strong>关注公众号,获取 VekUI WeApp 和小程序 UI 实践更新</strong>
</p>

<p align="center">
<img src="apps/docs/public/wechat-official-account-qr.jpg" alt="微信公众号二维码" width="180" />
</p>
12 changes: 11 additions & 1 deletion apps/docs/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,17 @@ export default async function RootLayout({ children }: { children: React.ReactNo
docsRepositoryBase="https://github.com/vekui/weapp/tree/main/apps/docs"
editLink="编辑此页"
feedback={{ content: "反馈问题" }}
footer={<Footer>MIT 2026 VekUI · Built for Taro React WeChat mini programs</Footer>}
footer={
<Footer>
<div className="vekui-site-footer">
<span>MIT 2026 VekUI · Built for Taro React WeChat mini programs</span>
<div className="vekui-site-footer__qr">
<span>关注公众号</span>
<img src="/weapp/wechat-official-account-qr.jpg" alt="VekUI 微信公众号二维码" loading="lazy" />
</div>
</div>
</Footer>
}
navbar={
<Navbar
logo={
Expand Down
34 changes: 34 additions & 0 deletions apps/docs/app/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -3413,3 +3413,37 @@ header .nextra-hamburger {
color: var(--vk-ink);
text-decoration: none;
}

.vekui-site-footer {
align-items: center;
display: flex;
gap: 18px;
justify-content: space-between;
width: 100%;
}

.vekui-site-footer__qr {
align-items: center;
color: var(--vk-muted);
display: inline-flex;
font-size: 13px;
gap: 10px;
line-height: 1.4;
}

.vekui-site-footer__qr img {
background: var(--vk-surface);
border: 1px solid var(--vk-border);
border-radius: 8px;
display: block;
height: 88px;
padding: 6px;
width: 88px;
}

@media (max-width: 640px) {
.vekui-site-footer {
align-items: flex-start;
flex-direction: column;
}
}
2 changes: 1 addition & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"build": "next build --webpack",
"dev": "next dev",
"test": "node scripts/check-catalog.mjs && node scripts/check-code-blocks.mjs",
"test": "node scripts/check-catalog.mjs && node scripts/check-code-blocks.mjs && node scripts/check-site-footer.mjs",
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
Expand Down
Binary file added apps/docs/public/wechat-official-account-qr.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions apps/docs/scripts/check-site-footer.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { access, readFile } from "node:fs/promises"
import path from "node:path"
import { fileURLToPath } from "node:url"

const docsRoot = path.resolve(fileURLToPath(new URL("..", import.meta.url)))
const repoRoot = path.resolve(docsRoot, "../..")
const qrFileName = "wechat-official-account-qr.jpg"
const qrPublicPath = `/weapp/${qrFileName}`
const qrRepoPath = `apps/docs/public/${qrFileName}`

const readme = await readFile(path.join(repoRoot, "README.md"), "utf8")
const layout = await readFile(path.join(docsRoot, "app/layout.tsx"), "utf8")
const siteCss = await readFile(path.join(docsRoot, "app/site.css"), "utf8")

function assertIncludes(source, expected, message) {
if (!source.includes(expected)) {
throw new Error(message)
}
}

await access(path.join(docsRoot, "public", qrFileName))

assertIncludes(readme, qrRepoPath, "README should render the WeChat official account QR code.")
assertIncludes(readme, "关注公众号", "README should label the WeChat official account QR code.")

assertIncludes(layout, qrPublicPath, "Docs footer should render the public QR image.")
assertIncludes(layout, "关注公众号", "Docs footer should label the WeChat official account QR code.")
assertIncludes(layout, "vekui-site-footer__qr", "Docs footer should expose a stable QR styling hook.")

assertIncludes(siteCss, ".vekui-site-footer", "Docs footer should have a custom layout style.")
assertIncludes(siteCss, ".vekui-site-footer__qr img", "Docs footer QR image should have stable sizing.")

console.log("Site footer checks passed.")