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 等未渲染问题
This commit is contained in:
@@ -3,6 +3,7 @@ import { onMounted, onUnmounted, ref, nextTick } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import gsap from 'gsap'
|
||||
import { ScrollTrigger } from 'gsap/ScrollTrigger'
|
||||
import { workItems } from '~/data/work'
|
||||
|
||||
gsap.registerPlugin(ScrollTrigger)
|
||||
|
||||
@@ -49,46 +50,6 @@ const partners = [
|
||||
},
|
||||
]
|
||||
|
||||
const toImageUrl = (prompt: string, imageSize: string) => {
|
||||
const encoded = encodeURIComponent(prompt)
|
||||
return `https://coresg-normal.trae.ai/api/ide/v1/text_to_image?prompt=${encoded}&image_size=${imageSize}`
|
||||
}
|
||||
|
||||
const workItems = [
|
||||
{
|
||||
titleKey: 'home.work.items.forma',
|
||||
year: '26',
|
||||
image: toImageUrl(
|
||||
'high-end editorial product still life, minimal composition, matte ceramics and brushed aluminum on soft neutral background, studio lighting, shallow depth of field, premium, clean, realistic, 35mm photo',
|
||||
'landscape_16_9'
|
||||
),
|
||||
},
|
||||
{
|
||||
titleKey: 'home.work.items.oneStep',
|
||||
year: '24',
|
||||
image: toImageUrl(
|
||||
'architectural close-up, modern brutalist concrete facade with sharp shadows, minimal, cinematic lighting, high contrast, ultra realistic, 35mm photography, no people',
|
||||
'landscape_16_9'
|
||||
),
|
||||
},
|
||||
{
|
||||
titleKey: 'home.work.items.neroVision',
|
||||
year: '25',
|
||||
image: toImageUrl(
|
||||
'minimal graphic poster photographed in studio, black ink typography on off-white textured paper, premium editorial style, soft shadow, ultra realistic, no people',
|
||||
'landscape_16_9'
|
||||
),
|
||||
},
|
||||
{
|
||||
titleKey: 'home.work.items.boldMoves',
|
||||
year: '24',
|
||||
image: toImageUrl(
|
||||
'moody nighttime city street still life, neon reflection on wet asphalt, abstract bokeh, premium cinematic photography, no people, high detail',
|
||||
'landscape_16_9'
|
||||
),
|
||||
},
|
||||
] as const
|
||||
|
||||
let ctx: gsap.Context | null = null
|
||||
|
||||
const refresh = () => {
|
||||
@@ -140,12 +101,12 @@ onMounted(async () => {
|
||||
tl.to(
|
||||
next,
|
||||
{ y: 0, duration: 1, ease: 'power2.out' },
|
||||
start
|
||||
start,
|
||||
)
|
||||
tl.to(
|
||||
prev,
|
||||
{ scale: scaleTo, y: depthOffsetY, duration: 0.6, ease: 'power2.out' },
|
||||
start + 0.35
|
||||
start + 0.35,
|
||||
)
|
||||
tl.set(prev, { scale: scaleTo, y: depthOffsetY }, start + 1)
|
||||
}
|
||||
@@ -235,29 +196,30 @@ onUnmounted(() => {
|
||||
<div class="relative flex-1 h-full flex items-center">
|
||||
<div class="relative w-full h-[78svh] md:h-[82svh] lg:h-[88svh] p-[clamp(14px,2.4vw,28px)]">
|
||||
<div class="relative h-full w-full">
|
||||
<article
|
||||
v-for="(item, idx) in workItems"
|
||||
:key="`${item.titleKey}-${idx}`"
|
||||
ref="cardRefs"
|
||||
class="will-change-transform relative"
|
||||
>
|
||||
<img
|
||||
class="h-full w-full object-cover"
|
||||
:src="item.image"
|
||||
:alt="t(item.titleKey)"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
@load="refresh"
|
||||
/>
|
||||
<div class="absolute left-6 top-6 flex items-baseline gap-3">
|
||||
<p class="text-white text-sm md:text-base font-semibold tracking-tight drop-shadow-[0_10px_18px_rgba(0,0,0,0.4)]">
|
||||
{{ t(item.titleKey) }}
|
||||
</p>
|
||||
<p class="text-white/80 text-xs md:text-sm font-semibold tracking-tight drop-shadow-[0_10px_18px_rgba(0,0,0,0.4)]">
|
||||
{{ item.year }} ©
|
||||
</p>
|
||||
</div>
|
||||
</article>
|
||||
<NuxtLink
|
||||
v-for="(item, idx) in workItems"
|
||||
:key="item.slug"
|
||||
:to="`/work/${item.slug}`"
|
||||
ref="cardRefs"
|
||||
class="will-change-transform relative block"
|
||||
>
|
||||
<img
|
||||
class="h-full w-full object-cover"
|
||||
:src="item.image"
|
||||
:alt="t(`work.items.${item.slug}.title`)"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
@load="refresh"
|
||||
/>
|
||||
<div class="absolute left-6 top-6 flex items-baseline gap-3">
|
||||
<p class="text-white text-sm md:text-base font-semibold tracking-tight drop-shadow-[0_10px_18px_rgba(0,0,0,0.4)]">
|
||||
{{ t(`work.items.${item.slug}.title`) }}
|
||||
</p>
|
||||
<p class="text-white/80 text-xs md:text-sm font-semibold tracking-tight drop-shadow-[0_10px_18px_rgba(0,0,0,0.4)]">
|
||||
{{ item.year }} ©
|
||||
</p>
|
||||
</div>
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user