fix: 기념일 배경을 하늘 위 투명 소품으로 — 하늘색·노치·색 덩어리는 원래대로, 소품 그림은 상단바 아래·화면 아래 두 조각으로 폭에 맞춤
No files matched your search
|
After Width: | Height: | Size: 119 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 133 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 41 KiB |
@@ -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]">
|
||||
|
||||
@@ -456,39 +456,20 @@
|
||||
.b-skybg[data-t='night'] .b-sky-night {
|
||||
opacity: 1;
|
||||
}
|
||||
/* 기념일 하늘 (holiday.ts): 행사 그림(public/b/holiday/<key>.webp)을 하늘 위에 깐다. 밤엔 어둡게 눌러 밝은 글자가 읽히게 */
|
||||
/* 기념일 소품 (holiday.ts): 하늘은 그대로 두고 투명 배경 소품 그림을 위(상단바 아래)·아래 두 조각으로 얹는다 (public/b/holiday/<key>-top·bottom.webp) */
|
||||
.b-skybg[data-h] .b-sky-holiday {
|
||||
opacity: 1;
|
||||
background-position: center top;
|
||||
background-size: cover;
|
||||
background:
|
||||
var(--h-top) center calc(54px + env(safe-area-inset-top, 0px)) / min(100%, 560px) auto no-repeat,
|
||||
var(--h-bottom) center bottom / min(100%, 560px) auto no-repeat;
|
||||
}
|
||||
.b-skybg[data-h][data-t='night'] .b-sky-holiday {
|
||||
filter: brightness(0.45) saturate(1.1);
|
||||
}
|
||||
.b-skybg[data-h='halloween'] .b-sky-holiday {
|
||||
background-image: url('/b/holiday/halloween.webp'), linear-gradient(180deg, #ff9f4a 0%, #ffb36b 30%, #c69bff 75%, #8f6ae0 100%);
|
||||
}
|
||||
.b-skybg[data-h='pepero'] .b-sky-holiday {
|
||||
background-image: url('/b/holiday/pepero.webp'), linear-gradient(180deg, #d9a07a 0%, #f2c9a8 35%, #ffc2d4 100%);
|
||||
}
|
||||
.b-skybg[data-h='christmas'] .b-sky-holiday {
|
||||
background-image: url('/b/holiday/christmas.webp'), linear-gradient(180deg, #7fcf9c 0%, #c3ebcf 35%, #ffb3b3 100%);
|
||||
}
|
||||
.b-skybg[data-h='chuseok'] .b-sky-holiday {
|
||||
background-image: url('/b/holiday/chuseok.webp'), linear-gradient(180deg, #ffd166 0%, #ffe6a3 35%, #c9c4ff 100%);
|
||||
}
|
||||
.b-skybg[data-h='halloween'] {
|
||||
--b1: #ff9d4d;
|
||||
--b2: #c39bff;
|
||||
--b3: #ffcf73;
|
||||
--bo: 0.5;
|
||||
}
|
||||
.b-skybg[data-h='christmas'] {
|
||||
--b1: #8fd6a8;
|
||||
--b2: #ffa8a8;
|
||||
--b3: #fff1b0;
|
||||
--bo: 0.45;
|
||||
filter: brightness(0.8);
|
||||
}
|
||||
.b-skybg[data-h='halloween'] { --h-top: url('/b/holiday/halloween-top.webp'); --h-bottom: url('/b/holiday/halloween-bottom.webp'); }
|
||||
.b-skybg[data-h='pepero'] { --h-top: url('/b/holiday/pepero-top.webp'); --h-bottom: url('/b/holiday/pepero-bottom.webp'); }
|
||||
.b-skybg[data-h='christmas'] { --h-top: url('/b/holiday/christmas-top.webp'); --h-bottom: url('/b/holiday/christmas-bottom.webp'); }
|
||||
.b-skybg[data-h='chuseok'] { --h-top: url('/b/holiday/chuseok-top.webp'); --h-bottom: url('/b/holiday/chuseok-bottom.webp'); }
|
||||
.b-skybg[data-t='morning'] {
|
||||
--b1: #ffc39b;
|
||||
--b2: #bfe5ff;
|
||||
|
||||
@@ -6,7 +6,7 @@ type GamePiece = { icon: string; name: string }
|
||||
|
||||
/**
|
||||
* 기념일 꾸밈. 기간(KST, 양 끝 포함) 안에만 켜진다. 'MM-DD' 는 해마다, 'YYYY-MM-DD' 는 그해만(음력 기념일).
|
||||
* 새 기념일: 여기에 한 줄 + TalkTopic(backend/common/enums.py) + 게임 그림(public/b/icons, lib.ts OWN) + 배경(public/b/holiday, b.css)
|
||||
* 새 기념일: 여기에 한 줄 + TalkTopic(backend/common/enums.py) + 게임 그림(public/b/icons, lib.ts OWN) + 소품 그림(public/b/holiday, 투명 배경, b.css)
|
||||
*/
|
||||
export type Holiday = {
|
||||
key: 'halloween' | 'pepero' | 'christmas' | 'chuseok'
|
||||
@@ -15,18 +15,12 @@ export type Holiday = {
|
||||
topic: TalkTopic
|
||||
/** 글만 있는 사람 글 배경 (b.css b-bg-*) */
|
||||
bg: string
|
||||
/** 배경 그림(public/b/holiday/<key>.webp) 맨 위 색 = 노치 띠 색 */
|
||||
notch: string
|
||||
/** 밤(그림을 어둡게 누른 색)에 따로 줄 때 */
|
||||
nightNotch?: string
|
||||
game: readonly GamePiece[]
|
||||
}
|
||||
|
||||
export const HOLIDAYS: readonly Holiday[] = [
|
||||
{
|
||||
key: 'halloween',
|
||||
notch: '#9b84d8',
|
||||
nightNotch: '#2c2350',
|
||||
name: '할로윈',
|
||||
ranges: [['10-31', '11-01']],
|
||||
topic: TalkTopic.HALLOWEEN,
|
||||
@@ -44,7 +38,6 @@ export const HOLIDAYS: readonly Holiday[] = [
|
||||
},
|
||||
{
|
||||
key: 'pepero',
|
||||
notch: '#e9c3cf',
|
||||
name: '빼빼로데이',
|
||||
ranges: [['11-11', '11-11']],
|
||||
topic: TalkTopic.PEPERO,
|
||||
@@ -62,7 +55,6 @@ export const HOLIDAYS: readonly Holiday[] = [
|
||||
},
|
||||
{
|
||||
key: 'christmas',
|
||||
notch: '#bfe6d6',
|
||||
name: '크리스마스',
|
||||
ranges: [['12-24', '12-25']],
|
||||
topic: TalkTopic.CHRISTMAS,
|
||||
@@ -80,7 +72,6 @@ export const HOLIDAYS: readonly Holiday[] = [
|
||||
},
|
||||
{
|
||||
key: 'chuseok',
|
||||
notch: '#8a8fd8',
|
||||
name: '추석',
|
||||
ranges: [['2027-09-14', '2027-09-16']],
|
||||
topic: TalkTopic.CHUSEOK,
|
||||
|
||||