Compare commits

..
Author SHA1 Message Date
skkim da71ad5bad Merge branch 'fix/outing-rain-cap' — 주말 순위 비 상한 없애 전부 47점이던 것 고침 2026-11-13 14:01:41 +09:00
skkim 939edeedb6 fix: 주말 전국 날씨 순위가 전국 비인 날 전부 47점이던 것 — 나들이 점수의 비 상한(최대 30점)을 없애 비 오는 날도 기온·하늘·바람에 따라 점수가 갈림. 바꾸기 표 다시 생성, 순위 캐시 키 v3 2026-11-13 13:59:08 +09:00
skkim a80f039444 Merge branch 'feat/holiday-suneung-newyear' — 수능 응원·연말·새해 기념일 꾸밈 2026-11-12 13:56:51 +09:00
skkim c8287b4bf3 feat: 수능 응원·연말·새해 기념일 꾸밈 — 수능(2026-11-18~19)과 12-31~01-01 기간에만 이야기 주제·구름 합치기 그림·네 귀퉁이 소품이 바뀜 (GA talk_post topic 10·11, game_start theme suneung·newyear) 2026-11-12 13:47:22 +09:00
skkim e0e9f169d7 Merge branch 'feat/top-button' — 문의 창 문구를 제휴 문의 안내로 2026-11-11 11:06:54 +09:00
skkim 864cdf2448 fix: 문의 창 문구를 제휴 문의 안내로 — 제목 '날씨각과 함께할까요?', 광고·지역 행사 소개·콘텐츠 협업 문의 안내 2026-11-11 11:06:54 +09:00
skkim eaa62751cd Merge branch 'feat/top-button' — 오른쪽 아래 문의·맨 위로 버튼과 문의 창 2026-11-11 10:56:03 +09:00
skkim 4a2da04f98 feat: 오른쪽 아래 문의·맨 위로 버튼과 문의 창 — 맨 위에서는 문의(전화·이메일 안내 창), 내리면 맨 위로 버튼으로 바뀜. 쇼츠 화면은 제외 (GA top_button·contact_click, sheet_open contact) 2026-11-11 10:55:20 +09:00
skkim f5bf98fb34 Merge branch 'fix/remove-hidden-region-links' — 닫힌 지역 바꾸기 창의 숨은 지역 링크 제거 2026-11-10 13:44:43 +09:00
skkim 775c28e6ca fix: 닫힌 지역 바꾸기 창의 숨은 지역 링크 269개 제거 — 구글 색인 급감(566개 중 46개) 원인 후보, 검색 로봇용으로만 넣은 링크라 숨긴 링크 정책 소지. 11/10 검색 노출 기록·원인 분석 2026-11-10 13:43:45 +09:00
45 changed files with 217 additions and 68 deletions

No files matched your search

+2
View File
@@ -458,6 +458,8 @@ docs를 6개로 합칠 때 옛 내용을 그대로 옮겼다. 아래는 코드
| [ ] | `feat/halloween` main 병합 → 킹서버 배포(백엔드 `TalkTopic` 6~9 포함). 10/31 00시 전에 올라가야 할로윈이 켜짐 | 10/30 킹서버 작업 중이라 배포 보류 | `deploy.sh` |
| [ ] | 할로윈 타로·코디 카드 (`/daily-tarot 할로윈`, `/daily-ootd`) — 킹서버 게시라 보류 | 10/30 킹서버 작업 중 | |
| [ ] | 2028년부터 추석 날짜 추가 (음력이라 해마다 `ranges` 에 한 줄) | 2027-09-14~16만 들어 있음 | `frontend/src/b/holiday.ts` |
| [ ] | 수능 응원·연말·새해 기념일 배포 — 백엔드 `TalkTopic` 10·11 이 11/18 00시 전에 킹서버에 올라가야 수능 주제 글이 올라감. 앱은 새 빌드가 나가야 소품·게임 그림이 보임 | 11/12 수능(2026-11-18~19)·연말·새해(12-31~01-01) 추가 | `deploy.sh`, `shared/lib/holiday.ts` |
| [ ] | 2027년 수능 날짜 추가 (11월 셋째 목요일, 해마다 `ranges` 에 한 줄) | 2026-11-18~19만 들어 있음 | `shared/lib/holiday.ts` |
## 검색 클릭률 (10/30)
+2
View File
@@ -129,6 +129,8 @@ class TalkTopic(CodeEnum):
PEPERO = 7
CHRISTMAS = 8
CHUSEOK = 9
SUNEUNG = 10
NEWYEAR = 11
class TalkReport(CodeEnum):
+1 -7
View File
@@ -433,7 +433,6 @@ _OUTING_WEIGHTS = {"temp": 35, "rain": 40, "sky": 15, "wind": 10}
# 만점 조건을 엄격하게: 기온은 최적 21° ±0.5°, 바람은 초속 1m 이하(ok/2)여야 100점 — 같은 예보를 받는 여러 지역이 한꺼번에 100점이 되던 것을 줄인다
_OUTING_RULES = {"temp": {"type": "range", "lo": 17, "hi": 24, "best": 21, "plateau": 0.5}, "rain": {"dir": "dry"}, "wind": {"type": "calm", "ok": 2, "limit": 12}}
_OUTING_SKY = {Sky.CLEAR: 100, Sky.PARTLY: 80, Sky.CLOUDY: 50}
_OUTING_RAIN_PROB, _OUTING_RAIN_CAP = 60, 30
@dataclass
@@ -442,7 +441,6 @@ class Outing:
factors: dict[str, int]
notes: dict[str, str]
reason: str # 순위 옆 한 줄 근거 ("비 10% · 체감 21° · 맑음")
capped: bool # 비 때문에 최대 30점으로 묶였는지
estimated: bool = False
@@ -451,12 +449,8 @@ def _outing(scored: dict[str, tuple[int, str]], prob: int, raining: bool, temp_w
notes = {a: n for a, (_, n) in scored.items()}
worst = min(factors.values())
score = round(sum(factors[a] * w for a, w in _OUTING_WEIGHTS.items()) / 100 * (1 - _WORST_PULL + _WORST_PULL * worst / 100))
capped = raining or prob >= _OUTING_RAIN_PROB
if capped:
score = min(score, _OUTING_RAIN_CAP)
notes["rain"] += f", 비 확률 {_OUTING_RAIN_PROB}% 이상이거나 비 소식이면 최대 {_OUTING_RAIN_CAP}점"
reason = " · ".join(["비 소식" if raining else f"비 {prob}%", temp_word, _SKY_WORD[sky]])
return Outing(score=score, factors=factors, notes=notes, reason=reason, capped=capped, estimated=estimated)
return Outing(score=score, factors=factors, notes=notes, reason=reason, estimated=estimated)
def outing(hours: list[Hour]) -> Optional[Outing]:
+24 -24
View File
@@ -1,8 +1,8 @@
{
"about": "나들이 점수 바꾸기 표: 원래 점수 0~100 → 표시 점수. 평균 60·표준편차 15. scripts/gen_outing_score_table.py 가 만든다",
"period": [
"2025-10-22",
"2026-10-21"
"2025-11-12",
"2026-11-11"
],
"regions": 32,
"samples": 11680,
@@ -20,14 +20,13 @@
13,
17,
22,
25,
28,
30,
32,
34,
26,
29,
31,
33,
35,
36,
37,
37,
38,
38,
39,
@@ -37,23 +36,24 @@
41,
42,
42,
43,
43,
44,
45,
45,
46,
46,
47,
50,
50,
50,
50,
50,
50,
50,
50,
48,
48,
49,
49,
49,
50,
50,
51,
51,
51,
51,
52,
54,
53,
57,
61,
62,
@@ -69,7 +69,6 @@
64,
64,
64,
64,
65,
65,
65,
@@ -77,7 +76,6 @@
66,
66,
66,
66,
67,
67,
67,
@@ -86,16 +84,18 @@
68,
69,
69,
69,
70,
70,
71,
72,
73,
74,
74,
75,
76,
77,
78,
79,
80,
81,
83,
85,
+1 -1
View File
@@ -30,7 +30,7 @@ from services.week_service import _icon
# 주말 전국 날씨 순위·당일치기 추천. 대표 지역(노을 순위 30곳)과 당일치기 후보 도시의 토·일 나들이 점수를
# 워커가 하루 두 번(06:40·18:40) 미리 계산해 Redis 에 둔다. 없으면 순위 API 가 그 자리에서 계산한다.
_SEED = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "seed", "trip_city.csv")
_KEY = "weekend_rank:v2:{:%Y%m%d}" # v2: 점수를 바꾸기 표로 보정한 값 (옛 점수 캐시를 쓰지 않게 키를 바꿨다)
_KEY = "weekend_rank:v3:{:%Y%m%d}" # v3: 비 상한(최대 30점)을 없앤 점수 (옛 점수 캐시를 쓰지 않게 키를 바꿨다)
_TTL = 13 * 3600
_PARALLEL = 4 # 기상청 동시 호출 수
_WAIT_STEPS, _WAIT_SEC = 60, 0.5
+15 -5
View File
@@ -252,10 +252,20 @@ def test_outing_cloudy_and_hot_days_lose_points():
assert "흐림" in cloudy.reason
def test_outing_rain_caps_score():
r = outing(_day(prob=70))
assert r.score <= 30 and r.capped
assert outing([_h(10, prob=30, rain=RainType.RAIN)] + _day()[1:]).score <= 30
def test_outing_rain_lowers_score_without_a_cap():
"""비가 오면 비 점수와 가장 낮은 요소 때문에 점수가 내려가지만, 따로 상한으로 묶지는 않는다."""
clear = outing(_day())
likely = outing(_day(prob=70))
raining = outing([_h(10, prob=30, rain=RainType.RAIN)] + _day()[1:])
assert raining.score < likely.score < clear.score
assert likely.score > 30 and raining.score > 30
def test_outing_rainy_days_keep_their_differences():
"""전국이 비인 날에도 기온·하늘에 따라 점수가 갈린다 (예전엔 모두 상한 30점에 걸려 같은 점수였다)."""
mild = outing(_day(feels=16.0, sky=Sky.CLOUDY, rain=RainType.RAIN))
chilly = outing(_day(feels=14.0, sky=Sky.CLOUDY, rain=RainType.RAIN))
assert chilly.score < mild.score
def test_outing_needs_all_hours():
@@ -266,7 +276,7 @@ def test_outing_estimate_from_mid_forecast():
r = outing_estimate(_fc(lo=12, hi=22, am=10, pm=20))
assert r.estimated is True and r.factors["wind"] == 70
assert r.reason.startswith("비 20% · 낮 ")
assert outing_estimate(_fc(pm=60)).score <= 30
assert 30 < outing_estimate(_fc(pm=60)).score < outing_estimate(_fc(pm=0)).score
assert outing_estimate(_fc(lo=None, hi=None)) is None
+1 -1
View File
@@ -25,7 +25,7 @@ def test_calibrated_outing_reads_the_table():
def test_day_score_uses_calibrated_value_for_hourly_and_estimated_results():
for estimated in (False, True):
r = Outing(score=80, factors={}, notes={}, reason="비 0% · 체감 21° · 맑음", capped=False, estimated=estimated)
r = Outing(score=80, factors={}, notes={}, reason="비 0% · 체감 21° · 맑음", estimated=estimated)
assert outing_day_score(r) == OUTING_SCORE_TABLE[80]
+12
View File
@@ -513,6 +513,18 @@
| 10/24 | 네이버 | 10/23과 같은 168개 + 내일 4개 | 날씨각 1, 날씨각 성남 1, **성남 오늘 날씨 10 (새로 나옴)**. `{구} 오늘 날씨`: 강남 5·성동 6·구로 6·마포 6·연수 7·송파 7·부평 11. `오늘 {구} 날씨`: 성동 5·강남 6·송파 7·마포 9·연수 10·구로 12·부평 14 | site: 첫 화면 15 (10/23 16, 같은 수준) | 구 39개 0, `내일 날씨` 꼴 0(성동구·군산 포함). 부평은 뉴스 칸 영향으로 ±5 흔들림 |
| 10/26 | 구글 | 10/24와 같은 범위(구 39개 1~2p + 날씨각 + 내일 3개·군산 오늘) | **날씨각 1** `/`(10/24 3). 39개 중 35개 나옴(10/24 34). **청원 1p6**, 만세 1p6→2p1, 효행 2p1, 처인 2p2(새로). 성동구 내일 2p4 `/tomorrow/seoul/seongdong`(10/24 2p3), 분당구 내일 2p7(오늘 페이지). 군산 내일 1~4p 없음, 군산 오늘 3p4 `/today/jeonbuk/gunsan`(로그인 첫 확인) | 약 421 (10/24 383) | 없음 4개: 기흥·동탄·포항남·포항북. 막힘(sorry) 없음 |
| 10/26 | 네이버 | 10/24와 같은 172개 | 날씨각 1, 날씨각 성남 1, 성남 오늘 날씨 11(10/24 10). `{구} 오늘 날씨`: 연수 6·구로 6·마포 6·성동 6·송파 6·강남 8·부평 9. `오늘 {구} 날씨`: 송파 6·연수 8·성동 8·강남 9·마포 9·구로 10·부평 15. **송파구 내일 날씨 14 (새로 나옴, 오늘 페이지)** | site: 첫 화면 16 (10/24 15, 성남 추가) | 구 39개 0, 나머지 `내일 날씨` 꼴 0 |
| 11/10 | 구글 | 날씨각 · `"날씨각"` · `site:` 3개 | 날씨각 **-** (1p 8곳: 기상청·AccuWeather·케이웨더·웨더아이·다음·수도권기상청·네이버·weather.com, "누락된 검색어: 각"). `"날씨각"` 도 - | **약 3** (10/26 약 421): `/tomorrow/gyeonggi/ansan/sangnok`, `/today/seoul/jung`, `/today/gyeonggi/seongnam/jungwon`. 홈 없음 | 사이트 이름 '에이아이오투오'·'AIO2O'. `site:o2o.kr` 약 135(triplepick 정상). Googlebot 응답은 전부 200, 지역 페이지 수집은 11일간 9번. 서치 콘솔은 로그인 계정에 권한 없어 못 봄 |
| 11/10 | 네이버 | 날씨각 · `site:` | 날씨각 1 `/` | site: 첫 화면 30 이상 (홈·faq·gak·game·saju·season·sky·shorts 9·today 7) | 정상 |
### 11/10 구글 색인 급감 원인 분석
- **상태**: 구글 `날씨각` 1p1(10/29) → 없음. 서치 콘솔 색인 46 / 미색인 523 (크롤링됨 - 현재 색인이 생성되지 않음 327, 발견됨 - 현재 색인이 생성되지 않음 193, 표준 태그가 포함된 대체 페이지 3). 홈도 "크롤링됨 - 현재 색인이 생성되지 않음". 수동 조치·보안 문제 없음. 네이버는 정상(날씨각 1).
- **배제**: 서버 응답(Googlebot 261건 전부 200), robots.txt·noindex·canonical, 렌더 실패(Googlebot UA 헤드리스 렌더 정상), 도메인 전체 문제(triplepick.o2o.kr 정상 색인).
- **가설(추정, 구글이 사유를 알려 주지 않음)**
- 모든 페이지의 닫힌 지역 바꾸기 창 안에 "○○ 오늘 날씨" 링크 269개가 숨어 있었다(10/19 `0a16c53`, 로봇용). 4-4 숨긴 텍스트·링크 정의("검색엔진만을 위해 넣는 내용")에 가깝다.
- 틀이 같은 지역 페이지를 사이트맵 235 → 566개로 단기간에 늘렸다.
- **조치**: 숨은 링크 묶음 제거(`fix/remove-hidden-region-links`, `frontend/src/b/Sheets.tsx`). 지역 페이지는 사이트맵, 지역 페이지 하단 소개 글의 같은 시도 링크, `/faq` → 시도 FAQ 로 발견된다. 홈에서 지역 페이지로 가는 링크는 없어진다(홈 하단 `/faq` 링크는 넣지 않기로 함).
- **미결정**: 색인 대상 줄이기(내일 페이지·시도별 FAQ 를 사이트맵에서 빼고 noindex). 배포 뒤 몇 주 색인 비율을 보고 정한다.
### 구글 구 39개 표
+1 -1
View File
@@ -593,7 +593,7 @@
- **켜지는 조건**: 후보 도시(`backend/seed/trip_city.csv`, 지금 강릉·속초·춘천·가평·양평·인천·대전·전주·태안·단양 10곳) 중 내 지역에서 직선 20~200km 안인 곳의 이번 주말(토·일, 오늘 이후) 나들이 점수 1위가 50점 이상일 때. 주말 플랜 바로 뒤.
- **슬라이드**: 첫 장 "당일치기 · 토요일 10.10", 큰 줄 "토요일엔 강릉, 나들이 86점", 표(거리 "여기서 약 160km", 날씨 근거 "비 10% · 체감 21° · 맑음" — 중기예보로 어림하면 "예상 날씨", 기온, 볼거리). 뒤로 그날 그 도시 30km 안 행사 최대 2장(사진 + 장소·기간).
- **본문**: 2위 도시: "다음은 춘천, 일요일 75점이에요." 후보가 하나뿐이면 "아침 일찍 출발하면 하루가 넉넉해요."
- **데이터**: 나들이 날씨 점수(`index_calc.py` `outing`·`outing_estimate`: 낮 10~17시 비 40%·기온 35%(체감 17~24°, 21° 최적)·하늘 15%·바람 10%, 비 확률 60% 이상이거나 비 소식이면 최대 30점). 단기예보 안이면 시간별, 밖이면 중기예보. 워커가 06:40·18:40에 계산해 Redis(`weekend_rank:토요일`)에 둔 값만 쓰고, 없으면 카드를 끄고 피드를 60초만 캐시. 행사는 `WeekService.events`를 그 도시 기준으로 (`weekend_rank.py`, `feed_service.py` `_day_trip`).
- **데이터**: 나들이 날씨 점수(`index_calc.py` `outing`·`outing_estimate`: 낮 10~17시 비 40%·기온 35%(체감 17~24°, 21° 최적)·하늘 15%·바람 10%, 비가 와도 상한 없이 계산한 점수 그대로). 단기예보 안이면 시간별, 밖이면 중기예보. 워커가 06:40·18:40에 계산해 Redis(`weekend_rank:토요일`)에 둔 값만 쓰고, 없으면 카드를 끄고 피드를 60초만 캐시. 행사는 `WeekService.events`를 그 도시 기준으로 (`weekend_rank.py`, `feed_service.py` `_day_trip`).
피드에 같이 나오지만 포스트가 아닌 것: 히어로(지금 기온·체감·불쾌지수·2시간 비·1위 각), 오늘의 각 줄(전체 순위), 띠 3종(행사 4개, TOP5, 계절 글 목록).
+5 -3
View File
@@ -37,14 +37,14 @@ GA4 태그(`gtag.js`, 측정 ID `G-D378J4X373`)를 `index.html`에 심고, 화
| `설치_완료` (코드 `install_done`) | 설치 완료 (브라우저가 `appinstalled`를 줄 때만. 아이폰은 오지 않음) | 없음 | `install.ts` |
| `앱_실행` (코드 `app_launch`) | 홈 화면 아이콘(설치한 앱)으로 엶 | `mode: 'standalone'` | `main.tsx` |
| `첫화면_멈춤` (코드 `boot_stuck`) | 8초 넘게 '날씨 불러오는 중' 첫 화면이 남음 (페이지마다 한 번) | `reason`(첫 오류 문구, 100자), `seconds`, `tries`(연달아 다시 불러온 횟수), `app_started`(앱 파일 실행 여부) | `index.html` 첫 화면 스크립트 |
| `창_열기` (코드 `sheet_open`) | 아래에서 올라오는 창이 열림 (각·글·보내기·댓글·로그인·내 정보·지역·내 각·홈 화면 추가·점수 근거·이야기 등) | `sheet`(창 종류: `gak`·`article`·`share`·`comments`·`login`·`me`·`region`·`mix`·`myGak`·`install`·`weatherWhy`·`talk`·`seasonWeek`) | `Sheets.tsx` `SheetProvider` `open` |
| `창_열기` (코드 `sheet_open`) | 아래에서 올라오는 창이 열림 (각·글·보내기·댓글·로그인·내 정보·지역·내 각·홈 화면 추가·점수 근거·이야기 등) | `sheet`(창 종류: `gak`·`article`·`share`·`comments`·`login`·`me`·`region`·`mix`·`myGak`·`install`·`weatherWhy`·`talk`·`seasonWeek`·`contact`) | `Sheets.tsx` `SheetProvider` `open` |
| `좋아요` (코드 `like`) | 좋아요 성공 (취소는 안 보냄) | `content_type: 'post' \| 'comment' \| 'talk' \| 'hero_post' \| 'gak_post' \| 'foliage_post' \| 'events_post' \| 'season_post'`, `item_id`(포스트·댓글·글 번호) | `Post.tsx` `FullCard`, `pinnedLike.ts`, `Sheets.tsx` `CommentRow`, `talk.tsx` |
| `댓글` (코드 `comment`) | 댓글 올리기 성공 | `post_id` | `Sheets.tsx` `CommentsSheet` `send` |
| `이야기_댓글` (코드 `talk_comment`) | 사람 글에 댓글 올리기 성공 (로그인한 사람만) | `talk_id`(글 번호) | `Sheets.tsx` `CommentsSheet` `send` |
| `약관_동의` (코드 `terms_agree`) | 댓글 쓰기 전 이용약관 동의 성공 | 없음 | `Sheets.tsx` `CommentsSheet` `agreeAndSend` |
| `신고` (코드 `report`) | 신고 성공 | `content_type: 'comment' \| 'talk'`, `reason`(신고 이유 번호) | `Sheets.tsx` `CommentMenu`, `talk.tsx` |
| `차단` (코드 `block`) | 차단 성공 | `content_type: 'comment' \| 'talk'` | `Sheets.tsx` `CommentMenu`, `talk.tsx` |
| `이야기_올림` (코드 `talk_post`) | 이야기 글 올리기 성공 | `topic`(주제 번호, 6~9 는 기념일: 할로윈·빼빼로데이·크리스마스·추석), `with_image` | `talk.tsx` 글쓰기 `submit` |
| `이야기_올림` (코드 `talk_post`) | 이야기 글 올리기 성공 | `topic`(주제 번호, 6~11 은 기념일: 할로윈·빼빼로데이·크리스마스·추석·수능 응원·연말·새해), `with_image` | `talk.tsx` 글쓰기 `submit` |
| `피드_항목_노출` (코드 `feed_item_view`) | 오늘 피드에 섞인 사람 글·행사 포스트가 처음 반쯤 보임 (한 장에 한 번) | `item_type: 'talk' \| 'event'`, `position`(피드에서 그 종류의 몇 번째) | `TodayPage.tsx` `Seen` |
| `오늘내일_전환` (코드 `hero_day_switch`) | 히어로 오늘/내일 스위치를 바꿈 | `day: 'today' \| 'tomorrow'` | `TodayPage.tsx` |
| `내일에서_오늘로` (코드 `tomorrow_to_today`) | 내일 날씨 페이지(`/tomorrow/...`) 맨 아래 '오늘 ○○ 소식 보기'를 누름 | `region_name` | `TomorrowFeed.tsx` |
@@ -57,12 +57,14 @@ GA4 태그(`gtag.js`, 측정 ID `G-D378J4X373`)를 `index.html`에 심고, 화
| `내각_저장` (코드 `my_gak_save`) | 내 각 만들기 성공 (로그인 전엔 기기에 저장) | `gak_name` | `myGakState.ts` `create` |
| `토스소개_시작` (코드 `toss_intro_start`) | 토스판 첫 소개 화면에서 '시작하기' | 없음 | `tossIntro.tsx` |
| `설치배너_닫기` (코드 `install_banner_close`) | '홈 화면에 추가' 띠를 × 로 닫음 | 없음 | `installBanner.tsx` |
| `맨위로_누름` (코드 `top_button`) | 오른쪽 아래 둥근 버튼(내려갔을 때 '맨 위로')을 눌러 맨 위로 올라감 | `page`(누른 화면: `today`·`sky`·`gak`·`week`·`season`·`talk` 등) | `BLayout.tsx` `FloatButton` |
| `문의_누름` (코드 `contact_click`) | 문의 창에서 전화·이메일을 누름 (창 열림은 `창_열기`의 `sheet: 'contact'`) | `method: 'phone' \| 'email'` | `Sheets.tsx` `ContactSheet` |
| `타로_뽑기` (코드 `fortune_draw`) | 오늘 한 장에서 카드를 뽑음 (하루 한 번, 다시 열 때는 안 보냄) | `card`(각 코드) | `fortune.tsx` `useTodayCard` |
| `하루_기록` (코드 `day_log`) | 저녁 체크인을 적어 둠 (고쳐 적어도 보냄). 다녀온 곳 이름은 보내지 않음 | `mood`(1~5), `went_out`, `card_hit`(맞았어요 true·글쎄요 false·안 고름 null) | `fortune.tsx` `useTodayCard` |
| `오늘아이콘_누름` (코드 `today_icon`) | 오늘 탭 아이콘 줄에서 아이콘을 누름 | `icon`(`tarot`·`saju`·`game`·`foliage`·`shorts`·`myGak`·`talk`) | `todayIcons.tsx` `TodayIcons` |
| `사주_입력` (코드 `saju_input`) | 날씨 사주 생년월일을 넣음 (생년월일 값은 보내지 않음) | `with_time` | `SajuPage.tsx` `BirthForm` |
| `사주_결과` (코드 `saju_view`) | 날씨 사주 결과가 뜸 | `scene`(내 기운 이름), `score`, `strength`(신강·중화·신약), `top_element`(가장 센 오행) | `SajuPage.tsx` `Reading` |
| `게임_시작` (코드 `game_start`) | 구름 합치기 한 판의 첫 그림을 떨어뜨림 (페이지만 열고 안 한 사람과 구분) | `again`(다시 하기로 시작), `logged_in`, `wind_ms`(오늘 우리 구 풍속), `theme`(그림: `basic`·`halloween`·`pepero`·`christmas`·`chuseok`, `holiday.ts`) | `CloudMergePage.tsx` `onUp` |
| `게임_시작` (코드 `game_start`) | 구름 합치기 한 판의 첫 그림을 떨어뜨림 (페이지만 열고 안 한 사람과 구분) | `again`(다시 하기로 시작), `logged_in`, `wind_ms`(오늘 우리 구 풍속), `theme`(그림: `basic`·`halloween`·`pepero`·`christmas`·`chuseok`·`suneung`·`newyear`, `holiday.ts`) | `CloudMergePage.tsx` `onUp` |
| `게임_라운드` (코드 `game_round`) | 구름 합치기 라운드를 깸 | `round`(깬 라운드), `score`(그때 총점), `logged_in`(각을 받는지) | `CloudMergePage.tsx` `onScore` |
| `게임_끝` (코드 `game_over`) | 구름 합치기가 넘쳐서 끝남 | `round`(끝난 라운드), `score`, `best`(최고 기록 갱신), `drops`(떨어뜨린 횟수) | `CloudMergePage.tsx` `onOver` |
+3 -3
View File
@@ -106,11 +106,11 @@
| 바람 | 10% | 초속 1m 이하 100 → 2m에서 85 → 12m에서 0 |
- 1처럼 가장 낮은 요소로 깎습니다.
- 비 소식이 있거나 비 확률 60% 이상이면 **최대 30점**.
- 비가 와도 따로 상한으로 묶지 않습니다. 비 소식이 있으면 비 점수가 0점이라 원래 점수는 0~45점 안에서 기온·하늘·바람에 따라 갈립니다. (예전엔 최대 30점으로 묶어, 전국이 비인 날 모든 지역이 같은 점수가 됐습니다.)
- 중기예보뿐인 날은 기온을 어림하고 바람은 70점입니다.
- 위 계산으로 나온 점수가 **원래 점수**이고, 화면에는 지금 날씨 점수(3절)와 같은 방식으로 **표시 점수로 바꿔** 보여 줍니다. 1년 치 원래 점수 분포의 순위를 평균 60·표준편차 15 정규분포의 같은 위치 점수로 바꾸는 것으로, 순서는 그대로입니다. 구간은 낮 하나라 표도 하나입니다. 원래 점수 50은 62점이고, 90점 이상은 원래 점수 94 이상에서만 나옵니다. 위쪽 끝은 3절처럼 직선으로 이어(`straighten_top`) **100점은 원래 점수 100(완벽한 날)일 때만** 나오고, 그 아래는 99→98, 97→95, 96→93, 95→92, 94→90처럼 서로 다른 점수가 됩니다. 맑고 알맞은 날이 100점으로 몰려 동점이 되던 것을 막습니다.
- 바꾸기 표: `backend/services/calc/outing_score_table.json` (`calibrated_outing`, `weekend_rank.py`). 만드는 법: `cd backend && python scripts/gen_outing_score_table.py`. 나들이 점수 규칙이 바뀌면 다시 만들어야 합니다. 표는 Open-Meteo 과거 예보(32개 지역, 364일)로 만들어 기상청 예보와 분포가 조금 다를 수 있습니다. 중기예보로 어림한 예상 점수에도 같은 표를 씁니다.
- 순위 캐시(`weekend_rank:v2:<토요일 날짜>`)는 표시 점수를 담습니다. 바꾸기 표를 적용하면서 키를 올려 옛 점수 캐시를 쓰지 않게 했습니다.
- 순위 캐시(`weekend_rank:v3:<토요일 날짜>`)는 표시 점수를 담습니다. 비 상한을 없애면서 키를 올려 옛 점수 캐시를 쓰지 않게 했습니다.
- 전국 순위: 노을 순위 대표 30곳을 점수순으로 정렬합니다.
- 당일치기: 내 지역에서 직선 20~200km 안 후보 도시 중 토·일 중 더 좋은 날 점수가 가장 높은 곳입니다. 동점이면 비 확률이 낮은 곳 → 이른 날 → 가까운 곳 순입니다. 1위가 50점 미만이면 카드를 보이지 않습니다. 표시 점수 기준 최소 62점(원래 점수 50과 같은 날씨 수준, `TRIP_MIN_SCORE`) 이상이어야 추천합니다.
@@ -363,7 +363,7 @@
| 하늘 | 15% | 시간마다 맑음 100 · 구름많음 80 · 흐림 50 점의 평균 |
| 바람 | 10% | ③ 괜찮은 바람 초속 4m, 한계 12m |
- 비 소식이 있거나 비 확률이 60% 이상이면 **최대 30점**입니다.
- 비가 와도 따로 상한으로 묶지 않습니다. 비 소식이 있으면 비 점수가 0점이라 원래 점수는 0~45점 안에서 갈립니다.
- 중기예보뿐인 날은 기온을 어림하고(10-7), 하늘은 그날 하늘 하나, 바람은 70점입니다.
- **전국 순위:** 대표 30곳을 점수 순으로 줄 세웁니다.
- **당일치기:** 내 지역에서 직선 20~200km 안 후보 도시 중 토·일 가운데 더 좋은 날의 점수가 가장 높은 곳입니다. 동점이면 비 확률이 낮은 곳, 이른 날, 가까운 곳 순입니다. 1위가 50점 미만이면 카드를 보여 주지 않습니다.
Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

+33
View File
@@ -2,6 +2,7 @@ import { useCallback, useEffect, useMemo, useState, type ReactNode } from 'react
import { NavLink, Outlet, useLocation, useNavigationType } from 'react-router'
import { useIsFetching, useQuery, useQueryClient } from '@tanstack/react-query'
import { authConfigOptions, getSeasonWeekOptions } from '@nalssigak/shared/api/client/@tanstack/react-query.gen'
import { track } from '../lib/analytics'
import { cx } from '../lib/utils'
import { kindOfHour, kst, seasonOf, type TimeKind } from '@nalssigak/shared/lib'
import './b.css'
@@ -89,6 +90,37 @@ function TopBar() {
)
}
// 이만큼 내려가면 문의 버튼이 맨 위로 버튼으로 바뀐다
const TOP_AFTER = 400
/** 오른쪽 아래 둥근 버튼: 맨 위에서는 문의(문의 창 열기), 내려가면 맨 위로 */
function FloatButton() {
const { pathname } = useLocation()
const { open } = useSheet()
const [down, setDown] = useState(() => window.scrollY > TOP_AFTER)
useEffect(() => {
const check = () => setDown(window.scrollY > TOP_AFTER)
window.addEventListener('scroll', check, { passive: true })
return () => window.removeEventListener('scroll', check)
}, [])
// 쇼츠는 화면 전체가 영상이라 가리지 않게 뺀다
if (pathname.startsWith('/shorts')) return null
const toTop = () => {
track('top_button', { page: TABS.find((t) => t.to !== '/' && pathname.startsWith(t.to))?.key ?? pathname.split('/')[1] ?? 'today' })
window.scrollTo({ top: 0, behavior: 'smooth' })
}
return (
<button
type="button"
onClick={down ? toTop : () => open({ type: 'contact' })}
aria-label={down ? '맨 위로' : '문의하기'}
className="fixed right-[max(12px,calc((100%-440px)/2+12px))] bottom-[calc(80px+env(safe-area-inset-bottom,0px))] z-20 size-14 cursor-pointer rounded-full drop-shadow-[0_6px_10px_rgb(40_48_74/0.22)]"
>
<Ic name={down ? 'top' : 'contact'} className="size-full" />
</button>
)
}
const STARS = Array.from({ length: 46 }, (_, i) => ({
left: `${(i * 41 + 7) % 100}%`,
top: `${(i * 67 + 3) % 96}%`,
@@ -279,6 +311,7 @@ function Shell() {
<main className="relative z-[1]">
<Outlet />
</main>
<FloatButton />
<nav aria-label="주요 메뉴" className="b-tabbar fixed inset-x-0 bottom-0 z-30 grid grid-cols-5 border-t px-[max(4px,calc((100%-432px)/2))] pt-[7px] pb-[calc(8px+env(safe-area-inset-bottom,0px))] backdrop-blur-[10px]">
{TABS.map((t) =>
t.key === 'today' ? (
+46 -18
View File
@@ -1,6 +1,5 @@
import { useInfiniteQuery, useMutation, useQuery, useQueryClient, type InfiniteData } from '@tanstack/react-query'
import { useCallback, useDeferredValue, useEffect, useMemo, useRef, useState, type FormEvent, type ReactNode } from 'react'
import regionPages from '../../seo/region.json'
import { clearTokens, setTokens, subscribeAuth } from '@nalssigak/shared/api/auth'
import { SITE_URL } from '../api/setup'
import {
@@ -93,7 +92,7 @@ export function SheetProvider({ children }: { children: ReactNode }) {
)
}
const TITLES = { article: '읽을거리', seasonWeek: '이번 주 특집', share: '보내기', comments: '댓글', login: '로그인', me: '내 정보', region: '지역 바꾸기', install: '홈 화면에 추가', weatherWhy: '날씨 점수는 이렇게 나와요', talk: '이야기', tarot: '오늘 타로', level: '내 레벨', levelUp: '레벨이 올랐어요', gameHelp: '구름 합치기 하는 법' } as const
const TITLES = { article: '읽을거리', seasonWeek: '이번 주 특집', share: '보내기', comments: '댓글', login: '로그인', me: '내 정보', region: '지역 바꾸기', install: '홈 화면에 추가', weatherWhy: '날씨 점수는 이렇게 나와요', talk: '이야기', tarot: '오늘 타로', level: '내 레벨', levelUp: '레벨이 올랐어요', gameHelp: '구름 합치기 하는 법', contact: '날씨각 문의' } as const
/** 아래에서 올라오는 창: 네이티브 <dialog>라 ESC·포커스 가두기·포커스 되돌리기가 기본으로 된다 */
function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void }) {
@@ -184,9 +183,9 @@ function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void
{shown.type === 'level' && <LevelSheet />}
{shown.type === 'levelUp' && <LevelUpSheet level={shown.level} />}
{shown.type === 'gameHelp' && <GameHelpSheet />}
{shown.type === 'contact' && <ContactSheet onDone={onClose} />}
</div>
)}
{!shown && <RegionLinks />}
</dialog>
)
}
@@ -556,6 +555,50 @@ function GameHelpSheet() {
)
}
const CONTACTS = [
{ method: 'phone', label: '전화 문의', value: '010-2755-6463', href: 'tel:010-2755-6463', icon: 'M6.6 3h3l1.5 4.2-2 1.5a12 12 0 0 0 6.2 6.2l1.5-2L21 14.4v3A2.6 2.6 0 0 1 18.4 20 15.4 15.4 0 0 1 4 5.6 2.6 2.6 0 0 1 6.6 3Z' },
{ method: 'email', label: '이메일 문의', value: 'sales@o2o.kr', href: 'mailto:sales@o2o.kr', icon: 'M3.5 6.5h17v11h-17zM4 7l8 6.5L20 7' },
] as const
/** 오른쪽 아래 문의 버튼으로 여는 창: 운영사 소개와 전화·이메일 */
function ContactSheet({ onDone }: { onDone: () => void }) {
return (
<Body className="flex flex-col items-center text-center">
<img src="/b/aio2o.png" alt="AIO2O" width={162} height={27} className="mt-1 block h-[27px] w-auto" />
<h4 className="mt-3 mb-0 font-jua text-[22px] font-normal">날씨각과 함께할까요?</h4>
<p className="mt-1.5 mb-0 text-[13.5px] leading-[1.6] font-semibold text-(--ink2)">
날씨에 맞춘 광고, 지역 축제·행사 소개,
<br />
콘텐츠 협업 같은 제휴 문의를 받아요.
<br />
전화나 이메일로 편하게 알려 주세요.
</p>
<div className="mt-4 flex w-full flex-col gap-2">
{CONTACTS.map((c) => (
<a key={c.method} href={c.href} onClick={() => track('contact_click', { method: c.method })} className="flex items-center gap-3 rounded-[16px] bg-[#f3f6fb] p-3 text-left text-(--ink)">
<span className="b-keep-bg grid size-11 shrink-0 place-items-center rounded-full bg-white text-(--orange)">
<svg viewBox="0 0 24 24" className="size-[22px]" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
<path d={c.icon} />
</svg>
</span>
<span className="flex min-w-0 flex-1 flex-col">
<span className="text-[12px] font-bold text-(--ink2)">{c.label}</span>
<span className="truncate text-[17px] font-extrabold">{c.value}</span>
</span>
<span className="text-xl text-(--orange)" aria-hidden="true">
›
</span>
</a>
))}
</div>
<p className="mt-3.5 mb-0 text-[12px] font-semibold text-(--ink3)">날씨각은 주식회사 에이아이오투오가 만들어요</p>
<button type="button" onClick={onDone} className="mt-3 w-full cursor-pointer rounded-[14px] bg-(--orange) p-3 text-[15px] font-extrabold text-white">
확인
</button>
</Body>
)
}
function SeasonWeekSheet() {
const { open } = useSheet()
const q = useQuery(getSeasonWeekOptions())
@@ -1373,21 +1416,6 @@ const pageHref = (code: string) => {
return p ? `/today/${p.path}` : '/'
}
/** 지역 바꾸기가 닫혀 있을 때도 지역 페이지 링크를 HTML에 둔다 (검색 로봇이 링크를 따라가게) */
function RegionLinks() {
return (
<nav aria-label="지역별 오늘 날씨">
<ul>
{regionPages.map((p) => (
<li key={p.path}>
<a href={`/today/${p.path}`}>{p.name} 오늘 날씨</a>
</li>
))}
</ul>
</nav>
)
}
function RegionSheet({ onDone }: { onDone: () => void }) {
const { region, setRegion, locate, locateStatus } = useRegion()
const { me, logout } = useAuth()
+2
View File
@@ -483,6 +483,8 @@
[data-h='pepero'] { --h-tl: url('/b/holiday/pepero-tl.webp'); --h-tr: url('/b/holiday/pepero-tr.webp'); --h-bl: url('/b/holiday/pepero-bl.webp'); --h-br: url('/b/holiday/pepero-br.webp'); }
[data-h='christmas'] { --h-tl: url('/b/holiday/christmas-tl.webp'); --h-tr: url('/b/holiday/christmas-tr.webp'); --h-bl: url('/b/holiday/christmas-bl.webp'); --h-br: url('/b/holiday/christmas-br.webp'); }
[data-h='chuseok'] { --h-tl: url('/b/holiday/chuseok-tl.webp'); --h-tr: url('/b/holiday/chuseok-tr.webp'); --h-bl: url('/b/holiday/chuseok-bl.webp'); --h-br: url('/b/holiday/chuseok-br.webp'); }
[data-h='suneung'] { --h-tl: url('/b/holiday/suneung-tl.webp'); --h-tr: url('/b/holiday/suneung-tr.webp'); --h-bl: url('/b/holiday/suneung-bl.webp'); --h-br: url('/b/holiday/suneung-br.webp'); }
[data-h='newyear'] { --h-tl: url('/b/holiday/newyear-tl.webp'); --h-tr: url('/b/holiday/newyear-tr.webp'); --h-bl: url('/b/holiday/newyear-bl.webp'); --h-br: url('/b/holiday/newyear-br.webp'); }
.b-skybg[data-t='morning'] {
--b1: #ffc39b;
--b2: #bfe5ff;
+2 -2
View File
@@ -1,8 +1,8 @@
import type { CSSProperties } from 'react'
import { ARTICLE_LABEL } from '@nalssigak/shared/lib'
const SHARED = new Set(['bear', 'bike', 'bronze', 'camping', 'carwash', 'chimaek', 'cloud', 'coldwind', 'delivery', 'dog', 'garden', 'glasses', 'gold', 'hiking', 'iced_hot', 'jjamppong', 'laundry', 'letter', 'makeup', 'makgeolli', 'maple', 'moon', 'muggy', 'naengmyeon', 'photo', 'picnic', 'rabbit', 'rain', 'running', 'silver', 'snow', 'stars', 'sun_cloud', 'sun', 'sunset', 'taxi', 'umbrella', 'vent', 'walk', 'yajang', 'baseball', 'study', 'netflix', 'chestnut', 'peanut', 'tangerine', 'sweet_potato', 'fallen_leaf', 'kimchi', 'apple', 'mask', 'golf', 'jipkok', 'fishing', 'drive', 'kite', 'waterplay', 'riverwind', 'trot', 'pajeon', 'bingsu', 'blanket', 'indoordry', 'flower', 'bungeoppang', 'singing_rain', 'hangang', 'themepark', 'date', 'frizz', 'boiler', 'sunscreen', 'mosquito', 'tennis', 'hyodo', 'thanks', 'gift', 'party', 'game', 'selfie', 'sentimental', 'ginkgo'])
const OWN = new Set(['fireworks', 'bulb', 'calendar', 'thermo', 'sheaf', 'popup', 'exhibition', 'concert', 'crystal_ball', 'yin_yang', 'tshirt', 'clapper', 'speech', 'droplet', 'leaf', 'rainbow', 'milky_way', 'shooting_star', 'alarm_clock', 'check_mark_button', 'sparkles', 'warning', 'locked', 'money_bag', 'red_heart', 'briefcase', 'spiral_calendar', 'two_hearts', 'sunrise', 'candy', 'lollipop', 'spider', 'spider_web', 'bat', 'ghost', 'skull', 'jack_o_lantern', 'pepero_choco', 'pepero_almond', 'pepero_strawberry', 'pepero_nude', 'pepero_pair', 'pepero_bundle', 'pepero_box', 'pepero_basket', 'xmas_candy_cane', 'xmas_ornament', 'xmas_gingerbread', 'xmas_santa_hat', 'xmas_stocking', 'xmas_wreath', 'xmas_santa', 'christmas_tree', 'pear', 'dango', 'moon_viewing', 'full_moon'])
const SHARED = new Set(['bear', 'bike', 'bronze', 'camping', 'carwash', 'chimaek', 'cloud', 'coldwind', 'delivery', 'dog', 'garden', 'glasses', 'gold', 'hiking', 'iced_hot', 'jjamppong', 'laundry', 'letter', 'makeup', 'makgeolli', 'maple', 'moon', 'muggy', 'naengmyeon', 'photo', 'picnic', 'rabbit', 'rain', 'running', 'silver', 'snow', 'stars', 'sun_cloud', 'sun', 'sunset', 'taxi', 'umbrella', 'vent', 'walk', 'yajang', 'baseball', 'study', 'netflix', 'chestnut', 'peanut', 'tangerine', 'sweet_potato', 'fallen_leaf', 'kimchi', 'apple', 'mask', 'golf', 'jipkok', 'fishing', 'drive', 'kite', 'waterplay', 'riverwind', 'trot', 'pajeon', 'bingsu', 'blanket', 'indoordry', 'flower', 'bungeoppang', 'singing_rain', 'hangang', 'themepark', 'date', 'frizz', 'boiler', 'sunscreen', 'mosquito', 'tennis', 'hyodo', 'thanks', 'gift', 'party', 'game', 'selfie', 'sentimental', 'ginkgo', 'top', 'contact'])
const OWN = new Set(['fireworks', 'bulb', 'calendar', 'thermo', 'sheaf', 'popup', 'exhibition', 'concert', 'crystal_ball', 'yin_yang', 'tshirt', 'clapper', 'speech', 'droplet', 'leaf', 'rainbow', 'milky_way', 'shooting_star', 'alarm_clock', 'check_mark_button', 'sparkles', 'warning', 'locked', 'money_bag', 'red_heart', 'briefcase', 'spiral_calendar', 'two_hearts', 'sunrise', 'candy', 'lollipop', 'spider', 'spider_web', 'bat', 'ghost', 'skull', 'jack_o_lantern', 'pepero_choco', 'pepero_almond', 'pepero_strawberry', 'pepero_nude', 'pepero_pair', 'pepero_bundle', 'pepero_box', 'pepero_basket', 'xmas_candy_cane', 'xmas_ornament', 'xmas_gingerbread', 'xmas_santa_hat', 'xmas_stocking', 'xmas_wreath', 'xmas_santa', 'christmas_tree', 'pear', 'dango', 'moon_viewing', 'full_moon', 'suneung_pencil', 'suneung_eraser', 'suneung_heatpack', 'suneung_yeot', 'suneung_mochi', 'suneung_lunchbox', 'suneung_ticket', 'suneung_bouquet', 'newyear_popper', 'newyear_pouch', 'newyear_tteokguk', 'newyear_bell', 'newyear_sunset'])
/** 아이콘 이름 → 파일 경로 (공용 public/icons, B 전용 public/b/icons). 'none'(데이터 없는 칸)은 그림 없음 */
export function iconSrc(name: string) {
+1
View File
@@ -25,6 +25,7 @@ export type SheetState =
| { type: 'level' }
| { type: 'levelUp'; level: number }
| { type: 'gameHelp' }
| { type: 'contact' }
| null
export type SheetApi = { open: (s: Exclude<SheetState, null>) => void; close: () => void }
+2
View File
@@ -85,6 +85,8 @@ const PROPS: Record<Holiday['key'], [number, number, number, number]> = {
pepero: [require('../../../frontend/public/b/holiday/pepero-tl.webp'), require('../../../frontend/public/b/holiday/pepero-tr.webp'), require('../../../frontend/public/b/holiday/pepero-bl.webp'), require('../../../frontend/public/b/holiday/pepero-br.webp')],
christmas: [require('../../../frontend/public/b/holiday/christmas-tl.webp'), require('../../../frontend/public/b/holiday/christmas-tr.webp'), require('../../../frontend/public/b/holiday/christmas-bl.webp'), require('../../../frontend/public/b/holiday/christmas-br.webp')],
chuseok: [require('../../../frontend/public/b/holiday/chuseok-tl.webp'), require('../../../frontend/public/b/holiday/chuseok-tr.webp'), require('../../../frontend/public/b/holiday/chuseok-bl.webp'), require('../../../frontend/public/b/holiday/chuseok-br.webp')],
suneung: [require('../../../frontend/public/b/holiday/suneung-tl.webp'), require('../../../frontend/public/b/holiday/suneung-tr.webp'), require('../../../frontend/public/b/holiday/suneung-bl.webp'), require('../../../frontend/public/b/holiday/suneung-br.webp')],
newyear: [require('../../../frontend/public/b/holiday/newyear-tl.webp'), require('../../../frontend/public/b/holiday/newyear-tr.webp'), require('../../../frontend/public/b/holiday/newyear-bl.webp'), require('../../../frontend/public/b/holiday/newyear-br.webp')],
};
const CORNERS = [{ top: 0, left: 0 }, { top: 0, right: 0 }, { bottom: 0, left: 0 }, { bottom: 0, right: 0 }] as const;
+13
View File
@@ -106,6 +106,11 @@ export const ICONS: Record<string, number> = {
milky_way: require('../../../frontend/public/b/icons/milky_way.png'),
money_bag: require('../../../frontend/public/b/icons/money_bag.png'),
moon_viewing: require('../../../frontend/public/b/icons/moon_viewing.png'),
newyear_bell: require('../../../frontend/public/b/icons/newyear_bell.png'),
newyear_popper: require('../../../frontend/public/b/icons/newyear_popper.png'),
newyear_pouch: require('../../../frontend/public/b/icons/newyear_pouch.png'),
newyear_sunset: require('../../../frontend/public/b/icons/newyear_sunset.png'),
newyear_tteokguk: require('../../../frontend/public/b/icons/newyear_tteokguk.png'),
pear: require('../../../frontend/public/b/icons/pear.png'),
pepero_almond: require('../../../frontend/public/b/icons/pepero_almond.png'),
pepero_basket: require('../../../frontend/public/b/icons/pepero_basket.png'),
@@ -126,6 +131,14 @@ export const ICONS: Record<string, number> = {
spider: require('../../../frontend/public/b/icons/spider.png'),
spider_web: require('../../../frontend/public/b/icons/spider_web.png'),
spiral_calendar: require('../../../frontend/public/b/icons/spiral_calendar.png'),
suneung_bouquet: require('../../../frontend/public/b/icons/suneung_bouquet.png'),
suneung_eraser: require('../../../frontend/public/b/icons/suneung_eraser.png'),
suneung_heatpack: require('../../../frontend/public/b/icons/suneung_heatpack.png'),
suneung_lunchbox: require('../../../frontend/public/b/icons/suneung_lunchbox.png'),
suneung_mochi: require('../../../frontend/public/b/icons/suneung_mochi.png'),
suneung_pencil: require('../../../frontend/public/b/icons/suneung_pencil.png'),
suneung_ticket: require('../../../frontend/public/b/icons/suneung_ticket.png'),
suneung_yeot: require('../../../frontend/public/b/icons/suneung_yeot.png'),
sunrise: require('../../../frontend/public/b/icons/sunrise.png'),
thermo: require('../../../frontend/public/b/icons/thermo.png'),
tshirt: require('../../../frontend/public/b/icons/tshirt.png'),
+9 -1
View File
@@ -4608,7 +4608,15 @@ export const TalkTopic = {
/**
* CHUSEOK
*/
CHUSEOK: 9
CHUSEOK: 9,
/**
* SUNEUNG
*/
SUNEUNG: 10,
/**
* NEWYEAR
*/
NEWYEAR: 11
} as const;
/**
+5 -1
View File
@@ -1,7 +1,7 @@
/** 히어로·오늘의 각·단풍 지도·띠처럼 포스트 틀이 아닌 카드 (피드 응답의 반응 칸 이름) */
export type PinnedKey = 'hero_post' | 'gak_post' | 'foliage_post' | 'events_post' | 'season_post'
export type HolidayKey = 'halloween' | 'pepero' | 'christmas' | 'chuseok'
export type HolidayKey = 'halloween' | 'pepero' | 'christmas' | 'chuseok' | 'suneung' | 'newyear'
/** GA4로 보내는 이벤트와 값 (웹·앱 같이 씀). 목록은 docs/이벤트_추적.md. Sheet 는 화면마다 다른 창 이름 */
export type Events<Sheet extends string = string> = {
@@ -46,6 +46,8 @@ export type Events<Sheet extends string = string> = {
game_over: { round: number; score: number; best: boolean; drops: number }
toss_intro_start: Record<string, never>
install_banner_close: Record<string, never>
top_button: { page: string }
contact_click: { method: 'phone' | 'email' }
}
/** GA 에 찍히는 이벤트 이름 (한국어). 코드에서는 왼쪽 키로 부른다 */
@@ -90,4 +92,6 @@ export const GA_NAME: Record<keyof Events, string> = {
game_over: '게임_끝',
toss_intro_start: '토스소개_시작',
install_banner_close: '설치배너_닫기',
top_button: '맨위로_누름',
contact_click: '문의_누름',
}
+37 -1
View File
@@ -9,7 +9,7 @@ type GamePiece = { icon: string; name: string }
* 새 기념일: 여기에 한 줄 + TalkTopic(backend/common/enums.py) + 게임 그림(public/b/icons, lib.ts OWN) + 소품 그림(public/b/holiday, 투명 배경, b.css)
*/
export type Holiday = {
key: 'halloween' | 'pepero' | 'christmas' | 'chuseok'
key: 'halloween' | 'pepero' | 'christmas' | 'chuseok' | 'suneung' | 'newyear'
name: string
ranges: readonly (readonly [string, string])[]
topic: TalkTopic
@@ -87,6 +87,42 @@ export const HOLIDAYS: readonly Holiday[] = [
{ icon: 'full_moon', name: '보름달' },
],
},
{
key: 'suneung',
name: '수능 응원',
// 수능 날(11월 셋째 목요일)은 해마다 달라 그해만. 전날(응원 글이 가장 많은 날)부터
ranges: [['2026-11-18', '2026-11-19']],
topic: TalkTopic.SUNEUNG,
bg: 'sky',
game: [
{ icon: 'suneung_pencil', name: '연필' },
{ icon: 'suneung_eraser', name: '지우개' },
{ icon: 'suneung_heatpack', name: '핫팩' },
{ icon: 'suneung_yeot', name: '엿' },
{ icon: 'suneung_mochi', name: '찹쌀떡' },
{ icon: 'suneung_lunchbox', name: '도시락' },
{ icon: 'suneung_ticket', name: '수험표' },
{ icon: 'suneung_bouquet', name: '꽃다발' },
],
},
{
key: 'newyear',
name: '연말·새해',
// 해를 넘기므로 하루씩 두 줄
ranges: [['12-31', '12-31'], ['01-01', '01-01']],
topic: TalkTopic.NEWYEAR,
bg: 'night',
game: [
{ icon: 'newyear_popper', name: '폭죽' },
{ icon: 'newyear_pouch', name: '복주머니' },
{ icon: 'calendar', name: '달력' },
{ icon: 'newyear_tteokguk', name: '떡국' },
{ icon: 'newyear_bell', name: '제야의 종' },
{ icon: 'fireworks', name: '불꽃놀이' },
{ icon: 'newyear_sunset', name: '해넘이' },
{ icon: 'sunrise', name: '해돋이' },
],
},
]
const pad = (n: number) => String(n).padStart(2, '0')