feat: 로딩 스켈레톤·행사 사진·전시·주말 예상 점수·노을 탭 재정리 등 화면 전반 개선

- 화면 전체 스켈레톤, 로딩·완료·실패 사이 레이아웃 고정, 값 없음은 '?'
- 행사 사진·출처 표시, 문화정보 API 전시 연결, 행사 30km 거리 기준
- 각 상세 점수 칸 오늘/내일/토/일, 단기예보 밖 주말은 중기예보 예상 점수
- 6각 차트 축 이름을 좋은 방향으로, 계산 근거 문구 정리
- 아이콘 오용·뜻 모를 표시·빈 데이터·포스트 본문 반복 수정
- 미세먼지 별도 포스트, 노을 명소 전국 155곳 거리 기준, 노을 탭 결론 중심 재구성
- 밤 다크 테마·별똥별, 댓글·좋아요 대기·실패 표시
- 주말 전국 랭킹·당일치기 카드, 계절 이야기 사진 수집
- 문서: 포스트 타입별 내용, 각 데이터 정리, TODO 진행 순서
This commit is contained in:
minaChoi committed 2026-10-06 16:36:11 +09:00
1 parent 296a09d6db
commit ddf05aeb5c
97 files changed
+5475 -720

No files matched your search

+62 -9
View File
@@ -3,9 +3,9 @@ import { useQuery } from '@tanstack/react-query'
import { getSeasonWeekOptions, listArticlesOptions } from '../api/client/@tanstack/react-query.gen'
import { ArticleCategory } from '../api/client/types.gen'
import { cx } from '../lib/utils'
import { ARTICLE_CAT, cardBg, fall, shortDay } from './lib'
import { ARTICLE_CAT, cardBg, dateRange, fall, loadOf, shortDay } from './lib'
import { useSheet } from './sheetContext'
import { Chips, Ic, StateBox } from './ui'
import { Chips, Ic, Skel, StateBox } from './ui'
const CATS = [
['all', '전체'],
@@ -16,6 +16,54 @@ const CATS = [
const CAT_PARAM = { season: ArticleCategory.SEASON, tip: ArticleCategory.TIP, gak: ArticleCategory.GAK } as const
const HEAD_BOX = 'relative mx-3 mt-3 flex min-h-[250px] w-[calc(100%-24px)] flex-col overflow-hidden rounded-[28px] p-5 text-left'
const ROW = 'grid w-full grid-cols-[1fr_84px] items-center gap-3 border-b-[1.5px] border-(--line) px-4 py-3.5 text-left'
const ROW_SKELS = [0, 1, 2, 3]
/** 특집 상자와 같은 틀: 머리말 · 제목 두 줄 · 시 한 줄 · 절기 막대 (최소 높이 250px 안) */
function HeadSkel() {
return (
<div className={cx(HEAD_BOX, 'bg-white')} aria-hidden="true">
<p className="m-0 text-[13px] font-extrabold">
<Skel className="w-36" />
</p>
<p className="mt-1 max-w-[62%] font-jua text-[29px] leading-tight">
<Skel className="w-full" />
<br />
<Skel className="w-2/3" />
</p>
<p className="mt-auto max-w-[72%] pt-3 font-batang text-[22px] leading-[1.7]">
<Skel className="w-full" />
</p>
<div className="mt-2.5 max-w-[70%]">
<div className="text-xs font-extrabold">
<Skel className="w-full" />
</div>
<Skel shape className="mt-1 h-[7px] rounded-full" />
</div>
</div>
)
}
function RowSkel() {
return (
<div className={ROW} aria-hidden="true">
<span>
<span className="text-xs font-extrabold">
<Skel className="w-12" />
</span>
<b className="mt-0.5 block font-jua text-[17.5px] leading-snug font-normal">
<Skel className="w-48" />
</b>
<small className="mt-1 block text-xs font-semibold">
<Skel className="w-14" />
</small>
</span>
<Skel shape className="h-[84px] rounded-[18px]" />
</div>
)
}
export function SeasonPage() {
const { open } = useSheet()
const [cat, setCat] = useState<(typeof CATS)[number][0]>('all')
@@ -24,12 +72,14 @@ export function SeasonPage() {
const w = week.data
const list = arts.data?.articles ?? []
const progress = Math.round((w?.progress ?? 0) * 100)
const weekLoad = loadOf(week)
const artLoad = loadOf(arts)
return (
<section aria-label="계절·상식">
<section aria-label="계절·상식" aria-busy={weekLoad === 'loading' || artLoad === 'loading'}>
{w?.headline ? (
<button type="button" onClick={() => open({ type: 'seasonWeek' })} className="relative mx-3 mt-3 flex min-h-[250px] w-[calc(100%-24px)] cursor-pointer flex-col overflow-hidden rounded-[28px] bg-[linear-gradient(180deg,#ffd2bb,#fff2ea)] p-5 text-left">
<p className="m-0 text-[13px] font-extrabold opacity-75">이번 주 특집 · {w.week}번째 주</p>
<button type="button" onClick={() => open({ type: 'seasonWeek' })} className={cx(HEAD_BOX, 'cursor-pointer bg-[linear-gradient(180deg,#ffd2bb,#fff2ea)]')}>
<p className="m-0 text-[13px] font-extrabold opacity-75">이번 주 특집{w.start && w.end ? ` · ${dateRange(w.start, w.end)}` : ''}</p>
<p className="mt-1 max-w-[62%] font-jua text-[29px] leading-tight">{w.headline}</p>
<span className="b-fall pointer-events-none absolute top-[18%] right-3.5 w-[38%]" style={fall('.1s')}>
<Ic name="maple" className="w-full drop-shadow-[0_16px_18px_rgb(40_48_74/0.18)]" />
@@ -60,14 +110,17 @@ export function SeasonPage() {
</div>
)}
</button>
) : weekLoad === 'loading' ? (
<HeadSkel />
) : (
<StateBox loading={week.isPending} error={week.error} onRetry={() => week.refetch()} empty="이번 주 특집이 아직 없어요." />
<StateBox load={weekLoad} onRetry={() => week.refetch()} empty="이번 주 특집이 아직 없어요." hold={<HeadSkel />} className="inset-x-3 top-3 bottom-0" />
)}
<Chips items={CATS} value={cat} onChange={setCat} label="분류" />
<div className="mt-1.5">
<StateBox loading={arts.isPending} error={arts.error} onRetry={() => arts.refetch()} empty={arts.isSuccess && !list.length ? '읽을거리가 아직 없어요.' : undefined} />
<div className={cx('mt-1.5 transition-opacity', arts.isPlaceholderData && 'opacity-60')}>
{artLoad === 'loading' && ROW_SKELS.map((i) => <RowSkel key={i} />)}
{artLoad !== 'loading' && !list.length && <StateBox load={artLoad} onRetry={() => arts.refetch()} empty="읽을거리가 아직 없어요." hold={ROW_SKELS.map((i) => <RowSkel key={i} />)} className="inset-3" />}
{list.map((a) => (
<button key={a.article_id} type="button" onClick={() => open({ type: 'article', articleId: a.article_id })} className="grid w-full cursor-pointer grid-cols-[1fr_84px] items-center gap-3 border-b-[1.5px] border-(--line) px-4 py-3.5 text-left">
<button key={a.article_id} type="button" onClick={() => open({ type: 'article', articleId: a.article_id })} className={cx(ROW, 'cursor-pointer')}>
<span>
<span className={cx('text-xs font-extrabold', ARTICLE_CAT[a.category]?.[1])}>{ARTICLE_CAT[a.category]?.[0]}</span>
<b className="mt-0.5 block font-jua text-[17.5px] leading-snug font-normal">{a.title}</b>