Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f040bc6d4 | ||
|
|
df34d0a1b4 | ||
|
|
b436ee0e0a | ||
|
|
9f6a6b477b | ||
|
|
cfd45c3b3a | ||
|
|
70286030b1 | ||
|
|
89ad5e1600 | ||
|
|
1c9e15500b | ||
|
|
cff44be771 | ||
|
|
26624f0888 | ||
|
|
19d84397ce | ||
|
|
9431dc31c2 | ||
|
|
08f9275c45 | ||
|
|
66f0bf8072 | ||
|
|
4fec164364 | ||
|
|
3c58552852 |
No files matched your search
@@ -328,6 +328,7 @@
|
||||
| [x] | 10/28 세미정장 코디(철회: 20-30대 남자에 나팔바지라는 피드백, 포스트 4903 10/28 삭제함(deleted=true)·인스타 앱에서 삭제 필요) — 킹서버 카드 23→포스트 4903, 인스타 https://www.instagram.com/p/DfBIhUdAbbV/. 참고 스냅 f20 https://www.musinsa.com/snap/1560205304641814679 · m20 https://www.musinsa.com/snap/1551785083122597386 · f40 https://www.musinsa.com/snap/1551572173880406114 · m40 https://www.musinsa.com/snap/1556284432455808475. 4장 1:1 검수. 크롬이 2번째 장 렌더에서 멈춰 장마다 프로필을 따로 써서 다시 찍음, 인스타 API는 request limit을 돌려줬지만 실제 게시됨(ig_media_id 미기록) | 사용자 요청 (10/28) | `admin/scripts/card.mjs` |
|
||||
| [x] | 10/28 세미정장 코디 다시(20-30대 남자만 교체: 오피서 코트·헨리넥 니트·다크 브라운 와이드 팬츠·헤비 부츠·토트백, 코디 구성을 먼저 확인받고 그림) — 킹서버 카드 24→포스트 4904, 인스타 https://www.instagram.com/p/DfBJ4SlAaok/. 참고 스냅 m20 https://www.musinsa.com/snap/1562338908609136514 (나머지 3명은 카드 23과 같음). 첫 그림은 상품 썸네일을 따라 바지가 베이지로 나와 스냅 색(브라운)으로 다시 그림 | 사용자 요청 (10/28) | `admin/scripts/daily-ootd.mjs` |
|
||||
| [x] | 10/28 연애 타로(단풍각·데이트각·별보기각, 새 표지: 주제 배지 + 큰 질문) — 킹서버 카드 26→포스트 4906, 인스타 https://www.instagram.com/p/DfBQCW0ARgL/ (ig_media_id 17953447719320497). 처음 올린 카드 25→포스트 4905(인스타 DfBPIHJAR0m)는 행운 포인트가 날씨 정보뿐이라는 피드백으로 철회: 포스트 4905 deleted=true, 인스타 글은 앱에서 삭제됨. 행운 포인트를 "시각 · 행운 아이템"(리딩 속 행동에 쓰는 물건)으로 바꿔 다시 게시. 문구를 먼저 확인받음: 첫 기획의 행운 포인트(6시 1도·10시 바람)를 예보 slot 값으로 고치고, 연애와 관련 없는 카드(해돋이각·테니스각)를 데이트각·별보기각으로 바꿈. 5장 1:1 검수. 인스타 API는 두 번 다 request limit을 돌려줬지만 실제 게시됨(최신 글 확인 후 재시도 안 함) | 사용자 요청 (10/28) | `admin/src/cards/templates.tsx`, `admin/scripts/plan.mjs` |
|
||||
| [x] | 10/30 나들이 타로(억새각·캠핑각·야장각, 질문 "이번 주말, 어디로 놀러 갈까요?", 행운 시각은 토요일 서울 예보) — 킹서버 카드 29→포스트 6713, 인스타 https://www.instagram.com/p/DfGhl5YgUqE/ . 인스타 API가 'Application request limit reached'를 돌려줬지만 실제로 올라가 다시 안 올림(card_set.ig_media_id 는 비어 있음). '나들이'는 대주제 배경(skin)이 없어 star 태그(#공부 #직장인)가 붙던 것을 copy.tags 로 #주말나들이 #주말뭐하지 #가을나들이 #나들이타로 로 바꿈. 관리자 서버가 옛 로컬 백엔드(9810, /v1/index/list 500)를 보고 있어 운영 API(weather.o2o.kr)로 다시 켬 | 인스타 홍보 | `admin/src/cards/templates.tsx` |
|
||||
| [x] | 각 카드 그림 미리 생성 — 가을에 나올 만한 28장(피크닉·캠핑·놀이공원·빨래·단풍·억새·테니스·골프·군고구마·붕어빵·군밤·사진산책·별보기·환기·세차·이불빨래·데이트·치맥·막걸리·파전·우산·넷플릭스·집콕·한강밤바람·멍뭉산책·센치·감성노래·낚시) + 기존 8 = 36/68. 여름·한겨울 전용 32장은 철 되면 생성 | 사용자 요청 (10/26) | `admin/src/assets/gak-card/` |
|
||||
| [ ] | 카드 자동화 다음 단계 — ① 생성 직후 자동 검사(Claude 비전: 옷 개수·사람·글자·추가 옷, 불합격 1회 재생성) ② 승인 대기 카드 메일/Teams 알림 + 서명 토큰 승인 링크(`GET /v1/card/{id}/approve`) ③ 맥 launchd 매일 06:30 `claude -p "/daily-cards"` ④ 그림 세트가 차면 킹서버로 이전 | 사용자 요청 (10/26) | `backend/router/v1/card/card.py`, `admin/scripts/` |
|
||||
| [ ] | 앱 헤더가 400~448px 폭에서 컨테이너를 넘쳐 로그인 버튼이 잘림(`frontend/src/b/BLayout.tsx` TopBar). 캡처는 456px로 찍어 피했지만 실제 폰(430·440px)에서도 잘릴 수 있음 | 10/24 캡처 중 발견 | `frontend/src/b/BLayout.tsx` |
|
||||
@@ -448,3 +449,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` |
|
||||
@@ -146,7 +146,8 @@ const tarot: Template = {
|
||||
post: (_d, c) => ({
|
||||
title: `오늘의 ${c.title.replaceAll('\n', ' ').replaceAll('*', '')}`,
|
||||
caption: `Q. ${c.question} 1·2·3 중 한 장을 골라 보세요`,
|
||||
hashtags: tags(SKIN_TAGS[c.skin ?? ''] ?? [], [c.n1, c.n2, c.n3].map((n) => (n ? `#${n.replace(/각$/, '').replace(/\s/g, '')}` : undefined)), ['#날씨각', '#날씨타로', '#타로', '#오늘의타로', '#오늘의운세', '#오늘날씨']),
|
||||
// 대주제 배경(skin)과 태그가 안 맞는 주제(나들이 등)는 copy.tags(띄어쓰기로 구분)로 주제 태그를 바꾼다
|
||||
hashtags: tags(c.tags ? c.tags.split(' ') : (SKIN_TAGS[c.skin ?? ''] ?? []), [c.n1, c.n2, c.n3].map((n) => (n ? `#${n.replace(/각$/, '').replace(/\s/g, '')}` : undefined)), ['#날씨각', '#날씨타로', '#타로', '#오늘의타로', '#오늘의운세', '#오늘날씨']),
|
||||
}),
|
||||
name: '날씨 타로',
|
||||
autoPlan: true,
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -183,12 +183,23 @@ class WeatherWhy(WebPacketProtocol):
|
||||
note: str = Field(description="지금 값 (예: 체감 19°, 편한 범위 18~24° 안)")
|
||||
|
||||
|
||||
class TomorrowEvent(WebPacketProtocol):
|
||||
event_id: int
|
||||
name: str
|
||||
place: str
|
||||
icon: str
|
||||
start_date: date
|
||||
end_date: date
|
||||
|
||||
|
||||
class HeroTomorrow(WebPacketProtocol):
|
||||
"""히어로 '내일' 스위치. 3시간 칸 날씨는 /v1/weather/today?day=tomorrow 로 따로 받는다."""
|
||||
"""히어로 '내일' 스위치와 내일 페이지(/tomorrow/...). 3시간 칸 날씨는 /v1/weather/today?day=tomorrow 로 따로 받는다."""
|
||||
day: date
|
||||
weather_slots: dict[str, int] = Field(default_factory=dict, description="내일 구간별 날씨 점수 {morning·day·evening·night: 점수}")
|
||||
weather_why: dict[str, list[WeatherWhy]] = Field(default_factory=dict, description="내일 구간별 날씨 점수 근거")
|
||||
top1: Optional[TopIndex] = Field(default=None, description="내일 하루 점수로 1위인 각. score·summary 는 내일 값")
|
||||
ranked: list[TopIndex] = Field(default_factory=list, description="내일 하루 점수 순위 5개 (내일 페이지 '내일의 각'). top1 이 첫째")
|
||||
events: list[TomorrowEvent] = Field(default_factory=list, description="내일 열리는 같은 시도 근처 행사 최대 3개 (내일 페이지)")
|
||||
|
||||
|
||||
class Hero(WebPacketProtocol):
|
||||
|
||||
@@ -22,7 +22,7 @@ from crud.season_crud import SeasonCRUD
|
||||
from crud.weather_crud import WeatherCRUD
|
||||
from router.v1.feed.protocol import (
|
||||
BandArticle, BandEvent, Bands, Cut, GakSlide, Hero, HeroStat, HeroTomorrow, HourCell, HoursSlide, ImageSlide, PostData, PostReaction, Res_Feed, Row, RowsSlide, SunsetSlide,
|
||||
PlanSlide, PlanStep, TopIndex, WeatherWhy, WeekDay, WeekGak, WeekSlide,
|
||||
PlanSlide, PlanStep, TomorrowEvent, TopIndex, WeatherWhy, WeekDay, WeekGak, WeekSlide,
|
||||
)
|
||||
from router.v1.index.protocol import TrendPoint
|
||||
from services.air_service import GRADE_LABEL as AIR_GRADE_LABEL
|
||||
@@ -39,7 +39,7 @@ from services.now_service import NowService, NowWeather
|
||||
from services.season_service import SeasonService
|
||||
from services.sky_service import SkyService, SkyView, day_verdict
|
||||
from services.weather_service import TodayWeather, WeatherService
|
||||
from services.week_service import DayPlan, EventItem, WeekService, image_credit, mix_kinds
|
||||
from services.week_service import DayPlan, EventItem, WeekService, event_sidos, image_credit, mix_kinds
|
||||
from services.weekend_plan import day_plan, forecast, pick_events
|
||||
from services.weekend_rank import TripPick, WeekendRank, pick_trip, weekend_days
|
||||
|
||||
@@ -262,24 +262,24 @@ def _by_position(posts: list[Post]) -> list[Post]:
|
||||
return list(out.values())
|
||||
|
||||
|
||||
def _tomorrow_best(board: IndexBoard, day: date) -> Optional[tuple[IndexItem, IndexScore]]:
|
||||
"""내일 하루 점수로 1위인 각과 그 점수 (동점이면 중요도 순)."""
|
||||
best = None
|
||||
for i in board.items:
|
||||
s = next((x for x in i.trend if x.score_date == day), None)
|
||||
if s is not None and (best is None or rank_score(s.score, i.definition.priority) > rank_score(best[1].score, best[0].definition.priority)):
|
||||
best = (i, s)
|
||||
return best
|
||||
def _tomorrow_ranked(board: IndexBoard, day: date) -> list[tuple[IndexItem, IndexScore]]:
|
||||
"""내일 하루 점수 순으로 제철 각과 그 점수 (동점이면 중요도 순)."""
|
||||
scored = [(i, s) for i in board.items if i.in_season for s in i.trend if s.score_date == day]
|
||||
return sorted(scored, key=lambda x: rank_score(x[1].score, x[0].definition.priority), reverse=True)
|
||||
|
||||
|
||||
def tomorrow_events(items: list[EventItem], region_code: str, day: date) -> list[TomorrowEvent]:
|
||||
"""그날 열리는 같은 시도 행사 3개 (종류를 섞어서)."""
|
||||
on = [e for e in items if e.event.sido_code in event_sidos(region_code) and e.event.start_date <= day <= e.event.end_date]
|
||||
return [TomorrowEvent(event_id=e.event.event_id, name=e.event.name, place=e.event.place_name, icon=e.event.icon,
|
||||
start_date=e.event.start_date, end_date=e.event.end_date) for e in mix_kinds(on)[:3]]
|
||||
|
||||
|
||||
def _hero_tomorrow(day: date, board: IndexBoard) -> HeroTomorrow:
|
||||
best = _tomorrow_best(board, day)
|
||||
top1 = None
|
||||
if best is not None:
|
||||
d, s = best[0].definition, best[1]
|
||||
top1 = TopIndex(index_id=d.index_id, code=d.code, name=d.name, icon=d.icon, score=s.score, rank=1, summary=s.summary)
|
||||
ranked = [TopIndex(index_id=i.definition.index_id, code=i.definition.code, name=i.definition.name, icon=i.definition.icon, score=s.score,
|
||||
rank=n, summary=s.summary) for n, (i, s) in enumerate(_tomorrow_ranked(board, day)[:5], 1)]
|
||||
return HeroTomorrow(
|
||||
day=day, weather_slots=board.tomorrow_slots, top1=top1,
|
||||
day=day, weather_slots=board.tomorrow_slots, top1=ranked[0] if ranked else None, ranked=ranked,
|
||||
weather_why={k: [WeatherWhy(label=w.label, weight=w.weight, score=w.score, note=w.note) for w in ws] for k, ws in board.tomorrow_why.items()},
|
||||
)
|
||||
|
||||
@@ -436,9 +436,12 @@ class FeedService:
|
||||
has_warning = bool(now_w and now_w.warnings)
|
||||
# 오늘 이야기 줄엔 제철인 각만 (철 지난 각은 각 탭 목록 끝에만)
|
||||
items = [i for i in board.items if i.in_season] if board else []
|
||||
hero = self._hero(now, slot, hourly[0] if hourly else None, now_w, board, today, await self._uv(region.code, hour), _moon_view(region, now, hourly or []))
|
||||
if hero.tomorrow is not None:
|
||||
hero.tomorrow.events = tomorrow_events(events, region.code, hero.tomorrow.day)
|
||||
feed = Res_Feed(
|
||||
region_code=region.code, region_name=region.name, slot=slot,
|
||||
hero=self._hero(now, slot, hourly[0] if hourly else None, now_w, board, today, await self._uv(region.code, hour), _moon_view(region, now, hourly or [])),
|
||||
hero=hero,
|
||||
stories=[_top(i) for i in items], posts=arrange(cards, slot, now, sunset_at, has_warning, f"{day}:{region.code}"), **pinned,
|
||||
bands=Bands(
|
||||
events=[BandEvent(event_id=e.event.event_id, name=e.event.name, status_label=e.status_label, icon=e.event.icon,
|
||||
@@ -764,8 +767,9 @@ class FeedService:
|
||||
|
||||
def _tomorrow(self, base: dict, c: "_Ctx") -> PostData:
|
||||
rows = [Row(label=x.label, value=x.text) for x in c.now_w.commute]
|
||||
best = _tomorrow_best(c.board, c.now.date() + timedelta(days=1)) if c.board else None
|
||||
if best is not None:
|
||||
ranked = _tomorrow_ranked(c.board, c.now.date() + timedelta(days=1)) if c.board else []
|
||||
if ranked:
|
||||
best = ranked[0]
|
||||
rows.append(Row(label="내일 1위 각", value=f"{best[0].definition.name} {best[1].score}점"))
|
||||
caption = _temp_change(c.today, c.tomorrow) or "출근 전에 한 번 더 확인해 주세요."
|
||||
icon = c.now_w.commute[0].icon if c.now_w.commute else "sun"
|
||||
|
||||
@@ -148,6 +148,8 @@ async def test_hero_tomorrow_and_tomorrow_slots(offline):
|
||||
async with client() as c:
|
||||
hero = (await c.get("/v1/feed", params={"region": REGION})).json()["hero"]
|
||||
assert set(hero["tomorrow"]["weather_slots"]) <= {"morning", "day", "evening", "night"}
|
||||
assert len(hero["tomorrow"]["ranked"]) <= 5 and len(hero["tomorrow"]["events"]) <= 3
|
||||
assert hero["tomorrow"]["top1"] == (hero["tomorrow"]["ranked"][0] if hero["tomorrow"]["ranked"] else None)
|
||||
res = (await c.get("/v1/weather/today", params={"region": REGION, "day": "tomorrow"})).json()
|
||||
assert res["day"] == hero["tomorrow"]["day"]
|
||||
|
||||
|
||||
@@ -210,6 +210,49 @@ def test_feed_events_keeps_every_festival_and_two_of_other_kinds():
|
||||
assert out[:4] == [EventKind.FESTIVAL.value, EventKind.POPUP.value, EventKind.EXHIBITION.value, EventKind.CONCERT.value]
|
||||
|
||||
|
||||
def test_tomorrow_events_keep_same_sido_events_running_that_day():
|
||||
"""내일 페이지 행사: 내일 열리는 같은 시도 행사만, 종류를 섞어 3개까지."""
|
||||
from types import SimpleNamespace
|
||||
|
||||
from common.enums import EventKind
|
||||
from services.feed_service import tomorrow_events
|
||||
from services.week_service import EventItem
|
||||
|
||||
day = date(2026, 10, 31)
|
||||
|
||||
def ev(n, kind, sido="11", start=day, end=day):
|
||||
e = SimpleNamespace(event_id=n, name=f"행사{n}", place_name=f"장소{n}", icon="concert", kind=kind.value, sido_code=sido, start_date=start, end_date=end)
|
||||
return EventItem(event=e, status="live", status_label="진행 중", fit=None)
|
||||
|
||||
items = [
|
||||
ev(1, EventKind.CONCERT), ev(2, EventKind.CONCERT), ev(3, EventKind.FESTIVAL, start=day - timedelta(days=2)),
|
||||
ev(4, EventKind.FESTIVAL, end=day - timedelta(days=1)), ev(5, EventKind.EXHIBITION, sido="41"), ev(6, EventKind.POPUP, start=day + timedelta(days=1)),
|
||||
]
|
||||
out = tomorrow_events(items, "1144000000", day)
|
||||
assert [e.event_id for e in out] == [3, 1, 2]
|
||||
assert out[0].place == "장소3" and out[0].start_date == day - timedelta(days=2)
|
||||
|
||||
|
||||
def test_hero_tomorrow_ranks_in_season_gak_by_tomorrow_score():
|
||||
"""내일의 각: 내일 하루 점수(중요도 반영) 순 5개, 철 지난 각은 빼고, 1위는 top1 과 같다."""
|
||||
from types import SimpleNamespace
|
||||
|
||||
from services.feed_service import _hero_tomorrow
|
||||
|
||||
day = date(2026, 10, 31)
|
||||
|
||||
def item(n, score, in_season=True, priority=1.0):
|
||||
d = SimpleNamespace(index_id=n, code=f"g{n}", name=f"각{n}", icon="sun", priority=priority)
|
||||
trend = [SimpleNamespace(score_date=day - timedelta(days=1), score=100, summary="오늘"), SimpleNamespace(score_date=day, score=score, summary=f"내일{n}")]
|
||||
return SimpleNamespace(definition=d, trend=trend, in_season=in_season)
|
||||
|
||||
board = SimpleNamespace(items=[item(1, 60), item(2, 99, in_season=False), item(3, 90), item(4, 70), item(5, 80), item(6, 50), item(7, 40)],
|
||||
tomorrow_slots={}, tomorrow_why={})
|
||||
hero = _hero_tomorrow(day, board)
|
||||
assert [(g.index_id, g.rank) for g in hero.ranked] == [(3, 1), (5, 2), (4, 3), (1, 4), (6, 5)]
|
||||
assert hero.top1 == hero.ranked[0] and hero.ranked[0].summary == "내일3"
|
||||
|
||||
|
||||
def test_arrange_spreads_many_events_through_whole_feed():
|
||||
"""행사가 앞쪽 절반 자리보다 많으면 끝까지 한 장씩 걸러 끼우고, 남은 건 맨 뒤에 다 붙인다."""
|
||||
from datetime import datetime
|
||||
|
||||
@@ -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
|
||||
|
@@ -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)
|
||||
|
||||
@@ -42,9 +42,10 @@ 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` |
|
||||
| `tomorrow_to_today` | 내일 날씨 페이지(`/tomorrow/...`) 맨 아래 '오늘 ○○ 소식 보기'를 누름 | `region_name` | `TomorrowFeed.tsx` |
|
||||
| `shorts_open` | 쇼츠 페이지(/shorts/영상ID)로 들어옴 (오늘 화면 쇼츠 줄·공유 링크) | `video_id` | `Shorts.tsx` `ShortsPage` |
|
||||
| `shorts_view` | 쇼츠를 넘겨 다른 영상으로 감 | `video_id`, `index`(목록 순서) | `Shorts.tsx` `ShortsPage` |
|
||||
| `shorts_sound` | 쇼츠 소리 켜기·끄기 | `on` | `Shorts.tsx` `toggleSound` |
|
||||
@@ -58,7 +59,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` |
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 42 KiB |
@@ -9,6 +9,7 @@ import { AuthProvider } from './auth'
|
||||
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 +107,8 @@ const SHOOTS = [
|
||||
{ top: '14%', left: '96%', '--len': '120px', '--dur': '12s', '--dl': '9s' },
|
||||
]
|
||||
|
||||
const HOLIDAY = currentHoliday()
|
||||
|
||||
/** 화면 전체 하늘: 시간대별 색, 아주 느리게 일렁이는 색 덩어리, 밤에는 별 */
|
||||
function SkyBg() {
|
||||
const { kind } = useSky()
|
||||
@@ -116,10 +119,11 @@ function SkyBg() {
|
||||
return () => document.removeEventListener('visibilitychange', onVis)
|
||||
}, [])
|
||||
return (
|
||||
<div className={cx('b-skybg pointer-events-none fixed inset-0 overflow-hidden', hidden && 'b-paused')} data-t={kind} aria-hidden="true">
|
||||
<div className={cx('b-skybg pointer-events-none fixed inset-0 overflow-hidden', hidden && 'b-paused')} data-t={kind} data-h={HOLIDAY?.key} aria-hidden="true">
|
||||
{(['morning', 'day', 'sunset', 'night'] as const).map((k) => (
|
||||
<div key={k} className={cx('b-sky-lay absolute inset-0', `b-sky-${k}`)} />
|
||||
))}
|
||||
{HOLIDAY && <div className="b-sky-lay b-sky-holiday absolute inset-0" />}
|
||||
<span className="b-blob b-blob-1" />
|
||||
<span className="b-blob b-blob-2" />
|
||||
<span className="b-blob b-blob-3" />
|
||||
@@ -264,6 +268,11 @@ 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" />
|
||||
{HOLIDAY && (
|
||||
<div className="b-holiday-head pointer-events-none fixed inset-x-0 top-0 z-[19] h-[calc(54px+env(safe-area-inset-top,0px))] overflow-hidden" data-h={HOLIDAY.key} data-t={kind} aria-hidden="true">
|
||||
<i />
|
||||
</div>
|
||||
)}
|
||||
<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 />
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -126,7 +126,7 @@ function MoonPic({ pct, waxing }: { pct: number; waxing: boolean }) {
|
||||
)
|
||||
}
|
||||
|
||||
function SlideView({ slide, bg, img }: { slide: Slide; bg: SlideBg; img?: CSSProperties }) {
|
||||
export function SlideView({ slide, bg, img }: { slide: Slide; bg: SlideBg; img?: CSSProperties }) {
|
||||
const { open } = useSheet()
|
||||
if (slide.kind === 'hours') {
|
||||
const temps = slide.hours.flatMap((h) => (h.temp_c == null ? [] : [h.temp_c]))
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -27,6 +27,7 @@ import { usePinnedLike } from './pinnedLike'
|
||||
import { ShortsRail } from './Shorts'
|
||||
import { FeedComposer, TalkPost } from './talk'
|
||||
import { useTopicTalks } from './talkState'
|
||||
import { TomorrowFeed } from './TomorrowFeed'
|
||||
import { useLandingAbout, useRegion } from './regionContext'
|
||||
import { useSheet } from './sheetContext'
|
||||
import { useSky } from './skyContext'
|
||||
@@ -579,6 +580,8 @@ function Seen({ item, position, children }: { item: 'talk' | 'event'; position:
|
||||
export function TodayPage() {
|
||||
const { region } = useRegion()
|
||||
const about = useLandingAbout()
|
||||
// 내일 날씨 페이지는 히어로 아래를 내일 것으로 (오늘 페이지와 본문이 거의 같아 구글이 둘 중 하나만 색인하던 것)
|
||||
const ahead = useLocation().pathname.startsWith('/tomorrow/')
|
||||
const feed = useQuery(getFeedOptions({ query: { region: region.code } }))
|
||||
const today = useQuery(getWeatherTodayOptions({ query: { region: region.code } }))
|
||||
const { preview } = useSky()
|
||||
@@ -615,61 +618,67 @@ export function TodayPage() {
|
||||
|
||||
return (
|
||||
// 피드 칸은 전국 공통이라 지역이 바뀌어도 글 번호가 같다. 지역마다 새로 그려 넘긴 슬라이드·펼친 상태가 남지 않게 한다
|
||||
<section key={region.code} aria-label="오늘" aria-busy={load === 'loading'} className={cx('transition-opacity', feed.isPlaceholderData && 'opacity-60')}>
|
||||
<section key={region.code} aria-label={ahead ? '내일' : '오늘'} aria-busy={load === 'loading'} className={cx('transition-opacity', feed.isPlaceholderData && 'opacity-60')}>
|
||||
<Hero hero={f?.hero} post={f?.hero_post} today={today.data} ranked={stories} all={f?.stories ?? []} feedLoad={load} todayLoad={loadOf(today)} />
|
||||
<TodayIcons />
|
||||
<ShortsRail />
|
||||
<FeedComposer />
|
||||
<div id={MY_GAK_ID} className="scroll-mt-16">
|
||||
<MyGakRow />
|
||||
</div>
|
||||
{/* 실패 안내는 여기 한 번만, 각 카드 스켈레톤과 같은 크기로 */}
|
||||
{stories.some((g) => g.active) ? (
|
||||
<GakCard items={stories} post={f?.gak_post} place={region.name.split(' ').at(-1)!} at={sloted ? `${PREVIEW[preview].label} 기준` : nowAt ? `${kst(nowAt).h}시 기준` : '오늘 기준'} />
|
||||
) : load === 'loading' ? (
|
||||
<PostCardSkel />
|
||||
{ahead ? (
|
||||
<TomorrowFeed tomorrow={f?.hero?.tomorrow} load={load} />
|
||||
) : (
|
||||
<StateBox load={load} onRetry={() => feed.refetch()} empty="오늘 계산된 각이 없어요." hold={<PostCardSkel />} className="inset-x-3 top-3 bottom-1" />
|
||||
)}
|
||||
<InstallBanner />
|
||||
<div>
|
||||
{load === 'loading' && <PostsSkel />}
|
||||
{/* 글이 없거나 못 받아도 스켈레톤 두 장 자리는 그대로 둔다 */}
|
||||
{load !== 'loading' && !posts.length && (
|
||||
<StateBox load="ready" empty={load === 'ready' ? '오늘 올라온 글이 아직 없어요.' : '글을 불러오지 못했어요.'} hold={<PostsSkel />} className="inset-x-3 top-3.5 bottom-auto" />
|
||||
)}
|
||||
{/* 단풍철엔 단풍 지도를 포스트 맨 앞에 */}
|
||||
{load !== 'loading' && posts.length > 0 && <FoliageCard post={f?.foliage_post} />}
|
||||
{posts.map((p, i) => {
|
||||
const t = talkAt(i)
|
||||
const ev = eventNo.get(p.post_id)
|
||||
return (
|
||||
<Fragment key={p.post_id}>
|
||||
{ev ? (
|
||||
<Seen item="event" position={ev}>
|
||||
<PostCard post={p} />
|
||||
</Seen>
|
||||
) : (
|
||||
<PostCard post={p} />
|
||||
)}
|
||||
{bandAt.find(([at]) => at === i + 1)?.[1]}
|
||||
{t && (
|
||||
<Seen item="talk" position={(i + 1) / TALK_EVERY}>
|
||||
<>
|
||||
<ShortsRail />
|
||||
<FeedComposer />
|
||||
<div id={MY_GAK_ID} className="scroll-mt-16">
|
||||
<MyGakRow />
|
||||
</div>
|
||||
{/* 실패 안내는 여기 한 번만, 각 카드 스켈레톤과 같은 크기로 */}
|
||||
{stories.some((g) => g.active) ? (
|
||||
<GakCard items={stories} post={f?.gak_post} place={region.name.split(' ').at(-1)!} at={sloted ? `${PREVIEW[preview].label} 기준` : nowAt ? `${kst(nowAt).h}시 기준` : '오늘 기준'} />
|
||||
) : load === 'loading' ? (
|
||||
<PostCardSkel />
|
||||
) : (
|
||||
<StateBox load={load} onRetry={() => feed.refetch()} empty="오늘 계산된 각이 없어요." hold={<PostCardSkel />} className="inset-x-3 top-3 bottom-1" />
|
||||
)}
|
||||
<InstallBanner />
|
||||
<div>
|
||||
{load === 'loading' && <PostsSkel />}
|
||||
{/* 글이 없거나 못 받아도 스켈레톤 두 장 자리는 그대로 둔다 */}
|
||||
{load !== 'loading' && !posts.length && (
|
||||
<StateBox load="ready" empty={load === 'ready' ? '오늘 올라온 글이 아직 없어요.' : '글을 불러오지 못했어요.'} hold={<PostsSkel />} className="inset-x-3 top-3.5 bottom-auto" />
|
||||
)}
|
||||
{/* 단풍철엔 단풍 지도를 포스트 맨 앞에 */}
|
||||
{load !== 'loading' && posts.length > 0 && <FoliageCard post={f?.foliage_post} />}
|
||||
{posts.map((p, i) => {
|
||||
const t = talkAt(i)
|
||||
const ev = eventNo.get(p.post_id)
|
||||
return (
|
||||
<Fragment key={p.post_id}>
|
||||
{ev ? (
|
||||
<Seen item="event" position={ev}>
|
||||
<PostCard post={p} />
|
||||
</Seen>
|
||||
) : (
|
||||
<PostCard post={p} />
|
||||
)}
|
||||
{bandAt.find(([at]) => at === i + 1)?.[1]}
|
||||
{t && (
|
||||
<Seen item="talk" position={(i + 1) / TALK_EVERY}>
|
||||
<TalkPost t={t} />
|
||||
</Seen>
|
||||
)}
|
||||
</Fragment>
|
||||
)
|
||||
})}
|
||||
{/* 포스트가 모자라 끼울 자리가 없던 사람 글은 맨 뒤에 */}
|
||||
{feed.isSuccess &&
|
||||
talks.slice(talkFrom).map((t, n) => (
|
||||
<Seen key={t.talk_id} item="talk" position={talkFrom + n + 1}>
|
||||
<TalkPost t={t} />
|
||||
</Seen>
|
||||
)}
|
||||
</Fragment>
|
||||
)
|
||||
})}
|
||||
{/* 포스트가 모자라 끼울 자리가 없던 사람 글은 맨 뒤에 */}
|
||||
{feed.isSuccess &&
|
||||
talks.slice(talkFrom).map((t, n) => (
|
||||
<Seen key={t.talk_id} item="talk" position={talkFrom + n + 1}>
|
||||
<TalkPost t={t} />
|
||||
</Seen>
|
||||
))}
|
||||
{feed.isSuccess && bandAt.filter(([at]) => at > posts.length).map(([at, node]) => <Fragment key={at}>{node}</Fragment>)}
|
||||
</div>
|
||||
))}
|
||||
{feed.isSuccess && bandAt.filter(([at]) => at > posts.length).map(([at, node]) => <Fragment key={at}>{node}</Fragment>)}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{about && (
|
||||
<div
|
||||
data-nosnippet
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import { Link, useLocation } from 'react-router'
|
||||
import { getWeatherTodayOptions } from '@nalssigak/shared/api/client/@tanstack/react-query.gen'
|
||||
import type { HeroTomorrow, HoursSlide, TomorrowEvent } from '@nalssigak/shared/api/client'
|
||||
import { type Load, MEDALS } from '@nalssigak/shared/lib'
|
||||
import { track } from '../lib/analytics'
|
||||
import { PostCardSkel, PostFrame, SlideView } from './Post'
|
||||
import { useRegion } from './regionContext'
|
||||
import { Ic } from './ui'
|
||||
|
||||
const md = (d: string) => `${Number(d.slice(5, 7))}/${Number(d.slice(8, 10))}`
|
||||
const days = (e: TomorrowEvent) => (e.start_date === e.end_date ? md(e.start_date) : `${md(e.start_date)}~${md(e.end_date)}`)
|
||||
|
||||
/** 내일 날씨 페이지(/tomorrow/...)의 히어로 아래. 오늘 피드 대신 내일 것만 둬서 오늘 페이지와 본문이 겹치지 않게 한다 */
|
||||
export function TomorrowFeed({ tomorrow, load }: { tomorrow?: HeroTomorrow | null; load: Load }) {
|
||||
const { region } = useRegion()
|
||||
const { pathname } = useLocation()
|
||||
const [sido] = region.name.split(' ')
|
||||
const place = region.name.split(' ').at(-1)!
|
||||
const w = useQuery(getWeatherTodayOptions({ query: { region: region.code, day: 'tomorrow' } })).data
|
||||
const hours: HoursSlide | null =
|
||||
w?.slots?.length && w.headline
|
||||
? { kind: 'hours', eyebrow: '내일 하루 · 3시간마다', line: w.headline, hours: w.slots.map((s) => ({ label: s.label, icon: s.icon, temp_c: s.temp_c, tone: s.tone })) }
|
||||
: null
|
||||
const ranked = tomorrow?.ranked ?? []
|
||||
const events = tomorrow?.events ?? []
|
||||
|
||||
return (
|
||||
<div>
|
||||
{ranked.length > 0 ? (
|
||||
<PostFrame title={`내일의 각 · ${place}`} account="내일의 각" avatar="rabbit">
|
||||
<div className="b-band-2 px-4 pt-3.5 pb-3">
|
||||
<p className="m-0 font-jua text-[19px]">내일의 각 · {place} 하루 기준</p>
|
||||
<ol className="m-0 mt-2 grid list-none gap-1.5 p-0">
|
||||
{ranked.map((g, i) => (
|
||||
<li key={g.index_id} className="flex items-center gap-2.5 rounded-[18px] bg-white px-3 py-2 shadow-[inset_0_-4px_0_var(--shade)]">
|
||||
{i < 3 ? <Ic name={MEDALS[i]} alt={`${i + 1}위`} className="w-[24px] shrink-0" /> : <span className="w-[24px] shrink-0 text-center font-jua text-(--ink3)">{i + 1}</span>}
|
||||
<Ic name={g.icon} className="w-[34px] shrink-0" />
|
||||
<span className="min-w-0 flex-1">
|
||||
<b className="block font-jua text-[16px] leading-tight font-normal">{g.name}</b>
|
||||
{g.summary && <small className="block truncate text-xs font-semibold text-(--ink2)">{g.summary}</small>}
|
||||
</span>
|
||||
<em className="font-bagel text-[22px] leading-none text-(--orange) not-italic">{g.score}</em>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
</div>
|
||||
</PostFrame>
|
||||
) : (
|
||||
load === 'loading' && <PostCardSkel />
|
||||
)}
|
||||
{hours && (
|
||||
<PostFrame title="내일 날씨" account="내일 날씨" avatar="sun">
|
||||
<div className="relative flex aspect-[4/5] overflow-hidden">
|
||||
<SlideView slide={hours} bg="sky" />
|
||||
</div>
|
||||
</PostFrame>
|
||||
)}
|
||||
{events.length > 0 && (
|
||||
<PostFrame title={`내일 열리는 행사 · ${sido}`} account="주말·행사" avatar="concert" more={<Link to="/week">행사 더 보기 ›</Link>}>
|
||||
<div className="b-band-3 px-4 pt-3.5 pb-3">
|
||||
<p className="m-0 font-jua text-[19px]">내일 열리는 행사 · {sido}</p>
|
||||
<ul className="m-0 mt-2 grid list-none gap-1.5 p-0">
|
||||
{events.map((e) => (
|
||||
<li key={e.event_id} className="flex items-center gap-2.5 rounded-[18px] bg-white px-3 py-2 shadow-[inset_0_-4px_0_var(--shade)]">
|
||||
<Ic name={e.icon} className="w-[32px] shrink-0" />
|
||||
<span className="min-w-0 flex-1">
|
||||
<b className="block font-jua text-[16px] leading-tight font-normal">{e.name}</b>
|
||||
<small className="block truncate text-xs font-semibold text-(--ink2)">
|
||||
{e.place} · {days(e)}
|
||||
</small>
|
||||
</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</PostFrame>
|
||||
)}
|
||||
<Link
|
||||
to={pathname.replace(/^\/tomorrow\//, '/today/')}
|
||||
onClick={() => track('tomorrow_to_today', { region_name: region.name })}
|
||||
className="mx-3 mt-4 mb-2 block rounded-full bg-white py-3 text-center font-jua text-[16px] shadow-[inset_0_-4px_0_var(--shade)]"
|
||||
>
|
||||
오늘 {place} 소식 보기 ›
|
||||
</Link>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -456,6 +456,33 @@
|
||||
.b-skybg[data-t='night'] .b-sky-night {
|
||||
opacity: 1;
|
||||
}
|
||||
/* 기념일 소품 (holiday.ts): 하늘은 그대로 두고 투명 배경 소품 그림을 화면 네 귀퉁이에 (public/b/holiday/<key>-tl·tr·bl·br.webp).
|
||||
폰은 반씩 나눠 폭을 채우고, 넓은 화면은 300px 로 귀퉁이에 붙어 잘리지 않는다. 헤더 칸은 .b-holiday-head 가 흐림 막 위에 한 번 더 그린다 */
|
||||
.b-sky-holiday,
|
||||
.b-holiday-head > i {
|
||||
--hw: min(50%, 300px);
|
||||
background:
|
||||
var(--h-tl) left top / var(--hw) auto no-repeat,
|
||||
var(--h-tr) right top / var(--hw) auto no-repeat,
|
||||
var(--h-bl) left bottom / var(--hw) auto no-repeat,
|
||||
var(--h-br) right bottom / var(--hw) auto no-repeat;
|
||||
}
|
||||
.b-skybg[data-h] .b-sky-holiday {
|
||||
opacity: 1;
|
||||
}
|
||||
.b-holiday-head > i {
|
||||
position: absolute;
|
||||
inset: 0 0 auto;
|
||||
height: 100dvh;
|
||||
}
|
||||
[data-t='night'] .b-sky-holiday,
|
||||
.b-holiday-head[data-t='night'] > i {
|
||||
filter: brightness(0.8);
|
||||
}
|
||||
[data-h='halloween'] { --h-tl: url('/b/holiday/halloween-tl.webp'); --h-tr: url('/b/holiday/halloween-tr.webp'); --h-bl: url('/b/holiday/halloween-bl.webp'); --h-br: url('/b/holiday/halloween-br.webp'); }
|
||||
[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'); }
|
||||
.b-skybg[data-t='morning'] {
|
||||
--b1: #ffc39b;
|
||||
--b2: #bfe5ff;
|
||||
|
||||
@@ -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 넘게 있으면 끝 */
|
||||
|
||||
@@ -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) + 소품 그림(public/b/holiday, 투명 배경, b.css)
|
||||
*/
|
||||
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-30', '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: 'pepero_choco', name: '초코' },
|
||||
{ icon: 'pepero_almond', name: '아몬드' },
|
||||
{ icon: 'pepero_strawberry', name: '딸기' },
|
||||
{ icon: 'pepero_nude', name: '누드' },
|
||||
{ icon: 'pepero_pair', name: '한 쌍' },
|
||||
{ icon: 'pepero_bundle', name: '다발' },
|
||||
{ icon: 'pepero_box', name: '한 상자' },
|
||||
{ icon: 'pepero_basket', name: '바구니' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'christmas',
|
||||
name: '크리스마스',
|
||||
ranges: [['12-24', '12-25']],
|
||||
topic: TalkTopic.CHRISTMAS,
|
||||
bg: 'mint',
|
||||
game: [
|
||||
{ icon: 'xmas_candy_cane', name: '캔디케인' },
|
||||
{ icon: 'xmas_ornament', name: '장식볼' },
|
||||
{ icon: 'xmas_gingerbread', name: '진저쿠키' },
|
||||
{ icon: 'xmas_santa_hat', name: '산타 모자' },
|
||||
{ icon: 'xmas_stocking', name: '양말' },
|
||||
{ icon: 'xmas_wreath', name: '리스' },
|
||||
{ icon: 'xmas_santa', 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)
|
||||
@@ -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', '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'])
|
||||
|
||||
/** 아이콘 이름 → 파일 경로 (공용 public/icons, B 전용 public/b/icons). 'none'(데이터 없는 칸)은 그림 없음 */
|
||||
export function iconSrc(name: string) {
|
||||
|
||||
@@ -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" />
|
||||
) : (
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 */
|
||||
@@ -26,6 +27,7 @@ type Events = {
|
||||
talk_post: { topic: number; with_image: boolean }
|
||||
feed_item_view: { item_type: 'talk' | 'event'; position: number }
|
||||
hero_day_switch: { day: 'today' | 'tomorrow' }
|
||||
tomorrow_to_today: { region_name: string }
|
||||
shorts_open: { video_id: string }
|
||||
shorts_view: { video_id: string; index: number }
|
||||
shorts_sound: { on: boolean }
|
||||
@@ -37,7 +39,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>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// This file is auto-generated by @hey-api/openapi-ts
|
||||
|
||||
export { addComment, addMyGak, addTalk, addTalkComment, agreeTerms, attend, authConfig, blockAuthor, blockTalkAuthor, createCard, createReel, deleteBirth, deleteComment, deleteMyGak, deleteTalk, drawFortune, gameRound, gameStart, getArticle, getBirth, getCardImage, getFeed, getFortuneToday, getImage, getIndex, getPost, getReelCover, getReelVideo, getSeasonWeek, getSky, getSkyRanking, getTalkImage, getTodayGuPage, getTodayPage, getTomorrowGuPage, getTomorrowPage, getWatchSummary, getWeatherNow, getWeatherToday, getWeek, getWeekRanking, googleLogin, healthzHealthzGet, importFortune, likeComment, likePost, likeTalk, listArticles, listBlocked, listCards, listComments, listEvents, listIndices, listMyGak, listMyTalks, listPlaces, listPresets, listReels, listRegions, listSaved, listShorts, listTalkComments, listTalks, listUsers, login, logout, match, me, myLevel, nearestRegion, type Options, publishCard, publishInstagram, publishInstagram2, putBirth, reading, refresh, rejectCard, reportComment, reportTalk, saveDayLog, savePost, scoreMyGak, searchFortunePlaces, shared, signup, talkGroups, toss, tossUnlink, unblock, unlikeComment, unlikePost, unlikeTalk, unsavePost, updateMe, uploadTalkImage, withdraw } from './sdk.gen';
|
||||
export { type AddCommentData, type AddCommentError, type AddCommentErrors, type AddCommentResponse, type AddCommentResponses, type AddMyGakData, type AddMyGakError, type AddMyGakErrors, type AddMyGakResponse, type AddMyGakResponses, type AddTalkCommentData, type AddTalkCommentError, type AddTalkCommentErrors, type AddTalkCommentResponse, type AddTalkCommentResponses, type AddTalkData, type AddTalkError, type AddTalkErrors, type AddTalkResponse, type AddTalkResponses, type AdminUser, type AgreeTermsData, type AgreeTermsError, type AgreeTermsErrors, type AgreeTermsResponse, type AgreeTermsResponses, type AirData, AirGrade, ArticleCategory, type ArticleSummary, type AttendData, type AttendError, type AttendErrors, type AttendResponse, type AttendResponses, type AuthConfigData, type AuthConfigResponse, type AuthConfigResponses, AuthProvider, type BandArticle, type BandEvent, type Bands, type BestTime, type BlockAuthorData, type BlockAuthorError, type BlockAuthorErrors, type BlockAuthorResponse, type BlockAuthorResponses, type BlockedUser, type BlockTalkAuthorData, type BlockTalkAuthorError, type BlockTalkAuthorErrors, type BlockTalkAuthorResponse, type BlockTalkAuthorResponses, type BodyUploadTalkImageV1TalkImagePost, type CardItem, CardStatus, type ClientOptions, type CommentData, type CommuteData, Confidence, type CreateCardData, type CreateCardError, type CreateCardErrors, type CreateCardResponse, type CreateCardResponses, type CreateReelData, type CreateReelError, type CreateReelErrors, type CreateReelResponse, type CreateReelResponses, type Cut, type DayData, type DayLogData, type DeleteBirthData, type DeleteBirthError, type DeleteBirthErrors, type DeleteBirthResponse, type DeleteBirthResponses, type DeleteCommentData, type DeleteCommentError, type DeleteCommentErrors, type DeleteCommentResponse, type DeleteCommentResponses, type DeleteMyGakData, type DeleteMyGakError, type DeleteMyGakErrors, type DeleteMyGakResponse, type DeleteMyGakResponses, type DeleteTalkData, type DeleteTalkError, type DeleteTalkErrors, type DeleteTalkResponse, type DeleteTalkResponses, type DrawFortuneData, type DrawFortuneError, type DrawFortuneErrors, type DrawFortuneResponse, type DrawFortuneResponses, type ErrorInfo, type EventData, type Factor, type FortuneCard, type FortuneLuck, type FortunePlace, type GakSlide, type GameRoundData, type GameRoundError, type GameRoundErrors, type GameRoundResponse, type GameRoundResponses, type GameStartData, type GameStartError, type GameStartErrors, type GameStartResponse, type GameStartResponses, type GetArticleData, type GetArticleError, type GetArticleErrors, type GetArticleResponse, type GetArticleResponses, type GetBirthData, type GetBirthError, type GetBirthErrors, type GetBirthResponse, type GetBirthResponses, type GetCardImageData, type GetCardImageError, type GetCardImageErrors, type GetCardImageResponses, type GetFeedData, type GetFeedError, type GetFeedErrors, type GetFeedResponse, type GetFeedResponses, type GetFortuneTodayData, type GetFortuneTodayError, type GetFortuneTodayErrors, type GetFortuneTodayResponse, type GetFortuneTodayResponses, type GetImageData, type GetImageError, type GetImageErrors, type GetImageResponses, type GetIndexData, type GetIndexError, type GetIndexErrors, type GetIndexResponse, type GetIndexResponses, type GetPostData, type GetPostError, type GetPostErrors, type GetPostResponse, type GetPostResponses, type GetReelCoverData, type GetReelCoverError, type GetReelCoverErrors, type GetReelCoverResponses, type GetReelVideoData, type GetReelVideoError, type GetReelVideoErrors, type GetReelVideoResponses, type GetSeasonWeekData, type GetSeasonWeekResponse, type GetSeasonWeekResponses, type GetSkyData, type GetSkyError, type GetSkyErrors, type GetSkyRankingData, type GetSkyRankingResponse, type GetSkyRankingResponses, type GetSkyResponse, type GetSkyResponses, type GetTalkImageData, type GetTalkImageError, type GetTalkImageErrors, type GetTalkImageResponses, type GetTodayGuPageData, type GetTodayGuPageError, type GetTodayGuPageErrors, type GetTodayGuPageResponse, type GetTodayGuPageResponses, type GetTodayPageData, type GetTodayPageError, type GetTodayPageErrors, type GetTodayPageResponse, type GetTodayPageResponses, type GetTomorrowGuPageData, type GetTomorrowGuPageError, type GetTomorrowGuPageErrors, type GetTomorrowGuPageResponse, type GetTomorrowGuPageResponses, type GetTomorrowPageData, type GetTomorrowPageError, type GetTomorrowPageErrors, type GetTomorrowPageResponse, type GetTomorrowPageResponses, type GetWatchSummaryData, type GetWatchSummaryError, type GetWatchSummaryErrors, type GetWatchSummaryResponse, type GetWatchSummaryResponses, type GetWeatherNowData, type GetWeatherNowError, type GetWeatherNowErrors, type GetWeatherNowResponse, type GetWeatherNowResponses, type GetWeatherTodayData, type GetWeatherTodayError, type GetWeatherTodayErrors, type GetWeatherTodayResponse, type GetWeatherTodayResponses, type GetWeekData, type GetWeekError, type GetWeLine truncated
|
||||
export { type AddCommentData, type AddCommentError, type AddCommentErrors, type AddCommentResponse, type AddCommentResponses, type AddMyGakData, type AddMyGakError, type AddMyGakErrors, type AddMyGakResponse, type AddMyGakResponses, type AddTalkCommentData, type AddTalkCommentError, type AddTalkCommentErrors, type AddTalkCommentResponse, type AddTalkCommentResponses, type AddTalkData, type AddTalkError, type AddTalkErrors, type AddTalkResponse, type AddTalkResponses, type AdminUser, type AgreeTermsData, type AgreeTermsError, type AgreeTermsErrors, type AgreeTermsResponse, type AgreeTermsResponses, type AirData, AirGrade, ArticleCategory, type ArticleSummary, type AttendData, type AttendError, type AttendErrors, type AttendResponse, type AttendResponses, type AuthConfigData, type AuthConfigResponse, type AuthConfigResponses, AuthProvider, type BandArticle, type BandEvent, type Bands, type BestTime, type BlockAuthorData, type BlockAuthorError, type BlockAuthorErrors, type BlockAuthorResponse, type BlockAuthorResponses, type BlockedUser, type BlockTalkAuthorData, type BlockTalkAuthorError, type BlockTalkAuthorErrors, type BlockTalkAuthorResponse, type BlockTalkAuthorResponses, type BodyUploadTalkImageV1TalkImagePost, type CardItem, CardStatus, type ClientOptions, type CommentData, type CommuteData, Confidence, type CreateCardData, type CreateCardError, type CreateCardErrors, type CreateCardResponse, type CreateCardResponses, type CreateReelData, type CreateReelError, type CreateReelErrors, type CreateReelResponse, type CreateReelResponses, type Cut, type DayData, type DayLogData, type DeleteBirthData, type DeleteBirthError, type DeleteBirthErrors, type DeleteBirthResponse, type DeleteBirthResponses, type DeleteCommentData, type DeleteCommentError, type DeleteCommentErrors, type DeleteCommentResponse, type DeleteCommentResponses, type DeleteMyGakData, type DeleteMyGakError, type DeleteMyGakErrors, type DeleteMyGakResponse, type DeleteMyGakResponses, type DeleteTalkData, type DeleteTalkError, type DeleteTalkErrors, type DeleteTalkResponse, type DeleteTalkResponses, type DrawFortuneData, type DrawFortuneError, type DrawFortuneErrors, type DrawFortuneResponse, type DrawFortuneResponses, type ErrorInfo, type EventData, type Factor, type FortuneCard, type FortuneLuck, type FortunePlace, type GakSlide, type GameRoundData, type GameRoundError, type GameRoundErrors, type GameRoundResponse, type GameRoundResponses, type GameStartData, type GameStartError, type GameStartErrors, type GameStartResponse, type GameStartResponses, type GetArticleData, type GetArticleError, type GetArticleErrors, type GetArticleResponse, type GetArticleResponses, type GetBirthData, type GetBirthError, type GetBirthErrors, type GetBirthResponse, type GetBirthResponses, type GetCardImageData, type GetCardImageError, type GetCardImageErrors, type GetCardImageResponses, type GetFeedData, type GetFeedError, type GetFeedErrors, type GetFeedResponse, type GetFeedResponses, type GetFortuneTodayData, type GetFortuneTodayError, type GetFortuneTodayErrors, type GetFortuneTodayResponse, type GetFortuneTodayResponses, type GetImageData, type GetImageError, type GetImageErrors, type GetImageResponses, type GetIndexData, type GetIndexError, type GetIndexErrors, type GetIndexResponse, type GetIndexResponses, type GetPostData, type GetPostError, type GetPostErrors, type GetPostResponse, type GetPostResponses, type GetReelCoverData, type GetReelCoverError, type GetReelCoverErrors, type GetReelCoverResponses, type GetReelVideoData, type GetReelVideoError, type GetReelVideoErrors, type GetReelVideoResponses, type GetSeasonWeekData, type GetSeasonWeekResponse, type GetSeasonWeekResponses, type GetSkyData, type GetSkyError, type GetSkyErrors, type GetSkyRankingData, type GetSkyRankingResponse, type GetSkyRankingResponses, type GetSkyResponse, type GetSkyResponses, type GetTalkImageData, type GetTalkImageError, type GetTalkImageErrors, type GetTalkImageResponses, type GetTodayGuPageData, type GetTodayGuPageError, type GetTodayGuPageErrors, type GetTodayGuPageResponse, type GetTodayGuPageResponses, type GetTodayPageData, type GetTodayPageError, type GetTodayPageErrors, type GetTodayPageResponse, type GetTodayPageResponses, type GetTomorrowGuPageData, type GetTomorrowGuPageError, type GetTomorrowGuPageErrors, type GetTomorrowGuPageResponse, type GetTomorrowGuPageResponses, type GetTomorrowPageData, type GetTomorrowPageError, type GetTomorrowPageErrors, type GetTomorrowPageResponse, type GetTomorrowPageResponses, type GetWatchSummaryData, type GetWatchSummaryError, type GetWatchSummaryErrors, type GetWatchSummaryResponse, type GetWatchSummaryResponses, type GetWeatherNowData, type GetWeatherNowError, type GetWeatherNowErrors, type GetWeatherNowResponse, type GetWeatherNowResponses, type GetWeatherTodayData, type GetWeatherTodayError, type GetWeatherTodayErrors, type GetWeatherTodayResponse, type GetWeatherTodayResponses, type GetWeekData, type GetWeekError, type GetWeLine truncated
|
||||
@@ -960,7 +960,7 @@ export type HeroStat = {
|
||||
/**
|
||||
* HeroTomorrow
|
||||
*
|
||||
* 히어로 '내일' 스위치. 3시간 칸 날씨는 /v1/weather/today?day=tomorrow 로 따로 받는다.
|
||||
* 히어로 '내일' 스위치와 내일 페이지(/tomorrow/...). 3시간 칸 날씨는 /v1/weather/today?day=tomorrow 로 따로 받는다.
|
||||
*/
|
||||
export type HeroTomorrow = {
|
||||
/**
|
||||
@@ -987,6 +987,18 @@ export type HeroTomorrow = {
|
||||
* 내일 하루 점수로 1위인 각. score·summary 는 내일 값
|
||||
*/
|
||||
top1?: TopIndex | null;
|
||||
/**
|
||||
* Ranked
|
||||
*
|
||||
* 내일 하루 점수 순위 5개 (내일 페이지 '내일의 각'). top1 이 첫째
|
||||
*/
|
||||
ranked?: Array<TopIndex>;
|
||||
/**
|
||||
* Events
|
||||
*
|
||||
* 내일 열리는 같은 시도 근처 행사 최대 3개 (내일 페이지)
|
||||
*/
|
||||
events?: Array<TomorrowEvent>;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -4574,7 +4586,23 @@ export const TalkTopic = {
|
||||
/**
|
||||
* OUTFIT
|
||||
*/
|
||||
OUTFIT: 5
|
||||
OUTFIT: 5,
|
||||
/**
|
||||
* HALLOWEEN
|
||||
*/
|
||||
HALLOWEEN: 6,
|
||||
/**
|
||||
* PEPERO
|
||||
*/
|
||||
PEPERO: 7,
|
||||
/**
|
||||
* CHRISTMAS
|
||||
*/
|
||||
CHRISTMAS: 8,
|
||||
/**
|
||||
* CHUSEOK
|
||||
*/
|
||||
CHUSEOK: 9
|
||||
} as const;
|
||||
|
||||
/**
|
||||
@@ -4616,6 +4644,36 @@ export type Tomorrow = {
|
||||
commute?: Array<CommuteData>;
|
||||
};
|
||||
|
||||
/**
|
||||
* TomorrowEvent
|
||||
*/
|
||||
export type TomorrowEvent = {
|
||||
/**
|
||||
* Event Id
|
||||
*/
|
||||
event_id: number;
|
||||
/**
|
||||
* Name
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Place
|
||||
*/
|
||||
place: string;
|
||||
/**
|
||||
* Icon
|
||||
*/
|
||||
icon: string;
|
||||
/**
|
||||
* Start Date
|
||||
*/
|
||||
start_date: string;
|
||||
/**
|
||||
* End Date
|
||||
*/
|
||||
end_date: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* TopIndex
|
||||
*/
|
||||
|
||||