fix: 기념일 배경을 하늘 위 투명 소품으로 — 하늘색·노치·색 덩어리는 원래대로, 소품 그림은 상단바 아래·화면 아래 두 조각으로 폭에 맞춤
This commit is contained in:
1 parent
1c9e15500b
commit
89ad5e1600
15 files changed
+13
-43
No files matched your search
@@ -187,8 +187,6 @@ const NOTCH_BG: Record<TimeKind, string> = {
|
||||
night: '#0e1433',
|
||||
}
|
||||
|
||||
const notchBg = (kind: TimeKind) => (kind === 'night' ? (HOLIDAY?.nightNotch ?? NOTCH_BG.night) : (HOLIDAY?.notch ?? NOTCH_BG[kind]))
|
||||
|
||||
/** 처음 들어올 때만: 첫 데이터를 다 받을 때까지 하늘 위에 캐릭터와 '날씨 불러오는 중…'. 한 번 사라지면 다시 안 뜬다 */
|
||||
function FirstLoad() {
|
||||
const fetching = useIsFetching()
|
||||
@@ -213,7 +211,7 @@ function FirstLoad() {
|
||||
aria-live="polite"
|
||||
onTransitionEnd={() => done && setGone(true)}
|
||||
className={cx('fixed inset-0 z-50 flex flex-col items-center justify-center gap-3 backdrop-blur-[6px] transition-opacity duration-400', done && 'pointer-events-none opacity-0')}
|
||||
style={{ backgroundColor: `color-mix(in srgb, ${notchBg(kind)} 72%, transparent)` }}
|
||||
style={{ backgroundColor: `color-mix(in srgb, ${NOTCH_BG[kind]} 72%, transparent)` }}
|
||||
>
|
||||
<Ic name={kind === 'night' ? 'bear' : 'rabbit'} className="b-hop w-[88px]" />
|
||||
<p className="m-0 font-jua text-[19px]">날씨 불러오는 중…</p>
|
||||
@@ -261,7 +259,7 @@ function Shell() {
|
||||
if (pathname === to) window.scrollTo({ top: 0, behavior: 'smooth' })
|
||||
}
|
||||
useEffect(() => {
|
||||
document.querySelector('meta[name="theme-color"]')?.setAttribute('content', notchBg(kind))
|
||||
document.querySelector('meta[name="theme-color"]')?.setAttribute('content', NOTCH_BG[kind])
|
||||
}, [kind])
|
||||
|
||||
return (
|
||||
@@ -270,7 +268,7 @@ function Shell() {
|
||||
<FirstLoad />
|
||||
{/* 위·아래 바: 띠는 화면 끝까지, 내용은 가운데 440px 안 */}
|
||||
<div className="b-topbg fixed inset-x-0 top-0 z-[19] h-[calc(54px+env(safe-area-inset-top,0px))] backdrop-blur-md" aria-hidden="true" />
|
||||
<div className="fixed inset-x-0 top-0 z-[19] h-[env(safe-area-inset-top,0px)] transition-colors duration-1400" style={{ backgroundColor: notchBg(kind) }} aria-hidden="true" />
|
||||
<div className="fixed inset-x-0 top-0 z-[19] h-[env(safe-area-inset-top,0px)] transition-colors duration-1400" style={{ backgroundColor: NOTCH_BG[kind] }} aria-hidden="true" />
|
||||
<div className="relative mx-auto min-h-dvh max-w-[440px] overflow-x-clip pb-[calc(104px+env(safe-area-inset-bottom,0px))]">
|
||||
<TopBar />
|
||||
<main className="relative z-[1]">
|
||||
|
||||
Reference in new issue
Block a user