feat: 앱을 웹과 맞춤 — 좋아요 하트·토스트, 별똥별, 단풍잎, 고운바탕, 안내 높이 유지, 시트 배경 페이드
This commit is contained in:
1 parent
865c521ab8
commit
b5d9adf396
19 files changed
+247
-52
No files matched your search
@@ -9,6 +9,7 @@ import { LinearGradient } from 'expo-linear-gradient';
|
||||
import Svg, { Defs, Path, RadialGradient, Rect, Stop } from 'react-native-svg';
|
||||
|
||||
import { Fall } from '@/components/fall';
|
||||
import { Shoot, type ShootSpec } from '@/components/sky-bg';
|
||||
import { Ic, Skel } from '@/components/ui';
|
||||
import { useSheet } from '@/lib/sheet';
|
||||
import { useSky } from '@/lib/sky';
|
||||
@@ -31,6 +32,13 @@ const ORB: Record<'sun' | 'sunset' | 'night', { stops: [string, string, string,
|
||||
const STARS = Array.from({ length: 26 }, (_, i) => ({ left: `${(i * 37) % 100}%`, top: `${(i * 53) % 60}%`, opacity: 0.4 + ((i * 7) % 6) / 10 }) as const);
|
||||
|
||||
// 구름 자리·떨어지는 지연·둥둥 주기 (웹 CLOUDS). 구름 수: 구름 많음 둘, 흐림·비·눈 셋
|
||||
// 별똥별 셋: 위치·길이·주기를 엇갈려 하나씩 떨어지게 (웹 TodayPage SHOOTS, 밀리초)
|
||||
const SHOOTS: ShootSpec[] = [
|
||||
{ top: '6%', left: '80%', len: 90, dur: 7000, dl: 1500 },
|
||||
{ top: '20%', left: '52%', len: 70, dur: 9000, dl: 4000 },
|
||||
{ top: '34%', left: '94%', len: 80, dur: 11000, dl: 6500 },
|
||||
];
|
||||
|
||||
const CLOUDS = [
|
||||
{ top: 36, left: '5%', w: 84, h: 32, d: 100, f: 6000 },
|
||||
{ top: 96, left: '63%', w: 96, h: 36, d: 250, f: 6400 },
|
||||
@@ -136,6 +144,7 @@ export function Hero({ hero, today, ranked, feedLoad, todayLoad }: Props) {
|
||||
<View className="mx-3 mt-1 overflow-hidden rounded-[28px] px-4 pt-3 pb-3">
|
||||
<LinearGradient colors={HERO_BG[gray ? 'gray' : kind]} locations={kind === 'night' ? [0, 0.6, 1] : [0, 0.5, 1]} style={{ position: 'absolute', inset: 0 }} />
|
||||
{kind === 'night' && STARS.map((s, i) => <View key={i} className="absolute size-[3px] rounded-full bg-white" style={{ left: s.left, top: s.top, opacity: s.opacity }} />)}
|
||||
{kind === 'night' && SHOOTS.map((s, i) => <Shoot key={i} {...s} />)}
|
||||
{(rain || snow) && (
|
||||
<View pointerEvents="none" style={{ position: 'absolute', inset: 0 }}>
|
||||
{rain && DROPS.map((p, i) => <Particle key={`r${i}`} {...p} snow={false} light={dark} />)}
|
||||
|
||||
Reference in new issue
Block a user