Merge branch 'docs/search-1030'

This commit is contained in:
minaChoi committed 2026-10-30 09:57:13 +09:00
commit 08f9275c45
38 files changed
+270 -26

No files matched your search

+8
View File
@@ -448,3 +448,11 @@ docs를 6개로 합칠 때 옛 내용을 그대로 옮겼다. 아래는 코드
| [ ] | **[결정 필요]** GA4 맞춤 측정기준(이벤트 범위) 추가 등록 — `icon`(today_icon)·`sheet`(sheet_open)·`from`·`method`·`content_type`·`round`(game) | 지금 등록된 건 `gak_name`·`platform`·`region_name` 뿐이라 오늘 탭 아이콘별·창별·게임 라운드별 사용을 GA에서 못 나눔. 등록 전 데이터는 소급 안 됨 | GA4 관리 → 맞춤 정의 |
| [ ] | **[결정 필요]** '홈 화면에 추가' 카드 손보기 — 띄우는 조건(몇 번째 방문부터)·문구, 또는 빼기 | 10/22~10/28 테스트 트래픽 뺀 77명이 봤고 누른 사람 0 (앞 주 8명 중 1명 설치) | `frontend/src/b/installBanner.tsx` |
## 기념일 꾸밈 (`frontend/src/b/holiday.ts`)
| 상태 | 할 일 | 이유 | 관련 파일 |
|---|---|---|---|
| [ ] | `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` |
+4
View File
@@ -125,6 +125,10 @@ class TalkTopic(CodeEnum):
RAIN = 3 # 비·눈
FOLIAGE = 4 # 단풍·꽃
OUTFIT = 5 # 오늘 옷차림
HALLOWEEN = 6 # 기념일 주제: 그 기간에만 고를 수 있다 (frontend holiday.ts)
PEPERO = 7
CHRISTMAS = 8
CHUSEOK = 9
class TalkReport(CodeEnum):
@@ -0,0 +1,79 @@
오늘 날씨 1241842B - 1242089B -
내일 날씨 1255827B - 1241265B -
모레 날씨 1146464B - 1150726B -
이번주 날씨 1290799B - 1290981B -
주말 날씨 1306886B - 1307070B -
날씨 1404122B - 1404306B -
서울 오늘 날씨 1241948B - 1242134B -
서울 내일 날씨 1282168B - 1282348B -
서울 날씨 985505B - 985689B -
부산 오늘 날씨 1264133B - 1264313B -
부산 내일 날씨 1265164B - 1265344B -
부산 날씨 1213605B - 1213787B -
인천 오늘 날씨 1300790B - 1300974B -
인천 내일 날씨 1293527B - 1293711B -
인천 날씨 1260461B - 1260641B -
대구 오늘 날씨 1244846B - 1245026B -
대구 내일 날씨 1305698B - 1305880B -
대구 날씨 1231166B - 1231339B -
대전 오늘 날씨 1260892B - 1261079B -
대전 내일 날씨 1315087B - 1315271B -
대전 날씨 1317624B - 1317802B -
광주 오늘 날씨 1277429B - 1277605B -
광주 내일 날씨 1282066B - 1282246B -
광주 날씨 1265430B - 1265611B -
울산 오늘 날씨 1238077B - 1238262B -
울산 내일 날씨 1213012B - 1213192B -
울산 날씨 1257139B - 1257323B -
세종 오늘 날씨 1335637B - 1335817B -
세종 내일 날씨 1244726B - 1244912B -
세종 날씨 1350300B - 1350480B -
수원 오늘 날씨 1238160B - 1238344B -
수원 내일 날씨 1228071B - 1228249B -
수원 날씨 1348504B - 1348684B -
성남 오늘 날씨 1279860B - 1280042B -
성남 내일 날씨 1189405B - 1189593B -
성남 날씨 1239403B - 1239585B -
고양 오늘 날씨 1286139B - 1286317B -
고양 내일 날씨 1208419B - 1208605B -
고양 날씨 1277571B - 1277753B -
용인 오늘 날씨 1200469B - 1200659B -
용인 내일 날씨 1236616B - 1236798B -
용인 날씨 1368350B - 1368532B -
창원 오늘 날씨 1244725B - 1244903B -
창원 내일 날씨 1203664B - 1203844B -
창원 날씨 1280151B - 1280329B -
청주 오늘 날씨 1302209B - 1302391B -
청주 내일 날씨 1278427B - 1278611B -
청주 날씨 1368258B - 1368442B -
천안 오늘 날씨 1236997B - 1237182B -
천안 내일 날씨 1243104B - 1243289B -
천안 날씨 1319722B - 1319904B -
전주 오늘 날씨 1800004B - 1800190B -
전주 내일 날씨 1783583B - 1783765B -
전주 날씨 1261004B - 1261188B -
군산 오늘 날씨 1282946B - 1283130B -
군산 내일 날씨 1271879B - 1272061B -
군산 날씨 1267946B - 1268128B -
포항 오늘 날씨 1279182B - 1279362B -
포항 내일 날씨 1261670B - 1261854B -
포항 날씨 1308817B - 1309003B -
제주 오늘 날씨 1253715B - 1253895B -
제주 내일 날씨 1334766B - 1334942B -
제주 날씨 1308240B - 1308434B -
김해 오늘 날씨 1221203B - 1221389B -
김해 내일 날씨 1221664B - 1221844B -
김해 날씨 1287333B - 1287517B -
화성 오늘 날씨 1249282B - 1249468B -
화성 내일 날씨 1233491B - 1233673B -
화성 날씨 997204B - 997384B -
부천 오늘 날씨 924121B - 924303B -
부천 내일 날씨 1239101B - 1239281B -
부천 날씨 1060555B - 1060741B -
안산 오늘 날씨 1271510B - 1271690B -
안산 내일 날씨 1590933B - 1591114B -
안산 날씨 1273204B - 1273392B -
남양주 오늘 날씨 1240661B - 1240841B -
남양주 내일 날씨 1263026B - 1263214B -
남양주 날씨 1308914B - 1309096B -
날씨각 612597B 1 https://weather.o2o.kr/tomorrow/incheon/namdong 612783B 1 https://weather.o2o.kr/tomorrow/incheon/namdong
1 오늘 날씨 1241842B - 1242089B -
2 내일 날씨 1255827B - 1241265B -
3 모레 날씨 1146464B - 1150726B -
4 이번주 날씨 1290799B - 1290981B -
5 주말 날씨 1306886B - 1307070B -
6 날씨 1404122B - 1404306B -
7 서울 오늘 날씨 1241948B - 1242134B -
8 서울 내일 날씨 1282168B - 1282348B -
9 서울 날씨 985505B - 985689B -
10 부산 오늘 날씨 1264133B - 1264313B -
11 부산 내일 날씨 1265164B - 1265344B -
12 부산 날씨 1213605B - 1213787B -
13 인천 오늘 날씨 1300790B - 1300974B -
14 인천 내일 날씨 1293527B - 1293711B -
15 인천 날씨 1260461B - 1260641B -
16 대구 오늘 날씨 1244846B - 1245026B -
17 대구 내일 날씨 1305698B - 1305880B -
18 대구 날씨 1231166B - 1231339B -
19 대전 오늘 날씨 1260892B - 1261079B -
20 대전 내일 날씨 1315087B - 1315271B -
21 대전 날씨 1317624B - 1317802B -
22 광주 오늘 날씨 1277429B - 1277605B -
23 광주 내일 날씨 1282066B - 1282246B -
24 광주 날씨 1265430B - 1265611B -
25 울산 오늘 날씨 1238077B - 1238262B -
26 울산 내일 날씨 1213012B - 1213192B -
27 울산 날씨 1257139B - 1257323B -
28 세종 오늘 날씨 1335637B - 1335817B -
29 세종 내일 날씨 1244726B - 1244912B -
30 세종 날씨 1350300B - 1350480B -
31 수원 오늘 날씨 1238160B - 1238344B -
32 수원 내일 날씨 1228071B - 1228249B -
33 수원 날씨 1348504B - 1348684B -
34 성남 오늘 날씨 1279860B - 1280042B -
35 성남 내일 날씨 1189405B - 1189593B -
36 성남 날씨 1239403B - 1239585B -
37 고양 오늘 날씨 1286139B - 1286317B -
38 고양 내일 날씨 1208419B - 1208605B -
39 고양 날씨 1277571B - 1277753B -
40 용인 오늘 날씨 1200469B - 1200659B -
41 용인 내일 날씨 1236616B - 1236798B -
42 용인 날씨 1368350B - 1368532B -
43 창원 오늘 날씨 1244725B - 1244903B -
44 창원 내일 날씨 1203664B - 1203844B -
45 창원 날씨 1280151B - 1280329B -
46 청주 오늘 날씨 1302209B - 1302391B -
47 청주 내일 날씨 1278427B - 1278611B -
48 청주 날씨 1368258B - 1368442B -
49 천안 오늘 날씨 1236997B - 1237182B -
50 천안 내일 날씨 1243104B - 1243289B -
51 천안 날씨 1319722B - 1319904B -
52 전주 오늘 날씨 1800004B - 1800190B -
53 전주 내일 날씨 1783583B - 1783765B -
54 전주 날씨 1261004B - 1261188B -
55 군산 오늘 날씨 1282946B - 1283130B -
56 군산 내일 날씨 1271879B - 1272061B -
57 군산 날씨 1267946B - 1268128B -
58 포항 오늘 날씨 1279182B - 1279362B -
59 포항 내일 날씨 1261670B - 1261854B -
60 포항 날씨 1308817B - 1309003B -
61 제주 오늘 날씨 1253715B - 1253895B -
62 제주 내일 날씨 1334766B - 1334942B -
63 제주 날씨 1308240B - 1308434B -
64 김해 오늘 날씨 1221203B - 1221389B -
65 김해 내일 날씨 1221664B - 1221844B -
66 김해 날씨 1287333B - 1287517B -
67 화성 오늘 날씨 1249282B - 1249468B -
68 화성 내일 날씨 1233491B - 1233673B -
69 화성 날씨 997204B - 997384B -
70 부천 오늘 날씨 924121B - 924303B -
71 부천 내일 날씨 1239101B - 1239281B -
72 부천 날씨 1060555B - 1060741B -
73 안산 오늘 날씨 1271510B - 1271690B -
74 안산 내일 날씨 1590933B - 1591114B -
75 안산 날씨 1273204B - 1273392B -
76 남양주 오늘 날씨 1240661B - 1240841B -
77 남양주 내일 날씨 1263026B - 1263214B -
78 남양주 날씨 1308914B - 1309096B -
79 날씨각 612597B 1 https://weather.o2o.kr/tomorrow/incheon/namdong 612783B 1 https://weather.o2o.kr/tomorrow/incheon/namdong
+20 -13
View File
@@ -402,7 +402,13 @@
순위 = 결과에서 weather.o2o.kr이 몇 번째 사이트인지(같은 사이트는 한 번만 셈). `-` 첫 페이지에 없음. 적힌 검색어만 나온 것, 나머지는 `-`.
구글은 첫 페이지(사이트 6~9개)만 본다. 로그인한 브라우저·위치(성남) 기준.
### 최근 요약 (10/29, 직전 측정 대비 — 구글은 10/27, 네이버는 10/28)
### 최근 요약 (10/30, 직전 10/29 대비)
- 새로 잡힘: 없음
- 빠짐: 없음 (10/29에 빠진 `성남 오늘 날씨`·`고양 내일 날씨`·`수원 오늘 날씨`는 구글·네이버 모두 여전히 -)
- 순위 바뀜: 없음 — `날씨각` 네이버 1 그대로(첫 링크가 `/` → `/tomorrow/incheon/namdong`으로 바뀜), 구글은 `제주 날씨`부터 CAPTCHA로 `날씨각` 포함 16개 못 잼
### 지난 요약 (10/29, 직전 측정 대비 — 구글은 10/27, 네이버는 10/28)
- 새로 잡힘: 없음
- 빠짐: `성남 오늘 날씨` → 구글 2p8→-, 네이버 10→-. `고양 내일 날씨` → 구글 2p7→-. `수원 오늘 날씨` → 네이버 14→-. (구글 `site:weather.o2o.kr 성남` 은 9건 나와 색인은 살아 있음)
@@ -430,21 +436,22 @@
실제 검색량이 큰 검색어 78개 + 날씨각. 구글 = 로그인 브라우저·성남 위치, 1~2페이지. 네이버 = 통합검색·웹 탭 첫 화면. `-` = 없음, `?` = 구글 차단으로 못 잼.
| 검색어 | 구글 10/26 | 구글 10/27 | 구글 10/28 | 구글 10/29 | 네이버 10/26 | 네이버 10/27 | 네이버 10/28 | 네이버 10/29 |
|---|---|---|---|---|---|---|---|---|
| 날씨각 | 1p1 | 1p1 | 1p1 | 1p1 | 1 | 1 | 1 | 1 |
| 성남 오늘 날씨 | 2p10 `/today/gyeonggi/seongnam` | 2p8 | ? | - | 10 | 6 | 10 | - |
| 수원 오늘 날씨 | - | - | ? | - | - | - | 14 `/today/gyeonggi/suwon` | - |
| 고양 내일 날씨 | - | 2p7 `/tomorrow/gyeonggi/goyang` | ? | - | - | - | - | - |
| 군산 오늘 날씨 | 3p4 (2p 밖) | ? | ? | - | - | - | - | - |
| 오늘 날씨 · 내일 날씨 · 모레 날씨 · 이번주 날씨 · 주말 날씨 · 날씨 | - | - | ? | - | - | - | - | - |
| 서울 · 부산 · 인천 · 대전 · 광주 · 울산 · 세종 × 오늘/내일/날씨, 수원 내일·수원 날씨, 대구 날씨, 성남 내일·성남 날씨 | - | - | ? | - | - | - | - | - |
| 대구 오늘 날씨 · 대구 내일 날씨 | - | ? | ? | - | - | - | - | - |
| 고양 오늘·고양 날씨, 용인 · 창원 · 청주 · 천안 · 전주 × 오늘/내일/날씨 | - | - | ? | - | - | - | - | - |
| 군산 내일·군산 날씨, 포항 · 제주 · 김해 · 화성 · 부천 · 안산 · 남양주 × 오늘/내일/날씨 | - | ? | ? | - | - | - | - | - |
| 검색어 | 구글 10/26 | 구글 10/27 | 구글 10/28 | 구글 10/29 | 구글 10/30 | 네이버 10/26 | 네이버 10/27 | 네이버 10/28 | 네이버 10/29 | 네이버 10/30 |
|---|---|---|---|---|---|---|---|---|---|---|
| 날씨각 | 1p1 | 1p1 | 1p1 | 1p1 | ? | 1 | 1 | 1 | 1 | 1 `/tomorrow/incheon/namdong` |
| 성남 오늘 날씨 | 2p10 `/today/gyeonggi/seongnam` | 2p8 | ? | - | - | 10 | 6 | 10 | - | - |
| 수원 오늘 날씨 | - | - | ? | - | - | - | - | 14 `/today/gyeonggi/suwon` | - | - |
| 고양 내일 날씨 | - | 2p7 `/tomorrow/gyeonggi/goyang` | ? | - | - | - | - | - | - | - |
| 군산 오늘 날씨 | 3p4 (2p 밖) | ? | ? | - | - | - | - | - | - | - |
| 오늘 날씨 · 내일 날씨 · 모레 날씨 · 이번주 날씨 · 주말 날씨 · 날씨 | - | - | ? | - | - | - | - | - | - | - |
| 서울 · 부산 · 인천 · 대전 · 광주 · 울산 · 세종 × 오늘/내일/날씨, 수원 내일·수원 날씨, 대구 날씨, 성남 내일·성남 날씨 | - | - | ? | - | - | - | - | - | - | - |
| 대구 오늘 날씨 · 대구 내일 날씨 | - | ? | ? | - | - | - | - | - | - | - |
| 고양 오늘·고양 날씨, 용인 · 창원 · 청주 · 천안 · 전주 × 오늘/내일/날씨 | - | - | ? | - | - | - | - | - | - | - |
| 군산 내일·군산 날씨, 포항 · 제주 · 김해 · 화성 · 부천 · 안산 · 남양주 × 오늘/내일/날씨 | - | ? | ? | - | - (제주 날씨·김해·화성·부천·안산·남양주는 ?) | - | - | - | - | - |
- 서울·부산·인천·대구·대전·광주·울산은 시 단위 페이지가 없음(구 페이지만). '서울 날씨'를 받을 페이지 자체가 없다.
- 원본: `docs/search_log/{날짜}_naver_대표검색어.tsv`
- 10/30 구글: 탭에서 열어 63개까지 잼, `제주 날씨`에서 CAPTCHA(sorry)로 멈춤. 나머지 16개(`날씨각` 포함)는 `?`.
- 10/28 구글: 브라우저 fetch 로 받은 검색 결과가 'JavaScript 필요' 안내 페이지로 바뀌어 결과를 못 읽었고, 탭에서 직접 열자 CAPTCHA(sorry)가 떠 멈춤. 다음 측정은 탭에서 실제 페이지를 열어 읽는 방식으로 해야 함.
### 키워드별 잡힘 (10/26)
+2 -2
View File
@@ -42,7 +42,7 @@ GA4 태그(`gtag.js`, 측정 ID `G-D378J4X373`)를 `index.html`에 심고, 화
| `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`(주제 번호), `with_image` | `talk.tsx` 글쓰기 `submit` |
| `talk_post` | 이야기 글 올리기 성공 | `topic`(주제 번호, 6~9 는 기념일: 할로윈·빼빼로데이·크리스마스·추석), `with_image` | `talk.tsx` 글쓰기 `submit` |
| `feed_item_view` | 오늘 피드에 섞인 사람 글·행사 포스트가 처음 반쯤 보임 (한 장에 한 번) | `item_type: 'talk' \| 'event'`, `position`(피드에서 그 종류의 몇 번째) | `TodayPage.tsx` `Seen` |
| `hero_day_switch` | 히어로 오늘/내일 스위치를 바꿈 | `day: 'today' \| 'tomorrow'` | `TodayPage.tsx` |
| `shorts_open` | 쇼츠 페이지(/shorts/영상ID)로 들어옴 (오늘 화면 쇼츠 줄·공유 링크) | `video_id` | `Shorts.tsx` `ShortsPage` |
@@ -58,7 +58,7 @@ GA4 태그(`gtag.js`, 측정 ID `G-D378J4X373`)를 `index.html`에 심고, 화
| `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`(오늘 우리 구 풍속) | `CloudMergePage.tsx` `onUp` |
| `game_start` | 구름 합치기 한 판의 첫 그림을 떨어뜨림 (페이지만 열고 안 한 사람과 구분) | `again`(다시 하기로 시작), `logged_in`, `wind_ms`(오늘 우리 구 풍속), `theme`(그림: `basic`·`halloween`·`pepero`·`christmas`·`chuseok`, `holiday.ts`) | `CloudMergePage.tsx` `onUp` |
| `game_round` | 구름 합치기 라운드를 깸 | `round`(깬 라운드), `score`(그때 총점), `logged_in`(각을 받는지) | `CloudMergePage.tsx` `onScore` |
| `game_over` | 구름 합치기가 넘쳐서 끝남 | `round`(끝난 라운드), `score`, `best`(최고 기록 갱신), `drops`(떨어뜨린 횟수) | `CloudMergePage.tsx` `onOver` |
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

+2 -2
View File
@@ -10,7 +10,7 @@ import { slotAt } from '@nalssigak/shared/lib/weatherText'
import { track } from '../lib/analytics'
import { cx } from '../lib/utils'
import { useAuth } from './authContext'
import { createGame, DROP_Y, H, LEVELS, LINE_Y, loadBest, randomLevel, roundTarget, saveBest, W, windDir, type Game } from './cloudMerge'
import { createGame, DROP_Y, H, HOLIDAY, LEVELS, LINE_Y, loadBest, randomLevel, roundTarget, saveBest, W, windDir, type Game } from './cloudMerge'
import { useLevel } from './level'
import { iconSrc } from './lib'
import { useRegion } from './regionContext'
@@ -213,7 +213,7 @@ export function CloudMergePage() {
const onUp = (e: PointerEvent<HTMLCanvasElement>) => {
const game = gameRef.current
if (!game || over || performance.now() < coolRef.current) return
if (dropsRef.current === 0) track('game_start', { again: play > 0, logged_in: loggedIn, wind_ms: windMs })
if (dropsRef.current === 0) track('game_start', { again: play > 0, logged_in: loggedIn, wind_ms: windMs, theme: HOLIDAY?.key ?? 'basic' })
dropsRef.current += 1
game.drop(nextRef.current, toX(e))
coolRef.current = performance.now() + 450
+2 -2
View File
@@ -5,7 +5,7 @@ import { cx } from '../lib/utils'
import { useAuth } from './authContext'
import { useSheet } from './sheetContext'
import { FeedComposer, TalkCard } from './talk'
import { TOPICS, useMyTalks, useTopicTalks } from './talkState'
import { openTopics, TOPICS, useMyTalks, useTopicTalks } from './talkState'
import { Rail, Sec } from './ui'
type Tab = TalkTopic | 'all' | 'mine'
@@ -34,7 +34,7 @@ export function TalkPage() {
const topicList = useTopicTalks(tab === 'all' || tab === 'mine' ? undefined : tab)
const mineList = useMyTalks(tab === 'mine' && loggedIn)
const { talks, loaded, more, loadMore } = tab === 'mine' ? mineList : topicList
const tabs: (readonly [Tab, string])[] = [['all', '전체'], ...TOPICS, ['mine', '내 글']]
const tabs: (readonly [Tab, string])[] = [['all', '전체'], ...openTopics(), ['mine', '내 글']]
const go = (k: Tab) => setParams(k === 'mine' ? { mine: '1' } : k === 'all' ? {} : { topic: String(k) }, { replace: true })
return (
+6 -1
View File
@@ -1,7 +1,8 @@
import Matter from 'matter-js'
import { currentHoliday } from './holiday'
/** 작은 것부터 큰 것 순서. 같은 단계 둘이 닿으면 다음 단계로 합쳐지고, 해 둘은 사라지며 보너스 */
export const LEVELS = [
const BASE = [
{ icon: 'muggy', name: '물방울', r: 15, color: '#d9f0ff' },
{ icon: 'snow', name: '눈송이', r: 21, color: '#e4ecff' },
{ icon: 'cloud', name: '구름', r: 28, color: '#f1f3f8' },
@@ -12,6 +13,10 @@ export const LEVELS = [
{ icon: 'sun', name: '해', r: 78, color: '#ffd2a1' },
] as const
/** 기념일엔 그림·이름만 그날 것으로 (크기·색·합치기 규칙은 그대로) */
export const HOLIDAY = currentHoliday()
export const LEVELS = BASE.map((l, i) => (HOLIDAY ? { ...l, ...HOLIDAY.game[i] } : l))
export const W = 360
export const H = 540
/** 이 선 위에 쌓인 채로 LOSE_MS 넘게 있으면 끝 */
+115
View File
@@ -0,0 +1,115 @@
import { TalkTopic } from '@nalssigak/shared/api/client/types.gen'
import { kst } from '@nalssigak/shared/lib'
/** 게임 8단계 그림을 바꾼다. 작은 것부터 큰 것 순서, 크기·색은 원래 단계 그대로 */
type GamePiece = { icon: string; name: string }
/**
* 기념일 꾸밈. 기간(KST, 양 끝 포함) 안에만 켜진다. 'MM-DD' 는 해마다, 'YYYY-MM-DD' 는 그해만(음력 기념일).
* 새 기념일: 여기에 한 줄 + TalkTopic(backend/common/enums.py) + 그림(public/b/icons, lib.ts OWN)
*/
export type Holiday = {
key: 'halloween' | 'pepero' | 'christmas' | 'chuseok'
name: string
ranges: readonly (readonly [string, string])[]
topic: TalkTopic
/** 글만 있는 사람 글 배경 (b.css b-bg-*) */
bg: string
game: readonly GamePiece[]
}
export const HOLIDAYS: readonly Holiday[] = [
{
key: 'halloween',
name: '할로윈',
ranges: [['10-31', '11-01']],
topic: TalkTopic.HALLOWEEN,
bg: 'night',
game: [
{ icon: 'candy', name: '사탕' },
{ icon: 'lollipop', name: '막대사탕' },
{ icon: 'spider', name: '거미' },
{ icon: 'spider_web', name: '거미줄' },
{ icon: 'bat', name: '박쥐' },
{ icon: 'ghost', name: '유령' },
{ icon: 'skull', name: '해골' },
{ icon: 'jack_o_lantern', name: '호박등' },
],
},
{
key: 'pepero',
name: '빼빼로데이',
ranges: [['11-11', '11-11']],
topic: TalkTopic.PEPERO,
bg: 'peach',
game: [
{ icon: 'candy', name: '사탕' },
{ icon: 'cookie', name: '쿠키' },
{ icon: 'chocolate_bar', name: '초콜릿' },
{ icon: 'ribbon', name: '리본' },
{ icon: 'love_letter', name: '편지' },
{ icon: 'red_heart', name: '하트' },
{ icon: 'heart_with_ribbon', name: '리본 하트' },
{ icon: 'wrapped_gift', name: '선물' },
],
},
{
key: 'christmas',
name: '크리스마스',
ranges: [['12-24', '12-25']],
topic: TalkTopic.CHRISTMAS,
bg: 'mint',
game: [
{ icon: 'snowflake', name: '눈송이' },
{ icon: 'star', name: '별' },
{ icon: 'bell', name: '종' },
{ icon: 'socks', name: '양말' },
{ icon: 'cookie', name: '쿠키' },
{ icon: 'wrapped_gift', name: '선물' },
{ icon: 'snowman', name: '눈사람' },
{ icon: 'christmas_tree', name: '트리' },
],
},
{
key: 'chuseok',
name: '추석',
ranges: [['2027-09-14', '2027-09-16']],
topic: TalkTopic.CHUSEOK,
bg: 'butter',
game: [
{ icon: 'chestnut', name: '밤' },
{ icon: 'pear', name: '배' },
{ icon: 'apple', name: '사과' },
{ icon: 'dango', name: '떡' },
{ icon: 'rabbit', name: '토끼' },
{ icon: 'maple', name: '단풍' },
{ icon: 'moon_viewing', name: '달맞이' },
{ icon: 'full_moon', name: '보름달' },
],
},
]
const pad = (n: number) => String(n).padStart(2, '0')
function inRange([from, to]: readonly [string, string], y: number, md: string) {
const day = from.length === 10 ? `${y}-${md}` : md
return from <= day && day <= to
}
/** 미리 보기 기념일: 주소의 ?holiday= 를 탭이 닫힐 때까지 기억 */
function previewKey() {
const q = new URLSearchParams(location.search).get('holiday')
if (q) sessionStorage.setItem('holiday', q)
return q ?? sessionStorage.getItem('holiday')
}
/** 오늘(KST) 켜진 기념일. ?holiday=christmas 로 미리 보기 */
export function currentHoliday(now = new Date()): Holiday | undefined {
const preview = previewKey()
if (preview) return HOLIDAYS.find((h) => h.key === preview)
const { y, mo, d } = kst(now)
const md = `${pad(mo)}-${pad(d)}`
return HOLIDAYS.find((h) => h.ranges.some((r) => inRange(r, y, md)))
}
export const holidayByTopic = (t?: number) => HOLIDAYS.find((h) => h.topic === t)
+1 -1
View File
@@ -2,7 +2,7 @@ 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'])
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', 'cookie', 'chocolate_bar', 'ribbon', 'love_letter', 'heart_with_ribbon', 'wrapped_gift', 'snowflake', 'star', 'bell', 'socks', 'snowman', 'christmas_tree', 'pear', 'dango', 'moon_viewing', 'full_moon'])
/** 아이콘 이름 → 파일 경로 (공용 public/icons, B 전용 public/b/icons). 'none'(데이터 없는 칸)은 그림 없음 */
export function iconSrc(name: string) {
+4 -3
View File
@@ -15,7 +15,8 @@ import { cx } from '../lib/utils'
import { useAuth } from './authContext'
import { kst } from '@nalssigak/shared/lib'
import { useRegion } from './regionContext'
import { topicName, TOPICS, useMyTalks } from './talkState'
import { holidayByTopic } from './holiday'
import { openTopics, topicName, useMyTalks } from './talkState'
import { useSheet } from './sheetContext'
import { CameraIcon, CommentIcon, HeartIcon, SendIcon } from './svg'
import { Avatar, TAP44 } from './ui'
@@ -153,7 +154,7 @@ function Composer({ onDone }: { onDone?: (t: TalkData) => void }) {
</div>
)}
<div className="mt-2 flex flex-wrap gap-1.5" role="radiogroup" aria-label="글 주제">
{TOPICS.map(([k, label]) => (
{openTopics().map(([k, label]) => (
<button
key={k}
type="button"
@@ -377,7 +378,7 @@ export function TalkPost({ t }: { t: TalkData }) {
<MenuButton menu={menu} setMenu={setMenu} className="ml-auto" />
</div>
{menu !== 'closed' && <TalkMenu t={t} menu={menu} setMenu={setMenu} className="px-3 pb-2.5" />}
<div ref={bodyRef} onClick={onTap} className={cx('b-day aspect-[4/5] overflow-hidden', !src && `b-bg-${(t.topic && TOPIC_BG[t.topic]) || 'mint'} grid place-items-center px-7`)}>
<div ref={bodyRef} onClick={onTap} className={cx('b-day aspect-[4/5] overflow-hidden', !src && `b-bg-${(t.topic && (TOPIC_BG[t.topic] ?? holidayByTopic(t.topic)?.bg)) || 'mint'} grid place-items-center px-7`)}>
{src ? (
<img src={src} alt="" loading="lazy" className="size-full bg-[#eef4fc] object-cover" />
) : (
+8
View File
@@ -1,6 +1,7 @@
import { useInfiniteQuery } from '@tanstack/react-query'
import { listMyTalksInfiniteOptions, listTalksInfiniteOptions } from '@nalssigak/shared/api/client/@tanstack/react-query.gen'
import { TalkTopic } from '@nalssigak/shared/api/client/types.gen'
import { currentHoliday, HOLIDAYS } from './holiday'
import { useRegion } from './regionContext'
// 글 주제와 이름
@@ -10,9 +11,16 @@ export const TOPICS = [
[TalkTopic.RAIN, '비·눈'],
[TalkTopic.FOLIAGE, '단풍·꽃'],
[TalkTopic.OUTFIT, '오늘 옷차림'],
...HOLIDAYS.map((h) => [h.topic, h.name] as const),
] as const
export const topicName = (t?: number) => TOPICS.find(([k]) => k === t)?.[1] ?? '동네 이야기'
/** 지금 고를 수 있는 주제: 기념일 주제는 그 기간에만 */
export function openTopics() {
const on = currentHoliday()?.topic
return TOPICS.filter(([k]) => !HOLIDAYS.some((h) => h.topic === k) || k === on)
}
/** 주제별 글 페이지 목록 (topic 없으면 전체) */
export function useTopicTalks(topic?: TalkTopic) {
const { region } = useRegion()
+2 -1
View File
@@ -1,4 +1,5 @@
import type { PinnedKey } from '../b/pinnedLike'
import type { Holiday } from '../b/holiday'
import type { SheetState } from '../b/sheetContext'
/** GA4로 보내는 이벤트와 값. 목록은 docs/이벤트_추적.md */
@@ -37,7 +38,7 @@ type Events = {
today_icon: { icon: string }
saju_input: { with_time: boolean }
saju_view: { scene: string; score: number; strength: string; top_element: string }
game_start: { again: boolean; logged_in: boolean; wind_ms: number }
game_start: { again: boolean; logged_in: boolean; wind_ms: number; theme: 'basic' | Holiday['key'] }
game_round: { round: number; score: number; logged_in: boolean }
game_over: { round: number; score: number; best: boolean; drops: number }
toss_intro_start: Record<string, never>
+17 -1
View File
@@ -4574,7 +4574,23 @@ export const TalkTopic = {
/**
* OUTFIT
*/
OUTFIT: 5
OUTFIT: 5,
/**
* HALLOWEEN
*/
HALLOWEEN: 6,
/**
* PEPERO
*/
PEPERO: 7,
/**
* CHRISTMAS
*/
CHRISTMAS: 8,
/**
* CHUSEOK
*/
CHUSEOK: 9
} as const;
/**