feat: 后台管理系统(Admin Backend + 全量 CMS)
- 内容迁入数据库:articles/works 表(中英双语 + 内容块), server/utils/seed.ts 灌入现有 6 动态 + 6 作品,站点初始内容不变 - 前台内容 API:/api/news、/api/work(列表/详情,仅已发布), 页面/首页组件改为 useFetch 拉取并按 locale 选 zh/en 字段 - 后台管理 /admin(admin 中间件守卫): - Dashboard 统计、动态/作品增删改(块编辑器、图片上传 /api/admin/upload) - 用户管理(角色切换/删除)、评论审核、联系/订阅管理(导出 CSV) - 预置管理员:NUXT_ADMIN_INITIAL_PASSWORD 首次初始化创建 admin 账号 - 图片自托管:上传存 PVC /data/uploads,/uploads/[...] 路由服务 - sitemap 改查 DB;i18n 移除内容键(305 键对齐);删除 app/data 冗余模块 - 角色以数据库为准(后台可切换);admin 中间件 + 客户端会话恢复插件
This commit is contained in:
+4
-10
@@ -3,7 +3,6 @@ import { promisify } from 'node:util'
|
||||
import { createError, getCookie, setCookie, deleteCookie } from 'h3'
|
||||
import type { H3Event } from 'h3'
|
||||
import { getDb } from './db'
|
||||
import { getConfig, isAdminEmail } from './config'
|
||||
|
||||
const scryptAsync = promisify(scrypt) as (
|
||||
password: string,
|
||||
@@ -54,7 +53,7 @@ export function destroySession(token: string): void {
|
||||
getDb().prepare('DELETE FROM sessions WHERE token = ?').run(token)
|
||||
}
|
||||
|
||||
/** 根据 token 返回有效用户(过期会话返回 null);role 随 ADMIN_EMAILS 实时判定 */
|
||||
/** 根据 token 返回有效用户(过期会话返回 null);role 以数据库存储为准(后台可切换) */
|
||||
export function getSessionUser(token: string | null): UserRow | null {
|
||||
if (!token) return null
|
||||
const row = getDb()
|
||||
@@ -65,10 +64,7 @@ export function getSessionUser(token: string | null): UserRow | null {
|
||||
WHERE s.token = ? AND s.expires_at > datetime('now')`,
|
||||
)
|
||||
.get(token) as UserRow | undefined
|
||||
if (!row) return null
|
||||
// 管理员角色以 ADMIN_EMAILS 配置为准(改配置即生效),数据库 role 仅作冗余存储
|
||||
row.role = isAdminEmail(row.email) ? 'admin' : 'user'
|
||||
return row
|
||||
return row ?? null
|
||||
}
|
||||
|
||||
/** 从请求 Cookie 中解析当前登录用户 */
|
||||
@@ -112,7 +108,7 @@ export function clearSessionCookie(event: H3Event): void {
|
||||
deleteCookie(event, SESSION_COOKIE, { path: '/' })
|
||||
}
|
||||
|
||||
/** 返回给前端的脱敏用户对象(含 admin 角色,供个人中心展示) */
|
||||
/** 返回给前端的脱敏用户对象(含 admin 角色,供个人中心/后台展示) */
|
||||
export function toPublicUser(user: UserRow): {
|
||||
id: number
|
||||
username: string
|
||||
@@ -121,14 +117,12 @@ export function toPublicUser(user: UserRow): {
|
||||
role: 'user' | 'admin'
|
||||
createdAt: string
|
||||
} {
|
||||
// 管理员角色跟随 ADMIN_EMAILS 配置实时判定,保证改配置即生效
|
||||
const role: 'user' | 'admin' = isAdminEmail(user.email) ? 'admin' : 'user'
|
||||
return {
|
||||
id: user.id,
|
||||
username: user.username,
|
||||
email: user.email,
|
||||
phone: user.phone,
|
||||
role,
|
||||
role: user.role,
|
||||
createdAt: user.created_at,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@ export interface AppConfig {
|
||||
}
|
||||
contactTo: string
|
||||
adminEmails: string[]
|
||||
/** 首次初始化时预置 admin 账号的密码(NUXT_ADMIN_INITIAL_PASSWORD),未设则不预置 */
|
||||
adminInitialPassword: string
|
||||
siteUrl: string
|
||||
}
|
||||
|
||||
@@ -46,6 +48,7 @@ export function getConfig(): AppConfig {
|
||||
.split(',')
|
||||
.map((s) => s.trim().toLowerCase())
|
||||
.filter(Boolean),
|
||||
adminInitialPassword: String((c as any).adminInitialPassword || ''),
|
||||
siteUrl: String((c.public as { siteUrl?: string })?.siteUrl || '').replace(/\/$/, ''),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
import { getDb, type ArticleBlock } from './db'
|
||||
|
||||
/**
|
||||
* 内容读取层(动态/作品)。
|
||||
* 统一负责 DB 行 -> 业务对象(解析 content/tags/gallery 的 JSON),
|
||||
* 供前台内容 API、后台管理 API、sitemap 共用。
|
||||
*/
|
||||
|
||||
export interface Article {
|
||||
id: number
|
||||
slug: string
|
||||
category: 'insights' | 'projects' | 'announcements'
|
||||
titleZh: string
|
||||
titleEn: string
|
||||
excerptZh: string
|
||||
excerptEn: string
|
||||
contentZh: ArticleBlock[]
|
||||
contentEn: ArticleBlock[]
|
||||
image: string | null
|
||||
date: string | null
|
||||
readTime: number
|
||||
author: string
|
||||
published: number
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
export interface Work {
|
||||
id: number
|
||||
slug: string
|
||||
category: 'webDesign' | 'branding' | 'development'
|
||||
titleZh: string
|
||||
titleEn: string
|
||||
descriptionZh: string
|
||||
descriptionEn: string
|
||||
overviewZh: string
|
||||
overviewEn: string
|
||||
challengeZh: string
|
||||
challengeEn: string
|
||||
solutionZh: string
|
||||
solutionEn: string
|
||||
clientZh: string
|
||||
clientEn: string
|
||||
durationZh: string
|
||||
durationEn: string
|
||||
year: string
|
||||
tags: string[]
|
||||
image: string | null
|
||||
gallery: string[]
|
||||
url: string | null
|
||||
published: number
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
const parseJson = <T>(value: string | null, fallback: T): T => {
|
||||
if (!value) return fallback
|
||||
try {
|
||||
return JSON.parse(value) as T
|
||||
} catch {
|
||||
return fallback
|
||||
}
|
||||
}
|
||||
|
||||
function rowToArticle(row: Record<string, unknown>): Article {
|
||||
return {
|
||||
id: Number(row.id),
|
||||
slug: String(row.slug),
|
||||
category: row.category as Article['category'],
|
||||
titleZh: String(row.title_zh),
|
||||
titleEn: String(row.title_en),
|
||||
excerptZh: String(row.excerpt_zh),
|
||||
excerptEn: String(row.excerpt_en),
|
||||
contentZh: parseJson<ArticleBlock[]>(String(row.content_zh ?? ''), []),
|
||||
contentEn: parseJson<ArticleBlock[]>(String(row.content_en ?? ''), []),
|
||||
image: row.image ? String(row.image) : null,
|
||||
date: row.date ? String(row.date) : null,
|
||||
readTime: Number(row.read_time) || 5,
|
||||
author: String(row.author),
|
||||
published: Number(row.published) || 0,
|
||||
createdAt: String(row.created_at),
|
||||
updatedAt: String(row.updated_at),
|
||||
}
|
||||
}
|
||||
|
||||
function rowToWork(row: Record<string, unknown>): Work {
|
||||
return {
|
||||
id: Number(row.id),
|
||||
slug: String(row.slug),
|
||||
category: row.category as Work['category'],
|
||||
titleZh: String(row.title_zh),
|
||||
titleEn: String(row.title_en),
|
||||
descriptionZh: String(row.description_zh),
|
||||
descriptionEn: String(row.description_en),
|
||||
overviewZh: String(row.overview_zh),
|
||||
overviewEn: String(row.overview_en),
|
||||
challengeZh: String(row.challenge_zh),
|
||||
challengeEn: String(row.challenge_en),
|
||||
solutionZh: String(row.solution_zh),
|
||||
solutionEn: String(row.solution_en),
|
||||
clientZh: String(row.client_zh),
|
||||
clientEn: String(row.client_en),
|
||||
durationZh: String(row.duration_zh),
|
||||
durationEn: String(row.duration_en),
|
||||
year: String(row.year),
|
||||
tags: parseJson<string[]>(String(row.tags ?? ''), []),
|
||||
image: row.image ? String(row.image) : null,
|
||||
gallery: parseJson<string[]>(String(row.gallery ?? ''), []),
|
||||
url: row.url ? String(row.url) : null,
|
||||
published: Number(row.published) || 0,
|
||||
createdAt: String(row.created_at),
|
||||
updatedAt: String(row.updated_at),
|
||||
}
|
||||
}
|
||||
|
||||
const ARTICLE_COLS = `id, slug, category, title_zh, title_en, excerpt_zh, excerpt_en, content_zh, content_en, image, date, read_time, author, published, created_at, updated_at`
|
||||
const WORK_COLS = `id, slug, category, title_zh, title_en, description_zh, description_en, overview_zh, overview_en, challenge_zh, challenge_en, solution_zh, solution_en, client_zh, client_en, duration_zh, duration_en, year, tags, image, gallery, url, published, created_at, updated_at`
|
||||
|
||||
export function listArticles(options: { publishedOnly?: boolean } = {}): Article[] {
|
||||
const { publishedOnly = true } = options
|
||||
const sql = `SELECT ${ARTICLE_COLS} FROM articles
|
||||
${publishedOnly ? 'WHERE published = 1' : ''}
|
||||
ORDER BY date DESC, id DESC`
|
||||
const rows = getDb().prepare(sql).all() as Array<Record<string, unknown>>
|
||||
return rows.map(rowToArticle)
|
||||
}
|
||||
|
||||
export function getArticleBySlug(slug: string, options: { publishedOnly?: boolean } = {}): Article | null {
|
||||
const { publishedOnly = true } = options
|
||||
const sql = `SELECT ${ARTICLE_COLS} FROM articles WHERE slug = ? ${publishedOnly ? 'AND published = 1' : ''}`
|
||||
const row = getDb().prepare(sql).get(slug) as Record<string, unknown> | undefined
|
||||
return row ? rowToArticle(row) : null
|
||||
}
|
||||
|
||||
export function listWorks(options: { publishedOnly?: boolean } = {}): Work[] {
|
||||
const { publishedOnly = true } = options
|
||||
const sql = `SELECT ${WORK_COLS} FROM works
|
||||
${publishedOnly ? 'WHERE published = 1' : ''}
|
||||
ORDER BY id ASC`
|
||||
const rows = getDb().prepare(sql).all() as Array<Record<string, unknown>>
|
||||
return rows.map(rowToWork)
|
||||
}
|
||||
|
||||
export function getWorkBySlug(slug: string, options: { publishedOnly?: boolean } = {}): Work | null {
|
||||
const { publishedOnly = true } = options
|
||||
const sql = `SELECT ${WORK_COLS} FROM works WHERE slug = ? ${publishedOnly ? 'AND published = 1' : ''}`
|
||||
const row = getDb().prepare(sql).get(slug) as Record<string, unknown> | undefined
|
||||
return row ? rowToWork(row) : null
|
||||
}
|
||||
|
||||
/** 后台统计 */
|
||||
export function getContentStats(): {
|
||||
articles: number
|
||||
works: number
|
||||
publishedArticles: number
|
||||
publishedWorks: number
|
||||
} {
|
||||
const db = getDb()
|
||||
const one = (sql: string) => (db.prepare(sql).get() as { c: number }).c
|
||||
return {
|
||||
articles: one('SELECT COUNT(*) AS c FROM articles'),
|
||||
works: one('SELECT COUNT(*) AS c FROM works'),
|
||||
publishedArticles: one('SELECT COUNT(*) AS c FROM articles WHERE published = 1'),
|
||||
publishedWorks: one('SELECT COUNT(*) AS c FROM works WHERE published = 1'),
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,15 @@
|
||||
import Database from 'better-sqlite3'
|
||||
import { mkdirSync } from 'node:fs'
|
||||
import { dirname } from 'node:path'
|
||||
import { scryptSync, randomBytes } from 'node:crypto'
|
||||
import { getConfig } from './config'
|
||||
import { articlesSeed, worksSeed } from './seed'
|
||||
|
||||
/** 文章正文内容块 */
|
||||
export interface ArticleBlock {
|
||||
type: 'paragraph' | 'heading' | 'quote' | 'image'
|
||||
text: string
|
||||
}
|
||||
|
||||
/**
|
||||
* SQLite 数据层单例。
|
||||
@@ -30,6 +38,7 @@ export function getDb(): Database.Database {
|
||||
_db.pragma('journal_mode = WAL')
|
||||
_db.pragma('foreign_keys = ON')
|
||||
migrate(_db)
|
||||
seedIfEmpty(_db)
|
||||
return _db
|
||||
}
|
||||
|
||||
@@ -89,9 +98,120 @@ function migrate(db: Database.Database): void {
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_comments_news ON comments(news_slug);
|
||||
|
||||
-- 内容管理系统:动态(articles)与作品(works)
|
||||
CREATE TABLE IF NOT EXISTS articles (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
slug TEXT NOT NULL UNIQUE,
|
||||
category TEXT NOT NULL,
|
||||
title_zh TEXT NOT NULL,
|
||||
title_en TEXT NOT NULL,
|
||||
excerpt_zh TEXT NOT NULL,
|
||||
excerpt_en TEXT NOT NULL,
|
||||
content_zh TEXT NOT NULL DEFAULT '[]',
|
||||
content_en TEXT NOT NULL DEFAULT '[]',
|
||||
image TEXT,
|
||||
date TEXT,
|
||||
read_time INTEGER NOT NULL DEFAULT 5,
|
||||
author TEXT NOT NULL DEFAULT 'ArcticNewOne',
|
||||
published INTEGER NOT NULL DEFAULT 1,
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_articles_category ON articles(category);
|
||||
CREATE INDEX IF NOT EXISTS idx_articles_published ON articles(published);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS works (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
slug TEXT NOT NULL UNIQUE,
|
||||
category TEXT NOT NULL,
|
||||
title_zh TEXT NOT NULL,
|
||||
title_en TEXT NOT NULL,
|
||||
description_zh TEXT NOT NULL,
|
||||
description_en TEXT NOT NULL,
|
||||
overview_zh TEXT NOT NULL DEFAULT '',
|
||||
overview_en TEXT NOT NULL DEFAULT '',
|
||||
challenge_zh TEXT NOT NULL DEFAULT '',
|
||||
challenge_en TEXT NOT NULL DEFAULT '',
|
||||
solution_zh TEXT NOT NULL DEFAULT '',
|
||||
solution_en TEXT NOT NULL DEFAULT '',
|
||||
client_zh TEXT NOT NULL DEFAULT '',
|
||||
client_en TEXT NOT NULL DEFAULT '',
|
||||
duration_zh TEXT NOT NULL DEFAULT '',
|
||||
duration_en TEXT NOT NULL DEFAULT '',
|
||||
year TEXT NOT NULL DEFAULT '',
|
||||
tags TEXT NOT NULL DEFAULT '[]',
|
||||
image TEXT,
|
||||
gallery TEXT NOT NULL DEFAULT '[]',
|
||||
url TEXT,
|
||||
published INTEGER NOT NULL DEFAULT 1,
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_works_category ON works(category);
|
||||
CREATE INDEX IF NOT EXISTS idx_works_published ON works(published);
|
||||
`)
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化种子数据:内容表为空时灌入 articles/works 种子;
|
||||
* users 为空且配置了 adminInitialPassword 时创建预置管理员。
|
||||
*/
|
||||
function seedIfEmpty(db: Database.Database): void {
|
||||
const { adminInitialPassword, adminEmails } = getConfig()
|
||||
|
||||
const articleCount = (db.prepare('SELECT COUNT(*) AS c FROM articles').get() as { c: number }).c
|
||||
if (articleCount === 0) {
|
||||
const insert = db.prepare(
|
||||
`INSERT INTO articles
|
||||
(slug, category, title_zh, title_en, excerpt_zh, excerpt_en, content_zh, content_en, image, date, read_time, author, published)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
||||
)
|
||||
const tx = db.transaction(() => {
|
||||
for (const a of articlesSeed) {
|
||||
insert.run(a.slug, a.category, a.titleZh, a.titleEn, a.excerptZh, a.excerptEn,
|
||||
JSON.stringify(a.contentZh), JSON.stringify(a.contentEn), a.image, a.date, a.readTime, a.author, a.published)
|
||||
}
|
||||
})
|
||||
tx()
|
||||
}
|
||||
|
||||
const workCount = (db.prepare('SELECT COUNT(*) AS c FROM works').get() as { c: number }).c
|
||||
if (workCount === 0) {
|
||||
const insert = db.prepare(
|
||||
`INSERT INTO works
|
||||
(slug, category, title_zh, title_en, description_zh, description_en,
|
||||
overview_zh, overview_en, challenge_zh, challenge_en, solution_zh, solution_en,
|
||||
client_zh, client_en, duration_zh, duration_en, year, tags, image, gallery, url, published)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
||||
)
|
||||
const tx = db.transaction(() => {
|
||||
for (const w of worksSeed) {
|
||||
insert.run(w.slug, w.category, w.titleZh, w.titleEn, w.descriptionZh, w.descriptionEn,
|
||||
w.overviewZh, w.overviewEn, w.challengeZh, w.challengeEn, w.solutionZh, w.solutionEn,
|
||||
w.clientZh, w.clientEn, w.durationZh, w.durationEn, w.year,
|
||||
JSON.stringify(w.tags), w.image, JSON.stringify(w.gallery), w.url, w.published)
|
||||
}
|
||||
})
|
||||
tx()
|
||||
}
|
||||
|
||||
// 预置管理员(仅当首次初始化且配置了初始密码)
|
||||
const userCount = (db.prepare('SELECT COUNT(*) AS c FROM users').get() as { c: number }).c
|
||||
if (userCount === 0 && adminInitialPassword && adminEmails.length > 0) {
|
||||
const email = adminEmails[0]
|
||||
const username = 'admin'
|
||||
// 与 auth.ts 相同的 salt:hash 存储格式(scrypt)
|
||||
const salt = randomBytes(16).toString('hex')
|
||||
const hash = scryptSync(adminInitialPassword, salt, 64).toString('hex')
|
||||
db.prepare('INSERT INTO users (username, email, password_hash, role) VALUES (?, ?, ?, ?)')
|
||||
.run(username, email, `${salt}:${hash}`, 'admin')
|
||||
console.log('[seed] 已创建预置管理员账号: admin(邮箱 ' + email + ')')
|
||||
}
|
||||
}
|
||||
|
||||
/** 供服务端任意位置安全关闭数据库(测试/热更新用) */
|
||||
export function closeDb(): void {
|
||||
if (_db) {
|
||||
|
||||
@@ -0,0 +1,737 @@
|
||||
/**
|
||||
* 种子数据(由 scripts/generate-seed.mjs 生成,勿手改)。
|
||||
* 站点初始内容:6 篇动态 + 6 个作品(中英双语)。
|
||||
* DB 初始化(migrate)时若对应表为空则自动灌入。
|
||||
*/
|
||||
import type { ArticleBlock } from './db'
|
||||
|
||||
export interface ArticleSeed {
|
||||
slug: string
|
||||
category: 'insights' | 'projects' | 'announcements'
|
||||
titleZh: string
|
||||
titleEn: string
|
||||
excerptZh: string
|
||||
excerptEn: string
|
||||
contentZh: ArticleBlock[]
|
||||
contentEn: ArticleBlock[]
|
||||
image: string
|
||||
date: string
|
||||
readTime: number
|
||||
author: string
|
||||
published: number
|
||||
}
|
||||
|
||||
export interface WorkSeed {
|
||||
slug: string
|
||||
category: 'webDesign' | 'branding' | 'development'
|
||||
titleZh: string
|
||||
titleEn: string
|
||||
descriptionZh: string
|
||||
descriptionEn: string
|
||||
overviewZh: string
|
||||
overviewEn: string
|
||||
challengeZh: string
|
||||
challengeEn: string
|
||||
solutionZh: string
|
||||
solutionEn: string
|
||||
clientZh: string
|
||||
clientEn: string
|
||||
durationZh: string
|
||||
durationEn: string
|
||||
year: string
|
||||
tags: string[]
|
||||
image: string
|
||||
gallery: string[]
|
||||
url: string | null
|
||||
published: number
|
||||
}
|
||||
|
||||
export const articlesSeed: ArticleSeed[] = [
|
||||
{
|
||||
"slug": "design-trends-2026",
|
||||
"category": "insights",
|
||||
"titleZh": "2026 年设计趋势展望",
|
||||
"titleEn": "Design Trends Shaping 2026",
|
||||
"excerptZh": "从极简主义的回归到大胆排版的兴起,从 3D 元素普及到 AI 辅助设计成熟,探索塑造今年数字体验的前沿趋势。",
|
||||
"excerptEn": "Explore the emerging design trends defining digital experiences this year, from minimalism to bold typography.",
|
||||
"contentZh": [
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "2026 年,设计行业正在经历一场深刻的变革。从极简主义的回归到大胆排版的兴起,从 3D 元素的普及到 AI 辅助设计的成熟,这些趋势正在重新定义数字体验的边界。作为设计从业者,我们需要紧跟这些变化,才能为客户创造更具竞争力的作品。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "极简主义的回归"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "在信息过载的时代,用户越来越渴望简洁、清晰的界面。2026 年的极简主义不再是简单的「少即是多」,而是通过精心的信息架构和视觉层次,在有限的空间内传达更多价值。留白不再是空白,而是一种有意为之的设计语言。"
|
||||
},
|
||||
{
|
||||
"type": "quote",
|
||||
"text": "好的设计不是添加更多,而是去除不必要的。在 2026 年,这一点比以往任何时候都更加重要。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "大胆排版与动态文字"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "排版正在从配角变成主角。大尺寸、高对比度的字体设计正在成为品牌表达的重要手段。动态文字效果的普及,让排版不再是静态的装饰,而是能够与用户互动的活元素。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "AI 辅助设计的成熟"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "AI 工具正在从「替代设计师」转向「增强设计师」。智能布局建议、自动化配色方案、实时设计反馈等功能,让设计师能够专注于创意和策略,而非重复性的执行工作。"
|
||||
}
|
||||
],
|
||||
"contentEn": [
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "In 2026, the design industry is undergoing a profound transformation. From the return of minimalism to the rise of bold typography, from the普及 of 3D elements to the maturity of AI-assisted design, these trends are redefining the boundaries of digital experiences."
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "The Return of Minimalism"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "In an age of information overload, users increasingly渴望 clean, clear interfaces. 2026's minimalism isn't just 'less is more' — it's about delivering more value in limited space through careful information architecture and visual hierarchy."
|
||||
},
|
||||
{
|
||||
"type": "quote",
|
||||
"text": "Good design isn't about adding more, it's about removing the unnecessary. In 2026, this matters more than ever."
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "Bold Typography & Dynamic Text"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "Typography is moving from supporting actor to leading role. Large, high-contrast font designs are becoming important brand expression tools. Dynamic text effects are making typography a living, interactive element rather than static decoration."
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "Maturity of AI-Assisted Design"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "AI tools are shifting from 'replacing designers' to 'empowering designers.' Smart layout suggestions, automated color schemes, and real-time design feedback let designers focus on creativity and strategy rather than repetitive execution."
|
||||
}
|
||||
],
|
||||
"image": "https://picsum.photos/id/1/800/500",
|
||||
"date": "2026-05-28",
|
||||
"readTime": 5,
|
||||
"author": "ArcticNewOne",
|
||||
"published": 1
|
||||
},
|
||||
{
|
||||
"slug": "forma-digital-launch",
|
||||
"category": "projects",
|
||||
"titleZh": "Forma Digital 电商平台正式上线",
|
||||
"titleEn": "Forma Digital Platform Launch",
|
||||
"excerptZh": "我们很高兴地宣布 Forma Digital 电商平台正式上线,上线后转化率提升 45%。",
|
||||
"excerptEn": "We are excited to announce the successful launch of Forma Digital, a revolutionary e-commerce experience.",
|
||||
"contentZh": [
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "经过三个月的精心打造,我们很高兴地宣布 Forma Digital 电商平台正式上线!这个项目是我们团队迄今为止最具挑战性的作品之一,也是我们技术实力和设计能力的集中体现。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "项目背景"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "Forma Digital 是一家专注于高端家居用品的电商品牌。他们需要一个能够完美展示产品质感、提供流畅购物体验的平台。原有的网站存在加载缓慢、移动端体验差、转化率低等问题。"
|
||||
},
|
||||
{
|
||||
"type": "quote",
|
||||
"text": "北极新一团队不仅理解我们的需求,更超越了我们的期望。新平台上线后,我们的转化率提升了 45%。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "技术亮点"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "我们采用了 React + Next.js 技术栈,实现了服务端渲染和静态生成。通过图片懒加载、代码分割、CDN 加速等技术手段,将首屏加载时间从 4.5 秒降低到 1.2 秒。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "成果展示"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "新平台上线后,用户停留时间增加了 60%,跳出率降低了 35%,转化率提升了 45%。客户对新平台的设计和性能都非常满意。"
|
||||
}
|
||||
],
|
||||
"contentEn": [
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "After three months of careful crafting, we're excited to announce the official launch of the Forma Digital e-commerce platform! This project is one of our team's most challenging works to date."
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "Project Background"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "Forma Digital is an e-commerce brand focusing on premium home goods. They needed a platform that could perfectly showcase product quality while delivering a smooth shopping experience."
|
||||
},
|
||||
{
|
||||
"type": "quote",
|
||||
"text": "The ArcticNewOne team not only understood our needs but exceeded our expectations. After the new platform launched, our conversion rate increased by 45%."
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "Technical Highlights"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "We used React + Next.js for server-side rendering and static generation. Through lazy loading, code splitting, and CDN acceleration, we reduced first load time from 4.5s to 1.2s."
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "Results"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "After launch, user停留 time increased by 60%, bounce rate decreased by 35%, and conversion rate improved by 45%."
|
||||
}
|
||||
],
|
||||
"image": "https://picsum.photos/id/201/800/500",
|
||||
"date": "2026-05-15",
|
||||
"readTime": 3,
|
||||
"author": "ArcticNewOne",
|
||||
"published": 1
|
||||
},
|
||||
{
|
||||
"slug": "studio-expansion",
|
||||
"category": "announcements",
|
||||
"titleZh": "工作室扩张公告",
|
||||
"titleEn": "Studio Expansion Announcement",
|
||||
"excerptZh": "ArcticNewOne 正在成长!我们正在扩展团队与服务能力,以更好地服务客户。",
|
||||
"excerptEn": "ArcticNewOne is growing! We are expanding our team and capabilities to serve you better.",
|
||||
"contentZh": [
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "随着业务的持续增长和客户需求的不断增加,我们很高兴地宣布 ArcticNewOne 工作室正式扩展!我们将增加新的团队成员,拓展服务能力,为客户提供更优质的数字化解决方案。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "团队扩展"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "我们将新增 5 名资深设计师和 3 名高级开发工程师,覆盖前端、后端、UI/UX 等多个领域。这些新成员都拥有丰富的行业经验,曾服务于多家知名企业。"
|
||||
},
|
||||
{
|
||||
"type": "quote",
|
||||
"text": "人才是我们最宝贵的资产。通过扩展团队,我们能够承接更多项目,同时保持一贯的高品质交付。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "服务升级"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "除了现有的网页设计、品牌设计、程序开发等服务,我们还将新增数据可视化、AI 应用开发、AR/VR 体验设计等前沿服务。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "展望未来"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "我们计划在未来一年内完成 50+ 项目,服务 30+ 新客户。同时,我们将继续深耕技术创新,探索更多可能性,为客户创造更大价值。"
|
||||
}
|
||||
],
|
||||
"contentEn": [
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "With continued business growth and increasing client demand, we're excited to announce the official expansion of ArcticNewOne Studio!"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "Team Growth"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "We're adding 5 senior designers and 3 senior developers covering frontend, backend, UI/UX, and more. All new members have extensive industry experience."
|
||||
},
|
||||
{
|
||||
"type": "quote",
|
||||
"text": "Talent is our most valuable asset. By expanding our team, we can take on more projects while maintaining consistent high-quality delivery."
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "Service Upgrade"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "In addition to existing services, we're adding data visualization, AI application development, AR/VR experience design, and other cutting-edge services."
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "Looking Ahead"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "We plan to complete 50+ projects and serve 30+ new clients in the coming year while continuing to explore new possibilities."
|
||||
}
|
||||
],
|
||||
"image": "https://picsum.photos/id/164/800/500",
|
||||
"date": "2026-05-10",
|
||||
"readTime": 2,
|
||||
"author": "ArcticNewOne",
|
||||
"published": 1
|
||||
},
|
||||
{
|
||||
"slug": "ux-research-methods",
|
||||
"category": "insights",
|
||||
"titleZh": "现代 UX 研究方法",
|
||||
"titleEn": "Modern UX Research Methods",
|
||||
"excerptZh": "深入解析影响我们设计决策的最新用户体验研究方法,从远程测试到行为数据分析。",
|
||||
"excerptEn": "Dive into the latest user experience research methodologies, from remote testing to behavioral analytics.",
|
||||
"contentZh": [
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "用户体验研究是设计决策的基础。在 2026 年,随着技术的发展和用户行为的变化,UX 研究方法也在不断演进。本文将介绍几种最有效的现代 UX 研究方法。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "远程用户测试"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "远程用户测试已经成为 UX 研究的主流方法。通过专业的远程测试平台,我们可以在短时间内招募到全球各地的测试用户,获取更广泛的反馈。"
|
||||
},
|
||||
{
|
||||
"type": "quote",
|
||||
"text": "远程测试不仅降低了成本,更重要的是让我们能够接触到更真实的用户场景。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "行为数据分析"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "通过热力图、滚动深度、点击流等行为数据,我们可以客观地了解用户如何与产品互动。这些数据弥补了传统访谈和问卷的不足,提供了更真实的用户行为洞察。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "AI 辅助分析"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "AI 工具正在帮助我们更高效地分析用户反馈。情感分析、主题聚类、趋势预测等功能,让我们能够从海量数据中快速提取有价值的洞察。"
|
||||
}
|
||||
],
|
||||
"contentEn": [
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "UX research is the foundation of design decisions. In 2026, as technology evolves and user behaviors change, UX research methods continue to advance."
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "Remote User Testing"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "Remote user testing has become mainstream. Through professional platforms, we can recruit test users globally and gather broader feedback in less time."
|
||||
},
|
||||
{
|
||||
"type": "quote",
|
||||
"text": "Remote testing not only reduces costs but more importantly lets us access more authentic user scenarios."
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "Behavioral Data Analysis"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "Through heatmaps, scroll depth, click streams, and other behavioral data, we can objectively understand how users interact with products."
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "AI-Assisted Analysis"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "AI tools help us analyze user feedback more efficiently. Sentiment analysis, topic clustering, and trend prediction help extract valuable insights from massive data."
|
||||
}
|
||||
],
|
||||
"image": "https://picsum.photos/id/180/800/500",
|
||||
"date": "2026-04-28",
|
||||
"readTime": 7,
|
||||
"author": "ArcticNewOne",
|
||||
"published": 1
|
||||
},
|
||||
{
|
||||
"slug": "bold-moves-case-study",
|
||||
"category": "projects",
|
||||
"titleZh": "Bold Moves:项目复盘",
|
||||
"titleEn": "Bold Moves: A Case Study",
|
||||
"excerptZh": "走进我们屡获殊荣的建筑可视化项目幕后,见证前沿 3D 技术如何重塑用户体验。",
|
||||
"excerptEn": "Behind the scenes of our award-winning architectural visualization project featuring cutting-edge 3D technology.",
|
||||
"contentZh": [
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "Bold Moves 是一个展示创新建筑设计的交互式网站项目。本文将深入介绍这个项目的设计思路、技术实现和最终成果。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "设计理念"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "Bold Moves 希望通过数字方式展示建筑设计的魅力。我们决定采用 3D 可视化技术,让用户能够从任意角度欣赏建筑细节,获得沉浸式的体验。"
|
||||
},
|
||||
{
|
||||
"type": "quote",
|
||||
"text": "我们想要的不只是一个展示网站,而是一个能够让用户「走进」建筑的数字空间。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "技术挑战"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "高质量的 3D 渲染需要强大的计算能力,而网页端的性能有限。我们通过模型优化、LOD 技术、WebGL 渲染等手段,在保证视觉质量的同时,实现了流畅的交互体验。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "最终成果"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "项目上线后获得了广泛好评,赢得了多个设计奖项。用户平均停留时间超过 5 分钟,远高于行业平均水平。"
|
||||
}
|
||||
],
|
||||
"contentEn": [
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "Bold Moves is an interactive website showcasing innovative architectural designs. This article provides an in-depth look at the design思路, technical implementation, and final results."
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "Design Philosophy"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "Bold Moves wanted to showcase architectural beauty digitally. We decided to use 3D visualization to let users appreciate architectural details from any angle."
|
||||
},
|
||||
{
|
||||
"type": "quote",
|
||||
"text": "We didn't just want a showcase website — we wanted a digital space where users could 'walk into' the architecture."
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "Technical Challenges"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "High-quality 3D rendering requires significant computing power, but web performance is limited. We achieved smooth interactions through model optimization, LOD techniques, and WebGL rendering."
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "Final Results"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "The project received widespread acclaim and won multiple design awards. Average user停留 time exceeded 5 minutes, well above industry average."
|
||||
}
|
||||
],
|
||||
"image": "https://picsum.photos/id/119/800/500",
|
||||
"date": "2026-04-20",
|
||||
"readTime": 6,
|
||||
"author": "ArcticNewOne",
|
||||
"published": 1
|
||||
},
|
||||
{
|
||||
"slug": "new-tools-integration",
|
||||
"category": "announcements",
|
||||
"titleZh": "工具箱新增多款实用工具",
|
||||
"titleEn": "New Tools Added to Our Platform",
|
||||
"excerptZh": "看看我们工具箱的最新成员,覆盖设计、开发、协作,助你精简工作流、提升生产力。",
|
||||
"excerptEn": "Check out the latest additions to our toolbox across design, development and collaboration.",
|
||||
"contentZh": [
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "为了更好地服务客户,我们不断扩充和完善我们的工具箱。最近,我们新增了多款实用工具,涵盖设计、开发、协作等多个领域。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "设计工具升级"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "我们引入了最新的设计协作平台,支持实时多人编辑、版本管理、设计系统集成等功能。设计师和开发者可以在同一个平台上无缝协作。"
|
||||
},
|
||||
{
|
||||
"type": "quote",
|
||||
"text": "工欲善其事,必先利其器。好的工具能够大幅提升团队效率。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "开发工具增强"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "新增了自动化测试框架、性能监控工具、代码质量检查等开发工具。这些工具帮助我们在开发过程中及时发现和解决问题,保证代码质量。"
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "协作工具优化"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "我们升级了项目管理平台,新增了看板视图、时间追踪、资源分配等功能。项目经理可以更直观地掌控项目进度,团队成员可以更高效地协作。"
|
||||
}
|
||||
],
|
||||
"contentEn": [
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "To better serve our clients, we continuously expand and improve our toolbox. Recently, we've added several practical tools covering design, development, collaboration, and more."
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "Design Tool Upgrades"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "We've引入 the latest design collaboration platform supporting real-time multi-person editing, version management, and design system integration."
|
||||
},
|
||||
{
|
||||
"type": "quote",
|
||||
"text": "Good tools significantly boost team efficiency. The right toolchain is key to delivering quality work."
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "Development Tool Enhancements"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "Added automated testing frameworks, performance monitoring tools, and code quality checks to help identify and resolve issues during development."
|
||||
},
|
||||
{
|
||||
"type": "heading",
|
||||
"text": "Collaboration Tool Optimization"
|
||||
},
|
||||
{
|
||||
"type": "paragraph",
|
||||
"text": "We upgraded our project management platform with new Kanban views, time tracking, and resource allocation features for better project oversight."
|
||||
}
|
||||
],
|
||||
"image": "https://picsum.photos/id/326/800/500",
|
||||
"date": "2026-04-12",
|
||||
"readTime": 4,
|
||||
"author": "ArcticNewOne",
|
||||
"published": 1
|
||||
}
|
||||
]
|
||||
|
||||
export const worksSeed: WorkSeed[] = [
|
||||
{
|
||||
"slug": "forma-digital",
|
||||
"category": "webDesign",
|
||||
"titleZh": "Forma Digital",
|
||||
"titleEn": "Forma Digital",
|
||||
"descriptionZh": "现代化的电商平台,无缝用户体验与动态产品展示。",
|
||||
"descriptionEn": "A modern e-commerce platform with seamless user experience and dynamic product showcases.",
|
||||
"overviewZh": "Forma Digital 是一个现代化的电商平台,致力于为用户提供无缝的购物体验。我们重新设计了整个用户界面,采用极简主义设计风格,突出产品展示,提升转化率。",
|
||||
"overviewEn": "Forma Digital is a modern e-commerce platform designed to provide a seamless shopping experience. We redesigned the entire user interface with a minimalist design approach, focusing on product showcase and conversion optimization.",
|
||||
"challengeZh": "客户需要一个既能展示高端产品,又能提供流畅购物体验的平台。原有的网站加载缓慢,用户体验差,转化率低下。",
|
||||
"challengeEn": "The client needed a platform that could both showcase premium products and deliver a smooth shopping experience. The existing website was slow, had poor mobile experience, and low conversion rates.",
|
||||
"solutionZh": "我们采用了 React + Next.js 技术栈,实现了服务端渲染和静态生成,大幅提升加载速度。同时重新设计了产品展示页面,采用沉浸式大图展示,配合流畅的动画过渡。",
|
||||
"solutionEn": "We built the platform with React + Next.js, implementing server-side rendering and static generation for blazing fast load times. The product pages feature immersive large-format imagery with smooth animation transitions.",
|
||||
"clientZh": "Forma Digital Inc.",
|
||||
"clientEn": "Forma Digital Inc.",
|
||||
"durationZh": "3 个月",
|
||||
"durationEn": "3 months",
|
||||
"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"
|
||||
],
|
||||
"url": null,
|
||||
"published": 1
|
||||
},
|
||||
{
|
||||
"slug": "one-step",
|
||||
"category": "branding",
|
||||
"titleZh": "One Step",
|
||||
"titleEn": "One Step",
|
||||
"descriptionZh": "为健身应用打造的品牌形象与营销战役,聚焦可持续习惯养成。",
|
||||
"descriptionEn": "Brand identity and marketing campaign for a fitness app focused on sustainable habits.",
|
||||
"overviewZh": "One Step 是一款专注于健康习惯养成的健身应用。我们为其打造了完整的品牌视觉识别系统,包括 Logo 设计、UI 界面和营销物料。",
|
||||
"overviewEn": "One Step is a fitness app focused on building healthy habits. We created a complete brand visual identity system including logo design, UI interface, and marketing materials.",
|
||||
"challengeZh": "在竞争激烈的健身应用市场中,如何通过品牌设计脱颖而出,建立独特的品牌认知。",
|
||||
"challengeEn": "In the competitive fitness app market, how to stand out through brand design and establish unique brand recognition.",
|
||||
"solutionZh": "我们以「一步一个脚印」为核心理念,设计了简洁有力的品牌标识。采用渐变色彩和圆润的图形语言,传达健康、积极、向上的品牌调性。",
|
||||
"solutionEn": "With the core concept of 'one step at a time', we designed a clean and powerful brand identity. Using gradient colors and rounded graphic language to convey health, positivity, and progress.",
|
||||
"clientZh": "One Step Fitness",
|
||||
"clientEn": "One Step Fitness",
|
||||
"durationZh": "2 个月",
|
||||
"durationEn": "2 months",
|
||||
"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"
|
||||
],
|
||||
"url": null,
|
||||
"published": 1
|
||||
},
|
||||
{
|
||||
"slug": "nero-vision",
|
||||
"category": "development",
|
||||
"titleZh": "Nero Vision",
|
||||
"titleEn": "Nero Vision",
|
||||
"descriptionZh": "面向创意专业人士的全栈作品集管理应用。",
|
||||
"descriptionEn": "Full-stack web application for creative professionals to manage their portfolios.",
|
||||
"overviewZh": "Nero Vision 是一个面向创意专业人士的作品集管理平台,帮助设计师和艺术家展示和管理他们的创作。",
|
||||
"overviewEn": "Nero Vision is a portfolio management platform for creative professionals, helping designers and artists showcase and manage their work.",
|
||||
"challengeZh": "创意人士需要一个既能完美展示作品,又能方便管理的平台。现有解决方案要么太复杂,要么展示效果不佳。",
|
||||
"challengeEn": "Creative professionals need a platform that can perfectly showcase work while being easy to manage. Existing solutions are either too complex or have poor display quality.",
|
||||
"solutionZh": "我们采用 Vue.js + Node.js 全栈开发,设计了直观的拖拽式作品管理界面,配合精美的展示模板,让创意人士轻松打造个人品牌。",
|
||||
"solutionEn": "We developed a full-stack application with Vue.js + Node.js, designing an intuitive drag-and-drop portfolio management interface with beautiful display templates.",
|
||||
"clientZh": "Nero Studio",
|
||||
"clientEn": "Nero Studio",
|
||||
"durationZh": "4 个月",
|
||||
"durationEn": "4 months",
|
||||
"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"
|
||||
],
|
||||
"url": null,
|
||||
"published": 1
|
||||
},
|
||||
{
|
||||
"slug": "bold-moves",
|
||||
"category": "webDesign",
|
||||
"titleZh": "Bold Moves",
|
||||
"titleEn": "Bold Moves",
|
||||
"descriptionZh": "以 3D 可视化展示创新建筑设计的交互式网站。",
|
||||
"descriptionEn": "Interactive website showcasing innovative architectural designs with 3D visualizations.",
|
||||
"overviewZh": "Bold Moves 是一个展示创新建筑设计的交互式网站,通过 3D 可视化技术,让用户身临其境地体验建筑之美。",
|
||||
"overviewEn": "Bold Moves is an interactive website showcasing innovative architectural designs through 3D visualization technology, letting users experience architecture immersively.",
|
||||
"challengeZh": "如何将复杂的建筑设计以直观、吸引人的方式展示给普通用户,同时保持专业性。",
|
||||
"challengeEn": "How to present complex architectural designs in an intuitive and engaging way to general users while maintaining professionalism.",
|
||||
"solutionZh": "我们使用 Three.js 实现了高质量的 3D 渲染,配合流畅的交互设计,用户可以从任意角度欣赏建筑细节。同时加入了光影效果和材质展示,提升视觉冲击力。",
|
||||
"solutionEn": "We used Three.js for high-quality 3D rendering with smooth interactive design, allowing users to appreciate architectural details from any angle, with lighting effects and material displays.",
|
||||
"clientZh": "Bold Moves Architecture",
|
||||
"clientEn": "Bold Moves Architecture",
|
||||
"durationZh": "5 个月",
|
||||
"durationEn": "5 months",
|
||||
"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"
|
||||
],
|
||||
"url": null,
|
||||
"published": 1
|
||||
},
|
||||
{
|
||||
"slug": "echo-labs",
|
||||
"category": "branding",
|
||||
"titleZh": "Echo Labs",
|
||||
"titleEn": "Echo Labs",
|
||||
"descriptionZh": "AI 科技创业公司的企业品牌与视觉识别。",
|
||||
"descriptionEn": "Corporate branding and visual identity for a tech startup in the AI space.",
|
||||
"overviewZh": "Echo Labs 是一家 AI 领域的科技创业公司,我们为其打造了完整的品牌视觉识别系统和企业官网。",
|
||||
"overviewEn": "Echo Labs is an AI tech startup. We created a complete brand visual identity system and corporate website for them.",
|
||||
"challengeZh": "AI 领域的品牌需要既体现科技感,又要有人文温度,避免过于冷冰冰的技术感。",
|
||||
"challengeEn": "AI brands need to convey both technology and humanity, avoiding being too cold or technical.",
|
||||
"solutionZh": "我们以「回声」为概念,设计了富有动感的品牌标识。采用深色主题配合渐变色彩,营造科技感的同时,通过圆润的图形语言增添亲和力。",
|
||||
"solutionEn": "With the concept of 'echo', we designed a dynamic brand identity. Using dark themes with gradient colors for a tech feel, while rounded graphic language adds approachability.",
|
||||
"clientZh": "Echo Labs AI",
|
||||
"clientEn": "Echo Labs AI",
|
||||
"durationZh": "3 个月",
|
||||
"durationEn": "3 months",
|
||||
"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"
|
||||
],
|
||||
"url": null,
|
||||
"published": 1
|
||||
},
|
||||
{
|
||||
"slug": "flux-api",
|
||||
"category": "development",
|
||||
"titleZh": "Flux API",
|
||||
"titleEn": "Flux API",
|
||||
"descriptionZh": "具备完善文档与开发者工具的可扩展 REST API 服务。",
|
||||
"descriptionEn": "Scalable REST API with comprehensive documentation and developer tools.",
|
||||
"overviewZh": "Flux API 是一个可扩展的 REST API 服务平台,提供全面的文档和开发者工具,帮助开发者快速集成。",
|
||||
"overviewEn": "Flux API is a scalable REST API service platform with comprehensive documentation and developer tools to help developers integrate quickly.",
|
||||
"challengeZh": "API 文档和开发者体验是技术产品的核心竞争力,如何让复杂的 API 变得易于理解和使用。",
|
||||
"challengeEn": "API documentation and developer experience are core competitive advantages. How to make complex APIs easy to understand and use.",
|
||||
"solutionZh": "我们设计了交互式 API 文档,支持在线测试和代码生成。同时提供了多语言 SDK 和详细的教程,大幅降低开发者的学习成本。",
|
||||
"solutionEn": "We designed interactive API documentation with online testing and code generation. Multi-language SDKs and detailed tutorials significantly reduce the learning curve for developers.",
|
||||
"clientZh": "Flux Technologies",
|
||||
"clientEn": "Flux Technologies",
|
||||
"durationZh": "6 个月",
|
||||
"durationEn": "6 months",
|
||||
"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"
|
||||
],
|
||||
"url": null,
|
||||
"published": 1
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,49 @@
|
||||
import type { ArticleBlock } from './db'
|
||||
|
||||
/**
|
||||
* 后台内容校验/归一化(articles / works 的 post/patch 共用)。
|
||||
*/
|
||||
|
||||
export const ARTICLE_CATEGORIES = ['insights', 'projects', 'announcements']
|
||||
export const WORK_CATEGORIES = ['webDesign', 'branding', 'development']
|
||||
export const BLOCK_TYPES = ['paragraph', 'heading', 'quote', 'image']
|
||||
|
||||
export function normalizeSlug(value: unknown): string {
|
||||
return String(value ?? '').trim()
|
||||
}
|
||||
|
||||
export function isValidSlug(slug: string): boolean {
|
||||
return /^[a-z0-9-]{2,64}$/.test(slug)
|
||||
}
|
||||
|
||||
export function isValidArticleCategory(value: unknown): boolean {
|
||||
return typeof value === 'string' && ARTICLE_CATEGORIES.includes(value)
|
||||
}
|
||||
|
||||
export function isValidWorkCategory(value: unknown): boolean {
|
||||
return typeof value === 'string' && WORK_CATEGORIES.includes(value)
|
||||
}
|
||||
|
||||
/** 归一化内容块数组(过滤非法块) */
|
||||
export function normalizeBlocks(value: unknown): ArticleBlock[] {
|
||||
if (!Array.isArray(value)) return []
|
||||
return value
|
||||
.filter(
|
||||
(b): b is ArticleBlock =>
|
||||
!!b &&
|
||||
typeof b === 'object' &&
|
||||
BLOCK_TYPES.includes((b as ArticleBlock).type) &&
|
||||
typeof (b as ArticleBlock).text === 'string',
|
||||
)
|
||||
.map((b) => ({ type: b.type, text: b.text.slice(0, 20000) }))
|
||||
}
|
||||
|
||||
export function normalizeTags(value: unknown): string[] {
|
||||
if (!Array.isArray(value)) return []
|
||||
return value.filter((t): t is string => typeof t === 'string' && t.trim()).map((t) => t.trim()).slice(0, 20)
|
||||
}
|
||||
|
||||
export function normalizeGallery(value: unknown): string[] {
|
||||
if (!Array.isArray(value)) return []
|
||||
return value.filter((u): u is string => typeof u === 'string' && u.trim()).map((u) => u.trim()).slice(0, 20)
|
||||
}
|
||||
Reference in New Issue
Block a user