import type { CSSProperties } from 'react'; import { getLocalizedPath, getTranslation, type Locale } from '../i18n/utils'; import { PLACEHOLDER_IMG } from '../placeholder'; import { cssVars } from './css'; import { Icon, statsIcons } from '../icons'; export default function Home({ locale }: { locale: Locale }) { const t = getTranslation(locale); const h = t.home; const stats = h.stats.items; const pillars = t.home.pillars.items; // 三语辅助:英文 / 繁体 / 简体 const tr = (en: string, hk: string, zh: string) => locale === 'en' ? en : locale === 'hk' ? hk : zh; const news = t.news.items.slice(0, 3); // 环绕中央玻璃球的轨道粒子:7 圈 · 16 颗发光点,linear 匀速,顺逆交错 // 半径 110~275px,明确围绕玻璃球(半径约 100px)外侧公转 const orbits = [ { r: 110, d: '11s', rev: false, dots: [{ sz: 5, a: '20deg' }, { sz: 4, a: '200deg' }] }, { r: 140, d: '14s', rev: true, dots: [{ sz: 5, a: '120deg' }, { sz: 4, a: '300deg' }] }, { r: 170, d: '17s', rev: false, dots: [{ sz: 4, a: '60deg' }, { sz: 4, a: '210deg' }] }, { r: 200, d: '20s', rev: true, dots: [{ sz: 4, a: '0deg' }, { sz: 3, a: '120deg' }, { sz: 3, a: '240deg' }] }, { r: 228, d: '23s', rev: false, dots: [{ sz: 3, a: '90deg' }, { sz: 3, a: '250deg' }] }, { r: 252, d: '26s', rev: true, dots: [{ sz: 3, a: '45deg' }, { sz: 3, a: '190deg' }, { sz: 3, a: '330deg' }] }, { r: 275, d: '29s', rev: false, dots: [{ sz: 3, a: '15deg' }, { sz: 3, a: '160deg' }] }, ] as const; return ( <> {/* ===== HERO:品牌背景图(玻璃球/水滴抽象,浅蓝+薰衣草,品牌色)+ 动态粒子 ===== */}
{/* 背景图:玻璃球/水滴主题图,匹配品牌色 */} {/* 粒子层:环绕中央玻璃球的轨道粒子(7 圈 / 16 颗,linear 匀速环绕) */}

{h.heroTitle}

{h.sloganIntro}

{h.heroCta}
{/* ===== 最新资讯(腾讯式三列卡片) ===== */}
NEWSROOM

{t.news.title}

{tr('View all news', '查看全部新聞', '查看全部新闻')}
{news.map((item, idx) => (
{item.title} {item.category}
{item.date}

{item.title}

))}
{/* ===== 大文案 + 向下滚动指示(腾讯式) ===== */}

{tr( 'BaskBuddy improves the quality of life for people around the world through innovative technology, products and services.', '巴適夥伴透過創新的科技、產品和服務,提升全球各地人們的生活品質。', '巴适伙伴通过创新的科技、产品和服务,提升全球各地人们的生活品质。', )}

SCROLL
{/* ===== 业务大图入口(黑底 · 文字左侧,对应腾讯 "面向消费者 / 企业 / 未来") ===== */}
{pillars.map((p, i) => ( {p.name} {/* 左深右透蒙层:保证左侧白色标题在浅色图上仍清晰 */}
{/* ===== 愿景带 + 巴适速度 大数字 ===== */}
OUR VISION

{tr('Value for Users, Tech for Good', '用戶為本 · 科技向善', '用户为本 · 科技向善')}

{tr( 'Connect people and services through innovative technology — creating a better life for users and long-term value for society.', '以創新技術連接人與服務,為用戶創造美好生活,為社會創造長期價值。', '以创新技术连接人与服务,为用户创造美好生活,为社会创造长期价值。', )}

{stats.map((sItem, idx) => (
{sItem.value} {sItem.suffix && {sItem.suffix}}
{sItem.label}
{sItem.sub}
))}
{/* ===== CTA Band ===== */}

{t.contact.subtitle}

{tr( 'Whether for a job inquiry or business cooperation, we look forward to meeting you with warmth.', '無論是求職諮詢還是商務合作,我們都期待與你溫暖相遇。', '无论是求职咨询还是商务合作,我们都期待与你温暖相遇。', )}

{t.contact.title} {tr('About Us', '了解我們', '了解我们')}
); }