feat: 기념일 배경을 행사 그림으로 — 할로윈(달·유령·호박), 빼빼로, 크리스마스(전구·눈사람), 추석(보름달·토끼·송편)을 화면 전체 하늘 위에 깔고 밤엔 어둡게, 떠다니는 아이콘은 뺌

This commit is contained in:
minaChoi committed 2026-10-30 10:52:53 +09:00
1 parent cff44be771
commit 1c9e15500b
7 files changed
+19 -52

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

-18
View File
@@ -6,7 +6,6 @@ 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'
@@ -110,16 +109,6 @@ const SHOOTS = [
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()
@@ -146,13 +135,6 @@ function SkyBg() {
<span key={i} className="b-shoot" style={s} />
))}
</div>
{HOLIDAY && (
<div className="b-holiday-fx absolute inset-0">
{FLOATS.map((s, i) => (
<img key={i} src={iconSrc(HOLIDAY.game[HOLIDAY.game.length - 1 - (i % 4)].icon) ?? ''} alt="" style={s} />
))}
</div>
)}
</div>
)
}
+11 -26
View File
@@ -456,25 +456,26 @@
.b-skybg[data-t='night'] .b-sky-night {
opacity: 1;
}
/* 기념일 하늘 (holiday.ts): 낮·아침·노을은 기념일 색, 밤은 할로윈만 바꾼다 */
.b-skybg[data-h]:not([data-t='night']) .b-sky-holiday {
/* 기념일 하늘 (holiday.ts): 행사 그림(public/b/holiday/<key>.webp)을 하늘 위에 깐다. 밤엔 어둡게 눌러 밝은 글자가 읽히게 */
.b-skybg[data-h] .b-sky-holiday {
opacity: 1;
background-position: center top;
background-size: cover;
}
.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: 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;
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: linear-gradient(180deg, #d9a07a 0%, #f2c9a8 35%, #ffc2d4 100%);
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: linear-gradient(180deg, #7fcf9c 0%, #c3ebcf 35%, #ffb3b3 100%);
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: linear-gradient(180deg, #ffd166 0%, #ffe6a3 35%, #c9c4ff 100%);
background-image: url('/b/holiday/chuseok.webp'), linear-gradient(180deg, #ffd166 0%, #ffe6a3 35%, #c9c4ff 100%);
}
.b-skybg[data-h='halloween'] {
--b1: #ff9d4d;
@@ -488,22 +489,6 @@
--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;
+8 -8
View File
@@ -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)
* 새 기념일: 여기에 한 줄 + 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,9 +15,9 @@ export type Holiday = {
topic: TalkTopic
/** 글만 있는 사람 글 배경 (b.css b-bg-*) */
bg: string
/** 낮 하늘 맨 위 색 = 노치 띠 색. 하늘 그라데이션은 b.css .b-skybg[data-h] */
/** 배경 그림(public/b/holiday/<key>.webp) 맨 위 색 = 노치 띠 색 */
notch: string
/** 밤 하늘도 바꾸는 기념일만 */
/** 밤(그림을 어둡게 누른 색)에 따로 줄 때 */
nightNotch?: string
game: readonly GamePiece[]
}
@@ -25,8 +25,8 @@ export type Holiday = {
export const HOLIDAYS: readonly Holiday[] = [
{
key: 'halloween',
notch: '#ffad62',
nightNotch: '#1c1030',
notch: '#9b84d8',
nightNotch: '#2c2350',
name: '할로윈',
ranges: [['10-31', '11-01']],
topic: TalkTopic.HALLOWEEN,
@@ -44,7 +44,7 @@ export const HOLIDAYS: readonly Holiday[] = [
},
{
key: 'pepero',
notch: '#e2b08e',
notch: '#e9c3cf',
name: '빼빼로데이',
ranges: [['11-11', '11-11']],
topic: TalkTopic.PEPERO,
@@ -62,7 +62,7 @@ export const HOLIDAYS: readonly Holiday[] = [
},
{
key: 'christmas',
notch: '#95d8ac',
notch: '#bfe6d6',
name: '크리스마스',
ranges: [['12-24', '12-25']],
topic: TalkTopic.CHRISTMAS,
@@ -80,7 +80,7 @@ export const HOLIDAYS: readonly Holiday[] = [
},
{
key: 'chuseok',
notch: '#ffd77e',
notch: '#8a8fd8',
name: '추석',
ranges: [['2027-09-14', '2027-09-16']],
topic: TalkTopic.CHUSEOK,