feat: 노을 탭 히어로에 점수 크게, 일출일 땐 일출 문구·시간표·용어 설명으로
This commit is contained in:
1 parent
5c4f23c01a
commit
97ebfe2d36
4 files changed
+52
-29
No files matched your search
@@ -145,7 +145,7 @@
|
||||
| [x] | 각 점수를 아침·낮·저녁·밤 시간대별로 → 지금 구간 점수로 순위, 안 겹치는 각은 순위·피드에서 빼고 스토리·전체엔 '지금 아님'. 히어로는 '지금 날씨 점수'(지금 구간). 운영 DB에 `index_score.slots` 칸 추가 필요(배포 때 `init.sql`의 ALTER) | 10/8 회의 결정 | `backend/services/calc/index_calc.py:297` |
|
||||
| [ ] | 히어로에 습도·불쾌지수 항상 표시 — 지금은 상황별 두 칸이라 불쾌지수는 일정 수치 이상일 때만 | 10/8 회의 결정 | `frontend/src/b/TodayPage.tsx` (`HeroStat`) |
|
||||
| [ ] | 달 '밝기 %' 정의(밝기인지 보이는 면적인지) + 구름·달 모양 반영 산정 로직 | 10/8 회의 | `backend/services/calc/moon.py` |
|
||||
| [ ] | 노을: 하늘 상황 문구 대신 점수 강조(10/7 다시 기획에서 되돌림). 골든아워·블루아워 설명은 시간표 아래에 넣음 | 10/8 회의, 사용자 결정 | `frontend/src/b/SkyPage.tsx`, `backend/services/sky_service.py` |
|
||||
| [x] | 노을: 점수 강조(히어로에 점수 크게) + 골든아워·블루아워 설명. 결론은 다음에 오는 것(해 뜨기 전·밤엔 일출, 그 사이엔 노을)으로, 피드 노을 카드도 같이 (사용자 결정 '각·노을도 지금 기준') | 10/8 회의, 사용자 결정 | `frontend/src/b/SkyPage.tsx`, `backend/services/sky_service.py` |
|
||||
| [ ] | 주말 예보 UI 개선 — 회의에서 구체 내용 없음 | 10/8 회의 | `frontend/src/b/WeekPage.tsx` |
|
||||
| [ ] | AEO·SEO 메타데이터 + 구글·네이버 검색 등록 (금일 핵심 업무), 넣은 태그·키워드 정의서 작성, 매시간 갱신 콘텐츠 노출 방식 정리 → 대표 보고. 도메인은 별도 유지 | 10/8 회의 결정 | `frontend/index.html`, `docs/` |
|
||||
| [ ] | `docs/콘텐츠_구현기획.md` 2-1의 오늘 날씨 점수 식이 예전 기준(기온 40·비 30·바람 15·미세먼지 15) — 새 기준은 `docs/점수_계산식.md` | 점수 계산식 정리 중 발견 (10/8) | `docs/콘텐츠_구현기획.md` |
|
||||
+3
-1
@@ -133,6 +133,8 @@
|
||||
| 구름이 두꺼워 색이 약해요 | 물들 구름 > 75 | 애매해요 |
|
||||
| 하늘이 넓게 물들 수 있어요 | 그 밖 (25~75) | 나가 볼 만해요 |
|
||||
|
||||
- **무엇을 보여 주나**: 다음에 오는 것. 오늘 해 뜨기 전엔 오늘 일출, 그 뒤 블루아워가 끝나기 전엔 오늘 노을, 그 뒤엔 내일 일출. 피드 노을 카드도 같습니다. 일출도 같은 식으로 계산합니다(구름은 해 뜨는 쪽).
|
||||
- 노을 탭 히어로는 점수를 크게 보여 주고, 그 아래에 해 지는(뜨는) 시각과 하늘 상황을 씁니다.
|
||||
- 화면 결론(나가 볼 만해요·애매해요·쉬어요)은 **하늘 상황 기준**입니다. 상황이 없을 때만 점수로 정합니다(60↑ 나가 볼 만해요, 40↑ 애매해요).
|
||||
- 확신도: 모델별 점수의 표준편차가 8 미만이면 높음, 15 미만이면 보통, 그 이상이거나 모델이 1개면 낮음.
|
||||
- 노을 순위: 대표 30곳을 노을 점수순으로 정렬합니다. 70% 이상이 같은 상황이면 한 줄 요약을 붙입니다.
|
||||
@@ -146,7 +148,7 @@
|
||||
| 가장 붉을 때 | 일몰 + 10분 + (20km 상층 구름 % ÷ 10)분. 상층 구름이 많을수록 늦게까지 물듦 |
|
||||
| 블루아워 | 해가 진 뒤 해 고도 **−6°**(시민박명 끝)가 되는 때. 해는 졌지만 하늘이 푸르게 남는 시간 |
|
||||
|
||||
일출은 순서가 거꾸로입니다(블루아워 → 가장 붉을 때 → 해 떠요).
|
||||
일출 시간표는 블루아워(해 뜨기 전 해 고도 −6°) → 해 떠요 → 골든아워(해 고도 6°까지 올라오는 때)입니다. '가장 붉을 때'는 해 뜨기 10분 + (상층 구름 % ÷ 10)분 전입니다.
|
||||
|
||||
## 8. 달 밝기
|
||||
|
||||
|
||||
@@ -2028,6 +2028,12 @@ export type SkyGrade = typeof SkyGrade[keyof typeof SkyGrade];
|
||||
* SkyPlanData
|
||||
*/
|
||||
export type SkyPlanData = {
|
||||
/**
|
||||
* Kind
|
||||
*
|
||||
* 다음에 오는 것: 해 뜨기 전·밤엔 일출, 그 사이엔 노을
|
||||
*/
|
||||
kind: 'sunset' | 'sunrise';
|
||||
/**
|
||||
* Day
|
||||
*/
|
||||
|
||||
+42
-27
@@ -33,13 +33,19 @@ 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)
|
||||
|
||||
/** 히어로엔 해 지는 시각과 하늘 상황 한 줄만. 결론·이유는 아래 카드로 */
|
||||
function HeroBody({ plan, sunset }: { plan?: SkyPlanData; sunset?: string }) {
|
||||
/** 히어로엔 점수를 크게, 아래에 해 지는(뜨는) 시각과 하늘 상황 한 줄. 결론·이유는 아래 카드로 */
|
||||
function HeroBody({ plan, sunAt }: { plan?: SkyPlanData; sunAt?: string }) {
|
||||
const v = (node: ReactNode, w: string) => (plan ? node : <Skel className={w} />)
|
||||
const rise = plan?.kind === 'sunrise'
|
||||
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-bagel text-[52px] leading-none">{v(sunset && clockShort(sunset), 'w-[150px]')}</p>
|
||||
<p className="m-0 mt-1.5 font-jua text-[21px]">{v(plan?.situation_label ?? plan?.headline, 'w-[190px]')}</p>
|
||||
<p className="m-0 mt-2.5 flex items-baseline gap-1.5">
|
||||
<b className="font-bagel text-[64px] leading-none font-normal">{v(plan?.score, 'w-[110px]')}</b>
|
||||
{plan && <span className="font-jua text-[20px]">점 · {plan.grade_label}</span>}
|
||||
</p>
|
||||
<p className="m-0 mt-1.5 font-jua text-[19px]">
|
||||
{v(plan && [sunAt && `${clockShort(sunAt)} ${rise ? '해 떠요' : '해 져요'}`, plan.situation_label ?? plan.headline].filter(Boolean).join(' · '), 'w-[220px]')}
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -54,13 +60,24 @@ function Verdict({ plan }: { plan?: SkyPlanData }) {
|
||||
<b className="mr-1.5 font-jua text-[17px] font-normal">{v(plan?.headline, 'w-20')}</b>
|
||||
{v(plan?.reason, 'w-[220px]')}
|
||||
</p>
|
||||
<small className="mt-1 block text-[12px] font-bold text-(--ink2)">{v(plan && [agree, `노을 점수 ${plan.score}`].filter(Boolean).join(' · '), 'w-48')}</small>
|
||||
<small className="mt-1 block text-[12px] font-bold text-(--ink2)">{v(plan && (agree || '\u00a0'), 'w-48')}</small>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
/** 골든아워 → 해 짐 → 블루아워 */
|
||||
function Timeline({ rows }: { rows?: BestTime[] }) {
|
||||
const TERMS = {
|
||||
sunset: {
|
||||
golden: '해가 낮게 떠 햇빛이 금빛으로 물드는 시간, 해 지기 전 약 30분~1시간',
|
||||
blue: '해가 진 뒤 하늘이 짙은 푸른빛으로 남는 시간, 적힌 시각쯤 어두워져요',
|
||||
},
|
||||
sunrise: {
|
||||
blue: '해 뜨기 전 하늘이 짙은 푸른빛인 시간, 적힌 시각쯤부터 밝아져요',
|
||||
golden: '해가 막 떠 햇빛이 금빛으로 물드는 시간, 적힌 시각까지',
|
||||
},
|
||||
} as const
|
||||
|
||||
/** 노을: 골든아워 → 해 짐 → 블루아워. 일출: 블루아워 → 해 뜸 → 골든아워 */
|
||||
function Timeline({ rows, kind = 'sunset' }: { rows?: BestTime[]; kind?: SkyPlanData['kind'] }) {
|
||||
return (
|
||||
<div className="mx-3 mt-3 rounded-[22px] bg-white px-2 pt-4 pb-3 shadow-[inset_0_-5px_0_var(--shade)]" aria-hidden={rows ? undefined : true}>
|
||||
<ol className="relative grid grid-cols-3">
|
||||
@@ -75,18 +92,14 @@ function Timeline({ rows }: { rows?: BestTime[] }) {
|
||||
</ol>
|
||||
{rows && (
|
||||
<dl className="mx-2 mt-3 flex flex-col gap-1 border-t-[1.5px] border-(--line) pt-2.5 text-[12px] leading-snug text-(--ink2)">
|
||||
{rows.some((t) => t.kind === 'golden') && (
|
||||
<div>
|
||||
<dt className="inline font-extrabold text-(--ink)">골든아워</dt>
|
||||
<dd className="ml-1.5 inline">해가 낮게 떠 햇빛이 금빛으로 물드는 시간, 해 지기 전 약 30분~1시간</dd>
|
||||
</div>
|
||||
)}
|
||||
{rows.some((t) => t.kind === 'blue') && (
|
||||
<div>
|
||||
<dt className="inline font-extrabold text-(--ink)">블루아워</dt>
|
||||
<dd className="ml-1.5 inline">해가 진 뒤 하늘이 짙은 푸른빛으로 남는 시간, 적힌 시각쯤 어두워져요</dd>
|
||||
</div>
|
||||
)}
|
||||
{rows
|
||||
.filter((t) => t.kind === 'golden' || t.kind === 'blue')
|
||||
.map((t) => (
|
||||
<div key={t.kind}>
|
||||
<dt className="inline font-extrabold text-(--ink)">{t.label}</dt>
|
||||
<dd className="ml-1.5 inline">{TERMS[kind][t.kind as 'golden' | 'blue']}</dd>
|
||||
</div>
|
||||
))}
|
||||
</dl>
|
||||
)}
|
||||
</div>
|
||||
@@ -140,8 +153,10 @@ export function SkyPage() {
|
||||
const plan = sky.data?.plan ?? undefined
|
||||
const spots = (sky.data?.spots ?? []).slice(0, 3)
|
||||
const items = (ranking.data?.items ?? []).slice(0, 8)
|
||||
const target = sky.data?.days?.find((d) => d.day === plan?.day)
|
||||
const sunset = plan?.timeline?.find((t) => t.kind === 'sun')?.at
|
||||
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')}>
|
||||
@@ -151,25 +166,25 @@ export function SkyPage() {
|
||||
<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 ?? '오늘'} 노을 · {region.name}
|
||||
{plan?.when ?? '오늘'} {word} · {region.name}
|
||||
</p>
|
||||
{plan || load === 'loading' ? (
|
||||
<HeroBody plan={plan} sunset={sunset} />
|
||||
<HeroBody plan={plan} sunAt={sunAt} />
|
||||
) : (
|
||||
<StateBox load={load} onRetry={() => sky.refetch()} empty="오늘 노을 정보가 없어요." hold={<HeroBody />} className="inset-x-0 top-1.5 bottom-0" />
|
||||
)}
|
||||
</div>
|
||||
{(plan || load === 'loading') && <Verdict plan={plan} />}
|
||||
<Sec title="언제 보면 좋을까" sub="보통 해 진 뒤 10~20분이 가장 붉어요" />
|
||||
<Sec title="언제 보면 좋을까" sub={rise ? '보통 해 뜨기 10~20분 전이 가장 붉어요' : '보통 해 진 뒤 10~20분이 가장 붉어요'} />
|
||||
{plan?.timeline?.length || load === 'loading' ? (
|
||||
<Timeline rows={plan?.timeline} />
|
||||
<Timeline rows={plan?.timeline} kind={plan?.kind} />
|
||||
) : (
|
||||
<StateBox load="ready" empty={load === 'ready' ? '노을 시간 정보가 없어요.' : '노을 시간을 불러오지 못했어요.'} hold={<Timeline />} className="inset-x-3 top-3 bottom-0" />
|
||||
)}
|
||||
{/* 더 나은 날이 있을 때만 */}
|
||||
{plan?.outlook && <p className="mx-3 mt-3 mb-0 rounded-[22px] bg-[#ffe6ec] px-4 py-3 text-[14px] font-bold text-[#7a2a4a]">{plan.outlook}</p>}
|
||||
<Sec title="가까운 노을 명소" sub="가까운 순 · 방향은 내 동네에서 본 쪽" />
|
||||
{spots.length ? (
|
||||
{!rise && <Sec title="가까운 노을 명소" sub="가까운 순 · 방향은 내 동네에서 본 쪽" />}
|
||||
{rise ? null : spots.length ? (
|
||||
<ul className="mx-3 mt-1.5 flex flex-col">
|
||||
{spots.map((p) => (
|
||||
<Li key={p.no} no={p.no} title={p.name} sub={p.direction ? `${p.direction}쪽` : null} right={`${p.distance_km}km`} place={p.name} />
|
||||
|
||||
Reference in new issue
Block a user