diff --git a/frontend/src/b/BLayout.tsx b/frontend/src/b/BLayout.tsx
index c115b9a..b206e8c 100644
--- a/frontend/src/b/BLayout.tsx
+++ b/frontend/src/b/BLayout.tsx
@@ -6,9 +6,11 @@ import { cx } from '../lib/utils'
import { kindOfHour, kst, seasonOf, type TimeKind } from '@nalssigak/shared/lib'
import './b.css'
import { AuthProvider } from './auth'
+import { iconSrc } from './lib'
import { RegionProvider } from './region'
import { useAuth } from './authContext'
import { preloadGoogle } from './googleScript'
+import { currentHoliday } from './holiday'
import { LevelBadge, LevelWatcher } from './level'
import { useRegion } from './regionContext'
import { useSheet } from './sheetContext'
@@ -106,6 +108,18 @@ const SHOOTS = [
{ top: '14%', left: '96%', '--len': '120px', '--dur': '12s', '--dl': '9s' },
]
+const HOLIDAY = currentHoliday()
+
+/** 기념일에 하늘에 떠다니는 그림: 게임 그림 중 큰 것부터 */
+const FLOATS = [
+ { top: '9%', left: '6%', '--z': '46px', '--dur': '13s', '--dl': '0s' },
+ { top: '17%', left: '82%', '--z': '40px', '--dur': '15s', '--dl': '2s' },
+ { top: '38%', left: '88%', '--z': '34px', '--dur': '17s', '--dl': '4s' },
+ { top: '46%', left: '3%', '--z': '38px', '--dur': '14s', '--dl': '1s' },
+ { top: '66%', left: '84%', '--z': '44px', '--dur': '16s', '--dl': '3s' },
+ { top: '78%', left: '8%', '--z': '36px', '--dur': '18s', '--dl': '5s' },
+]
+
/** 화면 전체 하늘: 시간대별 색, 아주 느리게 일렁이는 색 덩어리, 밤에는 별 */
function SkyBg() {
const { kind } = useSky()
@@ -116,10 +130,11 @@ function SkyBg() {
return () => document.removeEventListener('visibilitychange', onVis)
}, [])
return (
-
+
{(['morning', 'day', 'sunset', 'night'] as const).map((k) => (
))}
+ {HOLIDAY &&
}
@@ -131,6 +146,13 @@ function SkyBg() {
))}
+ {HOLIDAY && (
+
+ {FLOATS.map((s, i) => (
+

+ ))}
+
+ )}
)
}
@@ -183,6 +205,8 @@ const NOTCH_BG: Record = {
night: '#0e1433',
}
+const notchBg = (kind: TimeKind) => (kind === 'night' ? (HOLIDAY?.nightNotch ?? NOTCH_BG.night) : (HOLIDAY?.notch ?? NOTCH_BG[kind]))
+
/** 처음 들어올 때만: 첫 데이터를 다 받을 때까지 하늘 위에 캐릭터와 '날씨 불러오는 중…'. 한 번 사라지면 다시 안 뜬다 */
function FirstLoad() {
const fetching = useIsFetching()
@@ -207,7 +231,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, ${NOTCH_BG[kind]} 72%, transparent)` }}
+ style={{ backgroundColor: `color-mix(in srgb, ${notchBg(kind)} 72%, transparent)` }}
>
날씨 불러오는 중…
@@ -255,7 +279,7 @@ function Shell() {
if (pathname === to) window.scrollTo({ top: 0, behavior: 'smooth' })
}
useEffect(() => {
- document.querySelector('meta[name="theme-color"]')?.setAttribute('content', NOTCH_BG[kind])
+ document.querySelector('meta[name="theme-color"]')?.setAttribute('content', notchBg(kind))
}, [kind])
return (
@@ -264,7 +288,7 @@ function Shell() {
{/* 위·아래 바: 띠는 화면 끝까지, 내용은 가운데 440px 안 */}
-
+
diff --git a/frontend/src/b/b.css b/frontend/src/b/b.css
index ad77d3e..da09016 100644
--- a/frontend/src/b/b.css
+++ b/frontend/src/b/b.css
@@ -456,6 +456,54 @@
.b-skybg[data-t='night'] .b-sky-night {
opacity: 1;
}
+/* 기념일 하늘 (holiday.ts): 낮·아침·노을은 기념일 색, 밤은 할로윈만 바꾼다 */
+.b-skybg[data-h]:not([data-t='night']) .b-sky-holiday {
+ opacity: 1;
+}
+.b-skybg[data-h='halloween'] .b-sky-holiday {
+ background: linear-gradient(180deg, #ff9f4a 0%, #ffb36b 30%, #c69bff 75%, #8f6ae0 100%);
+}
+.b-skybg[data-h='halloween'][data-t='night'] .b-sky-holiday {
+ background: linear-gradient(180deg, #1c1030 0%, #34184f 55%, #4a2148 100%);
+ opacity: 1;
+}
+.b-skybg[data-h='pepero'] .b-sky-holiday {
+ background: linear-gradient(180deg, #d9a07a 0%, #f2c9a8 35%, #ffc2d4 100%);
+}
+.b-skybg[data-h='christmas'] .b-sky-holiday {
+ background: linear-gradient(180deg, #7fcf9c 0%, #c3ebcf 35%, #ffb3b3 100%);
+}
+.b-skybg[data-h='chuseok'] .b-sky-holiday {
+ background: 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;
+}
+.b-holiday-fx img {
+ position: absolute;
+ width: var(--z);
+ height: var(--z);
+ opacity: 0.9;
+ animation: b-holiday-float var(--dur) ease-in-out var(--dl) infinite alternate;
+}
+@keyframes b-holiday-float {
+ 50% { transform: translate3d(8px, -16px, 0) rotate(8deg); }
+ 100% { transform: translate3d(-6px, 10px, 0) rotate(-6deg); }
+}
+@media (prefers-reduced-motion: reduce) {
+ .b-holiday-fx img {
+ animation: none;
+ }
+}
.b-skybg[data-t='morning'] {
--b1: #ffc39b;
--b2: #bfe5ff;
diff --git a/frontend/src/b/holiday.ts b/frontend/src/b/holiday.ts
index 857e10f..44df3b3 100644
--- a/frontend/src/b/holiday.ts
+++ b/frontend/src/b/holiday.ts
@@ -15,12 +15,18 @@ export type Holiday = {
topic: TalkTopic
/** 글만 있는 사람 글 배경 (b.css b-bg-*) */
bg: string
+ /** 낮 하늘 맨 위 색 = 노치 띠 색. 하늘 그라데이션은 b.css .b-skybg[data-h] */
+ notch: string
+ /** 밤 하늘도 바꾸는 기념일만 */
+ nightNotch?: string
game: readonly GamePiece[]
}
export const HOLIDAYS: readonly Holiday[] = [
{
key: 'halloween',
+ notch: '#ffad62',
+ nightNotch: '#1c1030',
name: '할로윈',
ranges: [['10-31', '11-01']],
topic: TalkTopic.HALLOWEEN,
@@ -38,6 +44,7 @@ export const HOLIDAYS: readonly Holiday[] = [
},
{
key: 'pepero',
+ notch: '#e2b08e',
name: '빼빼로데이',
ranges: [['11-11', '11-11']],
topic: TalkTopic.PEPERO,
@@ -55,6 +62,7 @@ export const HOLIDAYS: readonly Holiday[] = [
},
{
key: 'christmas',
+ notch: '#95d8ac',
name: '크리스마스',
ranges: [['12-24', '12-25']],
topic: TalkTopic.CHRISTMAS,
@@ -72,6 +80,7 @@ export const HOLIDAYS: readonly Holiday[] = [
},
{
key: 'chuseok',
+ notch: '#ffd77e',
name: '추석',
ranges: [['2027-09-14', '2027-09-16']],
topic: TalkTopic.CHUSEOK,