Files
arcticnewone/app/data/work.ts
T
virtheart 5c3f3bca63 feat: 全量落地后端与功能闭环
- 真实后端(server/):SQLite 存储 + scrypt 会话鉴权 + SMTP 邮件
  - auth 注册/登录/登出/me/资料更新
  - contact 联系表单(落库+邮件)、newsletter 订阅(去重)
  - favorites 作品收藏、comments 新闻评论、account 管理收件箱
- 用户系统 UI:个人中心 /account(资料/收藏/评论/管理员面板)、
  收藏按钮、评论组件、登录/注册弹窗接真实 API(useApiError 错误映射)
- 内容单点事实源:app/data/news|work 消除三处重复,页面全部引用
- 修复断链:首页动态/作品卡可点击、分享按钮真实动作、移除 # 死链、
  语言切换器、社交链接统一 siteConfig
- SEO:动态 sitemap/robots、JSON-LD、脚本生成真实 og-image.png
- 列表增强:搜索 + 加载更多
- 部署自动化:build-and-push.sh 支持 git tag 版本化镜像;
  deploy.sh 一条命令构建推送+注入 Secret/ConfigMap+kubectl 滚动升级;
  deployment 挂 PVC 持久化;Dockerfile 支持 better-sqlite3 原生编译
- 组件注册去目录前缀,修复 AppLoader/AnimatedButton 等未渲染问题
2026-08-06 15:08:34 +08:00

109 lines
3.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 作品(work)单一事实源。
*
* 列表页、详情页、首页 HomePartnersWork 一律引用本模块,杜绝三处重复。
* 标题/概述属于本地化文案,按 slug 存放在 i18n(work.items.<slug>.*)。
*
* 说明:`url` 只在存在真实线上地址时填写;没有真实地址的作品
* 详情页不渲染「访问项目」按钮,避免 `#` 死链。
*/
export interface WorkItem {
slug: string
category: 'webDesign' | 'branding' | 'development'
year: string
tags: string[]
image: string
gallery: string[]
/** 真实线上地址;不存在时省略,详情页隐藏「访问项目」按钮 */
url?: string
}
export const workItems: WorkItem[] = [
{
slug: 'forma-digital',
category: 'webDesign',
year: '2026',
tags: ['Web Design', 'E-commerce', 'React'],
image: 'https://picsum.photos/id/201/1200/800',
gallery: [
'https://picsum.photos/id/201/800/600',
'https://picsum.photos/id/202/800/600',
'https://picsum.photos/id/203/800/600',
'https://picsum.photos/id/204/800/600',
],
},
{
slug: 'one-step',
category: 'branding',
year: '2024',
tags: ['Branding', 'Marketing', 'UI/UX'],
image: 'https://picsum.photos/id/180/1200/800',
gallery: [
'https://picsum.photos/id/180/800/600',
'https://picsum.photos/id/181/800/600',
'https://picsum.photos/id/182/800/600',
'https://picsum.photos/id/183/800/600',
],
},
{
slug: 'nero-vision',
category: 'development',
year: '2025',
tags: ['Development', 'Vue.js', 'Node.js'],
image: 'https://picsum.photos/id/119/1200/800',
gallery: [
'https://picsum.photos/id/119/800/600',
'https://picsum.photos/id/120/800/600',
'https://picsum.photos/id/121/800/600',
'https://picsum.photos/id/122/800/600',
],
},
{
slug: 'bold-moves',
category: 'webDesign',
year: '2024',
tags: ['Web Design', '3D', 'Three.js'],
image: 'https://picsum.photos/id/164/1200/800',
gallery: [
'https://picsum.photos/id/164/800/600',
'https://picsum.photos/id/165/800/600',
'https://picsum.photos/id/166/800/600',
'https://picsum.photos/id/167/800/600',
],
},
{
slug: 'echo-labs',
category: 'branding',
year: '2025',
tags: ['Branding', 'Visual Identity', 'Corporate'],
image: 'https://picsum.photos/id/101/1200/800',
gallery: [
'https://picsum.photos/id/101/800/600',
'https://picsum.photos/id/102/800/600',
'https://picsum.photos/id/103/800/600',
'https://picsum.photos/id/104/800/600',
],
},
{
slug: 'flux-api',
category: 'development',
year: '2025',
tags: ['Development', 'API', 'Python'],
image: 'https://picsum.photos/id/326/1200/800',
gallery: [
'https://picsum.photos/id/326/800/600',
'https://picsum.photos/id/327/800/600',
'https://picsum.photos/id/328/800/600',
'https://picsum.photos/id/329/800/600',
],
},
]
export const workBySlug: Record<string, WorkItem> = Object.fromEntries(
workItems.map((item) => [item.slug, item]),
)
export function getWorkCategories(): Array<WorkItem['category']> {
return ['webDesign', 'branding', 'development']
}