feat: 앱 나머지 화면 이전 — 게시물 카드·시트·각/노을/주말/계절 탭·움직임
- 게시물 카드 슬라이드 7종, 좋아요·댓글, 텍스트 공유 - 시트 7종(RN Modal), 위 막대 지역·계절·로그인/아바타 - 각·노을·주말·행사·계절·상식 탭, 당겨서 새로고침 - 히어로 해·구름·비·눈 움직임, 스켈레톤 깜빡임, 첫 로딩 덮개, 하늘색 전환
This commit is contained in:
1 parent
28ff032160
commit
f71dd2cebb
33 files changed
+2786
-75
No files matched your search
@@ -0,0 +1,56 @@
|
||||
import type { IndexSummary } from '@nalssigak/shared/api/client/types.gen';
|
||||
import { MEDALS } from '@nalssigak/shared/lib';
|
||||
import { LinearGradient } from 'expo-linear-gradient';
|
||||
import { Pressable, Text, View } from 'react-native';
|
||||
|
||||
import { Ic, Skel } from '@/components/ui';
|
||||
import { useSheet } from '@/lib/sheet';
|
||||
import { useSky } from '@/lib/sky';
|
||||
|
||||
// 가운데가 높은 3칸: 2위 · 1위 · 3위
|
||||
const ORDER = [1, 0, 2] as const;
|
||||
const FLEX = [1.15, 1, 1];
|
||||
|
||||
/** 1~3위 받침대와 같은 칸의 스켈레톤 */
|
||||
export function PodiumSkel() {
|
||||
return (
|
||||
<View className="flex-row gap-1.5 px-3 pt-3">
|
||||
{ORDER.map((k) => (
|
||||
<View key={k} style={{ flex: FLEX[k] }} className={`items-center gap-1.5 rounded-3xl border-b-[6px] border-shade bg-card px-1.5 ${k === 0 ? 'py-4' : 'mt-6 py-3'}`}>
|
||||
<View className={`aspect-square rounded-full bg-skel ${k === 0 ? 'w-20' : 'w-[62px]'}`} />
|
||||
<Skel className="w-16" />
|
||||
<Skel className="h-6 w-10" />
|
||||
<Skel className="w-full" />
|
||||
</View>
|
||||
))}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
export function Podium({ top, dim }: { top: IndexSummary[]; dim: boolean }) {
|
||||
const { open } = useSheet();
|
||||
const { kind } = useSky();
|
||||
return (
|
||||
<View className="flex-row gap-1.5 px-3 pt-3" style={{ opacity: dim ? 0.6 : 1 }}>
|
||||
{ORDER.map((k) => {
|
||||
const g = top[k];
|
||||
return (
|
||||
<Pressable key={g.index_id} style={{ flex: FLEX[k] }} onPress={() => open({ type: 'gak', indexId: g.index_id })} className={`items-center overflow-hidden rounded-3xl border-b-[6px] border-shade bg-card px-1.5 ${k === 0 ? 'py-4' : 'mt-6 py-3'}`}>
|
||||
{k === 0 && kind !== 'night' && <LinearGradient colors={['#fff1c4', '#ffffff']} style={{ position: 'absolute', inset: 0 }} />}
|
||||
<View>
|
||||
<Ic name={g.icon} size={k === 0 ? 80 : 62} />
|
||||
<Ic name={MEDALS[k]} size={28} style={{ position: 'absolute', top: -6, left: -12 }} />
|
||||
</View>
|
||||
<View className="mt-1.5 flex-1 justify-center">
|
||||
<Text className="text-center font-jua text-base text-ink">
|
||||
{k + 1}위 {g.name}
|
||||
</Text>
|
||||
</View>
|
||||
<Text className="font-bagel text-[30px] leading-[32px] text-orange">{g.score}</Text>
|
||||
{g.summary && <Text className="text-center text-[11.5px] font-semibold text-ink2">{g.summary}</Text>}
|
||||
</Pressable>
|
||||
);
|
||||
})}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user