feat: 피드 노을 카드도 결론·가장 붉을 때·쉬운 이유로, 노을 이유를 숫자 없는 쉬운 말로, 자세히에서 예보 모델 수 빼고 점수 뜻 설명, 노을 탭 오늘·주소 중복 칩 제거

This commit is contained in:
minaChoi committed 2026-10-12 10:09:09 +09:00
1 parent c30fac20a6
commit f5575711fe
10 files changed
+53 -42

No files matched your search

+4 -5
View File
@@ -130,11 +130,10 @@ function SlideView({ slide, bg }: { slide: Slide; bg: SlideBg }) {
return (
<div className={cx(slideBase, slide.situation ? `b-sit-${slide.situation}` : 'b-bg-dusk')}>
<Eyebrow>{slide.eyebrow}</Eyebrow>
<p className="m-0 mt-1.5 flex items-baseline gap-1.5">
<b className="font-bagel text-[52px] leading-none font-normal">{slide.score}</b>
<span className="font-jua text-[19px]">점 · {slide.grade_label}</span>
</p>
<p className="m-0 mt-1 font-jua text-[18px] leading-snug">
{/* 노을 탭 히어로와 같은 순서: 결론 → 가장 붉을 때 → 쉬운 이유. 점수는 노을 탭 '자세히'에 */}
<Big>{slide.headline ?? slide.grade_label}</Big>
{slide.peak_at && <p className="m-0 mt-0.5 font-jua text-[19px]">{clockShort(slide.peak_at)}쯤 가장 붉어요</p>}
<p className="m-0 mt-1 text-[13.5px] leading-snug font-bold opacity-90">
<Lines text={slide.line} />
</p>
<div className="mt-3 flex flex-1 flex-col gap-2">
+5 -10
View File
@@ -33,7 +33,7 @@ const HERO = 'relative mx-3 mt-1 min-h-[230px] overflow-hidden rounded-[32px] px
const THREE = [0, 1, 2]
const RANK_SKELS = Array.from({ length: 8 }, (_, i) => i)
/** '오늘은' · '모레는' */
/** '노을은' · '일출은' */
const topic = (w: string) => `${w}${(w.charCodeAt(w.length - 1) - 0xac00) % 28 ? '은' : '는'}`
/** 히어로엔 답만: 갈 만한지, 몇 시에, 왜(쉬운 말 한 줄). 숫자는 아래 '자세히'로 */
@@ -41,7 +41,7 @@ function HeroBody({ plan }: { plan?: SkyPlanData }) {
const v = (node: ReactNode, w: string) => (plan ? node : <Skel className={w} />)
return (
<div className="relative z-[1] [text-shadow:0_2px_10px_rgb(50_25_70/0.35)]" aria-hidden={plan ? undefined : true}>
<p className="m-0 mt-2.5 font-jua text-[34px] leading-tight">{v(plan && `${topic(plan.when)} ${plan.headline}`, 'w-[200px]')}</p>
<p className="m-0 font-jua text-[30px] leading-tight">{v(plan && `${plan.when} ${topic(plan.kind === 'sunrise' ? '일출' : '노을')} ${plan.headline}`, 'w-[230px]')}</p>
<p className="m-0 mt-1 font-jua text-[21px]">{v(plan?.best_at && `${clockShort(plan.best_at)}쯤 가장 붉어요`, 'w-[170px]')}</p>
<p className="m-0 mt-1.5 text-[14px] font-bold opacity-95">{v(plan?.situation_label, 'w-[230px]')}</p>
</div>
@@ -57,10 +57,10 @@ function Details({ plan, sunAt }: { plan: SkyPlanData; sunAt?: string }) {
<summary className="cursor-pointer font-extrabold">자세히</summary>
<p className="m-0 mt-1.5 text-(--ink)">{plan.reason}</p>
<p className="m-0 mt-1">
{[basis, `${plan.kind === 'sunrise' ? '일출' : '노을'} 점수 ${plan.score} (${plan.grade_label})`, plan.models_total ? `예보 모델 ${plan.models_total}개 중 ${plan.models_agree}개가 같은 예보` : '']
.filter(Boolean)
.join(' · ')}
{plan.kind === 'sunrise' ? '일출' : '노을'} 점수 {plan.score}점 / 100점 · {plan.grade_label}
<span className="block text-[12px]">80점 넘으면 붉게, 60점 넘으면 곱게, 40점 넘으면 은은하게 물들어요</span>
</p>
{basis && <p className="m-0 mt-1 text-[12px]">{basis}이라 지금 하늘과 다를 수 있어요</p>}
</details>
)
}
@@ -156,7 +156,6 @@ export function SkyPage() {
const target = plan?.kind === 'sunrise' ? sky.data?.sunrise : sky.data?.days?.find((d) => d.day === plan?.day)
const sunAt = plan?.timeline?.find((t) => t.kind === 'sun')?.at
const rise = plan?.kind === 'sunrise'
const word = rise ? '일출' : '노을'
return (
<section aria-label="노을" aria-busy={load === 'loading'} className={cx('transition-opacity', sky.isPlaceholderData && 'opacity-60')}>
@@ -164,10 +163,6 @@ export function SkyPage() {
<div className={cx(HERO, `b-sit-${target?.situation ?? 3}`)}>
<i className="b-sit-sun pointer-events-none absolute bottom-6 left-1/2 -ml-[56px] size-[112px] rounded-full" aria-hidden="true" />
<div className="b-skyline pointer-events-none absolute inset-0 [--sky-h:22%]" aria-hidden="true" />
{/* 하늘 위 흰 글씨 대비가 모자라 어두운 바탕을 깐다 */}
<p className="relative z-[1] m-0 self-start rounded-full bg-[rgb(30_18_60/0.35)] px-2.5 py-0.5 text-[13px] font-extrabold">
{plan?.when ?? '오늘'} {word} · {region.name}
</p>
{plan || load === 'loading' ? (
<HeroBody plan={plan} />
) : (