refactor(data): consolidate data layer under services namespace

- Move src/data/{api,dto,schemas} directories to src/data/services/*
- Update all relative imports across the codebase to reference new paths
- Use CSS color tokens for splash button gradient in splash-button.module.css
- Add responsive sizes attribute to splash background image
- Add JSDoc documentation to splash-background component referencing original Dart implementation
This commit is contained in:
2026-06-09 16:44:05 +08:00
parent 763bec4e74
commit 661e417619
98 changed files with 57 additions and 44 deletions
@@ -1,4 +1,17 @@
"use client";
/**
* Splash 背景图片
*
* 原始 Dart: lib/ui/splash/widgets/splash_background.dart
* `SizedBox.expand(child: Assets.images.picBgHome.image(fit: BoxFit.cover))`
* 资源: /public/images/splash/pic-bg-home.png (kebab-case 重命名后)
* 原名: pic_bg_home.png (snake_case)
*
* sizes 属性说明:
* 图片在 MobileShell 内(max-width: 500px)。
* - 视口 ≤ 500pxMobileShell = 100vw,图片 = 100vw
* - 视口 > 500pxMobileShell = 500px,图片 = 500px
*/
import Image from "next/image";
import styles from "./splash-background.module.css";
@@ -10,7 +23,7 @@ export function SplashBackground() {
alt=""
fill
priority
sizes="100vw"
sizes="(max-width: 500px) 100vw, 500px"
className={styles.image}
/>
</div>
@@ -34,10 +34,11 @@
padding: 0 30px;
border: 0;
border-radius: 24px;
/* 渐变色引用 tokens/colors.css 中定义的 token */
background: linear-gradient(
to right,
#fff96ade,
#fff657a0
var(--color-button-gradient-start),
var(--color-button-gradient-end)
);
color: #ffffff;
font-weight: 700;