feat: 노을 문구 확정안 반영 — 큰 글씨 '오늘 노을은 18:10에 가장 붉을 거예요', 안 보이는 날은 이유, 내일 안내는 그날 하늘·시각, 자세히는 점수 뜻과 어림값 안내만
This commit is contained in:
1 parent
f5575711fe
commit
b346838054
10 files changed
+103
-65
No files matched your search
@@ -132,10 +132,7 @@ function SlideView({ slide, bg }: { slide: Slide; bg: SlideBg }) {
|
||||
<Eyebrow>{slide.eyebrow}</Eyebrow>
|
||||
{/* 노을 탭 히어로와 같은 순서: 결론 → 가장 붉을 때 → 쉬운 이유. 점수는 노을 탭 '자세히'에 */}
|
||||
<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>
|
||||
{slide.line && <p className="m-0 mt-0.5 font-jua text-[18px]">{slide.line}</p>}
|
||||
<div className="mt-3 flex flex-1 flex-col gap-2">
|
||||
{slide.cuts.map((c, i) => (
|
||||
<div key={c.kind} className={cx('b-skyline relative flex-1 overflow-hidden rounded-2xl px-3 py-2 font-bagel text-[21px] text-white', `b-cut-${Math.min(i + 1, 3)}`)}>
|
||||
|
||||
@@ -33,17 +33,14 @@ 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 ? '은' : '는'}`
|
||||
|
||||
/** 히어로엔 답만: 갈 만한지, 몇 시에, 왜(쉬운 말 한 줄). 숫자는 아래 '자세히'로 */
|
||||
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 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>
|
||||
<p className="m-0 font-jua text-[28px] leading-tight text-balance">{v(plan?.title, 'w-[230px]')}</p>
|
||||
{/* 보이는 날만 그날 하늘 한 줄 */}
|
||||
{(!plan || plan.situation_label) && <p className="m-0 mt-1.5 font-jua text-[19px]">{v(plan?.situation_label, 'w-[200px]')}</p>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -51,16 +48,19 @@ function HeroBody({ plan }: { plan?: SkyPlanData }) {
|
||||
/** 점수·구름·예보 모델처럼 궁금한 사람만 볼 숫자 */
|
||||
function Details({ plan, sunAt }: { plan: SkyPlanData; sunAt?: string }) {
|
||||
// 지금 하늘이 아니라 해 질(뜰) 무렵 예보라는 걸 밝힌다
|
||||
const basis = sunAt ? `해 ${plan.kind === 'sunrise' ? '뜰' : '질'} 무렵(${new Date(sunAt).getHours()}시) 예보 기준` : ''
|
||||
const hour = sunAt ? new Date(sunAt).getHours() : null
|
||||
return (
|
||||
<details className="mx-3 mt-2 rounded-[18px] bg-white/70 px-4 py-2.5 text-[13px] font-semibold text-(--ink2)">
|
||||
<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">
|
||||
{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>}
|
||||
{hour != null && (
|
||||
<p className="m-0 mt-1 text-[12px]">
|
||||
{plan.when} {hour}시 날씨 예보로 계산했어요. 가장 붉은 시각은 해 {plan.kind === 'sunrise' ? '뜨기 10~20분 전' : '지고 10~20분 뒤'}로 어림한 거라 실제와 다를 수 있어요
|
||||
</p>
|
||||
)}
|
||||
</details>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user