Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ee25551ea | ||
|
|
1ae81ac25c | ||
|
|
1ca680f006 | ||
|
|
9544674e7f | ||
|
|
3c81976998 | ||
|
|
694757b2fb |
No files matched your search
@@ -301,6 +301,9 @@
|
||||
| [x] | 10/27 주식 타로(경제 전용 카드: 분할매수각·적금각·배당각) — 킹서버 카드 21→포스트 4591, 인스타 https://www.instagram.com/p/De-qodJAXp9/ | 사용자 요청 (10/27) | `admin/topics.json` |
|
||||
| [x] | 10/27 스트릿 코디(철회: 겉옷 없는 사람 2명·남성적이라는 피드백, 포스트 4588 숨김 필요·인스타 앱에서 삭제 필요) — 킹서버 카드 16→포스트 4588, 인스타 https://www.instagram.com/p/De-hDoVge1N/. 참고 스냅 f20 https://www.musinsa.com/snap/1554718501896708736 · m20 https://www.musinsa.com/snap/1561558258020785611 · f40 https://www.musinsa.com/snap/1552178778683619999 · m40 https://www.musinsa.com/snap/1549383828670555308. 사용자 요청으로 옷은 스냅에 태그된 무신사 상품만(사진에만 보이는 f20 레드 니트집업·m40 백팩 뺌). 에이블리는 공개 API 없음. 카드 15(고치기 전)는 승인 대기로 남음. 인스타 게시 API가 'Application request limit reached'를 돌려줬지만 실제 게시는 됨 | 사용자 요청 (10/27) | `admin/scripts/outfit.mjs`, `snap.mjs` |
|
||||
| [x] | 10/27 캐주얼 코디(스트릿 대체) — 킹서버 카드 19→포스트 4589, 인스타 https://www.instagram.com/p/De-oLGagZRB/. 참고 스냅 f20 https://www.musinsa.com/snap/1555508873710779888 · m20 https://www.musinsa.com/snap/1555156725005269012 · f40 https://www.musinsa.com/snap/1555157672544679299 · m40 https://www.musinsa.com/snap/1552193811640384198. 구간을 아침 체감·낮 최고 평균으로 정해 chilly, 쌀쌀한 날 겉옷 필수·미니·뮬/슬링백 제외, 여자 코디는 고프코어 감점. 카드 15·16·17·18은 버린 판 | 사용자 요청 (10/27) | `admin/scripts/snap.mjs`, `daily-ootd.mjs` |
|
||||
| [x] | 10/27 서울 근교 단풍 TOP 10 카드뉴스(매주 목요일 시리즈 첫 회) — 킹서버 카드 22→포스트 4592, 인스타 https://www.instagram.com/p/De-1vM_gVN8/. 캡션 첫 줄에 제목이 두 번 나옴(서버가 제목을 붙이는데 캡션도 제목으로 시작), 인스타 API가 request limit을 돌려줘 ig_media_id 미기록 | 사용자 요청 (10/27) | `admin/src/cards/templates.tsx` |
|
||||
| [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] | 각 카드 그림 미리 생성 — 가을에 나올 만한 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` |
|
||||
|
||||
@@ -9,7 +9,7 @@ import { execFileSync } from 'node:child_process'
|
||||
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
|
||||
import { resolve } from 'node:path'
|
||||
|
||||
const SLIDES = { tarot: 5, ootd: 4, intro: 8 }
|
||||
const SLIDES = { tarot: 5, ootd: 4, intro: 8, foliage: 5 }
|
||||
// 기본 문구가 서비스 데이터 그대로라 Claude 기획이 꼭 필요한 템플릿 (src/cards/templates.tsx autoPlan)
|
||||
const AUTO_PLAN = ['tarot']
|
||||
// src/cards/themes.ts THEMES 의 id
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// 그날 코디: 오늘 예보 → 무신사 인기 스냅에서 사람별 코디 선정 → Claude 가 옷 목록 추출 → Codex 가 참고 사진대로 플랫레이 그림 → 카드용 copy.
|
||||
// 사용: node scripts/daily-ootd.mjs [--out out/<날짜>] (npm run card -- ootd --daily 가 부른다)
|
||||
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs'
|
||||
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'
|
||||
import { join, resolve } from 'node:path'
|
||||
import { drawWithCodex } from './codex-image.mjs'
|
||||
import { extractOutfit } from './outfit.mjs'
|
||||
@@ -63,7 +63,9 @@ export async function runDailyOotd({ outDir, style = 'minimal', log = console.lo
|
||||
const weather = await weatherToday()
|
||||
log(`오늘 ${weather.day}: 아침 ${weather.morningC}° · 낮 ${weather.maxC}° → 구간 ${weather.band} · 스타일 ${styleLabel}`)
|
||||
mkdirSync(outDir, { recursive: true })
|
||||
const picks = await pickSnaps({ band: weather.band, style, outDir: join(outDir, 'snaps'), log })
|
||||
// 사용자가 먼저 확인한 코디(snap.mjs 가 쓴 picks.json)가 있으면 다시 고르지 않고 그대로 그린다
|
||||
const picksFile = join(outDir, 'snaps', 'picks.json')
|
||||
const picks = existsSync(picksFile) ? JSON.parse(readFileSync(picksFile, 'utf8')) : await pickSnaps({ band: weather.band, style, outDir: join(outDir, 'snaps'), log })
|
||||
const dailyDir = resolve('public/daily')
|
||||
mkdirSync(dailyDir, { recursive: true })
|
||||
const outfits = []
|
||||
|
||||
|
After Width: | Height: | Size: 135 KiB |
|
After Width: | Height: | Size: 132 KiB |
|
After Width: | Height: | Size: 299 KiB |
|
After Width: | Height: | Size: 248 KiB |
|
After Width: | Height: | Size: 469 KiB |
|
After Width: | Height: | Size: 318 KiB |
|
After Width: | Height: | Size: 363 KiB |
|
After Width: | Height: | Size: 263 KiB |
|
After Width: | Height: | Size: 305 KiB |
|
After Width: | Height: | Size: 302 KiB |
@@ -0,0 +1,125 @@
|
||||
{
|
||||
"source": "한국관광공사 관광사진(공공누리 제1유형, 출처표시)",
|
||||
"spots": [
|
||||
{
|
||||
"file": "yongmunsa",
|
||||
"name": "용문사 은행나무",
|
||||
"region": "경기 양평",
|
||||
"kind": "ginkgo",
|
||||
"peak": "2026-10-29",
|
||||
"photo": {
|
||||
"title": "양평 용문사",
|
||||
"by": "한국관광공사 김지호",
|
||||
"shot": "2012.10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"file": "namiseom",
|
||||
"name": "남이섬",
|
||||
"region": "강원 춘천",
|
||||
"kind": "ginkgo",
|
||||
"peak": "2026-10-27",
|
||||
"photo": {
|
||||
"title": "남이섬",
|
||||
"by": "김효서",
|
||||
"shot": "2023.11"
|
||||
}
|
||||
},
|
||||
{
|
||||
"file": "myeongnyundang",
|
||||
"name": "성균관 명륜당",
|
||||
"region": "서울 종로",
|
||||
"kind": "ginkgo",
|
||||
"peak": "2026-10-31",
|
||||
"photo": {
|
||||
"title": "성균관",
|
||||
"by": "한국관광공사 박성근",
|
||||
"shot": "2011.10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"file": "gyeongbokgung",
|
||||
"name": "경복궁",
|
||||
"region": "서울 종로",
|
||||
"kind": "maple",
|
||||
"peak": "2026-11-02",
|
||||
"photo": {
|
||||
"title": "경복궁",
|
||||
"by": "라이브스튜디오",
|
||||
"shot": "2020.11"
|
||||
}
|
||||
},
|
||||
{
|
||||
"file": "namsan",
|
||||
"name": "남산공원",
|
||||
"region": "서울 중구",
|
||||
"kind": "maple",
|
||||
"peak": "2026-11-02",
|
||||
"photo": {
|
||||
"title": "남산성곽길",
|
||||
"by": "한국관광공사 이범수",
|
||||
"shot": "2011.11"
|
||||
}
|
||||
},
|
||||
{
|
||||
"file": "childrenpark",
|
||||
"name": "어린이대공원",
|
||||
"region": "서울 광진",
|
||||
"kind": "maple",
|
||||
"peak": "2026-11-02",
|
||||
"photo": {
|
||||
"title": "서울 어린이대공원",
|
||||
"by": "최민희",
|
||||
"shot": "2023.11"
|
||||
}
|
||||
},
|
||||
{
|
||||
"file": "changdeokgung",
|
||||
"name": "창덕궁",
|
||||
"region": "서울 종로",
|
||||
"kind": "maple",
|
||||
"peak": "2026-11-02",
|
||||
"photo": {
|
||||
"title": "창덕궁",
|
||||
"by": "최린",
|
||||
"shot": "2023.11"
|
||||
}
|
||||
},
|
||||
{
|
||||
"file": "deoksugung",
|
||||
"name": "덕수궁 돌담길",
|
||||
"region": "서울 중구",
|
||||
"kind": "ginkgo",
|
||||
"peak": "2026-11-04",
|
||||
"photo": {
|
||||
"title": "덕수궁",
|
||||
"by": "한국관광공사 이범수",
|
||||
"shot": "2019.11"
|
||||
}
|
||||
},
|
||||
{
|
||||
"file": "seoulforest",
|
||||
"name": "서울숲",
|
||||
"region": "서울 성동",
|
||||
"kind": "ginkgo",
|
||||
"peak": "2026-11-04",
|
||||
"photo": {
|
||||
"title": "서울숲",
|
||||
"by": "임태원",
|
||||
"shot": "2023.11"
|
||||
}
|
||||
},
|
||||
{
|
||||
"file": "mulhyanggi",
|
||||
"name": "물향기수목원",
|
||||
"region": "경기 오산",
|
||||
"kind": "ginkgo",
|
||||
"peak": "2026-11-06",
|
||||
"photo": {
|
||||
"title": "물향기수목원",
|
||||
"by": "박아름",
|
||||
"shot": "2025.10"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 438 KiB |
|
After Width: | Height: | Size: 430 KiB |
@@ -668,3 +668,51 @@
|
||||
.intro-cta .intro-sub { top: 470px; font-size: 48px; color: var(--rust); }
|
||||
.intro-cta .intro-note { left: 240px; right: 240px; text-align: center; }
|
||||
.intro-cta .intro-note { top: 1250px; font-size: 36px; text-align: center; }
|
||||
|
||||
/* 서울 근교 단풍 TOP 10 */
|
||||
.slide.foliage { background: #fff8eb; color: #322d32; }
|
||||
.foliage .foliage-meta { position: absolute; top: 174px; left: 80px; color: #94694e; font-size: 32px; font-weight: 700; }
|
||||
.foliage .foliage-title,
|
||||
.foliage .foliage-list-title,
|
||||
.foliage .foliage-cta-title { position: absolute; left: 80px; right: 80px; font-family: Jua, sans-serif; letter-spacing: -2px; }
|
||||
.foliage .foliage-title { top: 222px; max-width: 920px; color: #b43e29; font-size: 96px; line-height: 1.04; }
|
||||
.foliage .foliage-subtitle { position: absolute; top: 330px; left: 84px; right: 80px; color: #69584d; font-size: 38px; font-weight: 700; letter-spacing: -1px; }
|
||||
.foliage-cover-panel,
|
||||
.foliage-cta-panel { position: absolute; background: linear-gradient(140deg, #fbd0a0, #f5a96d 54%, #dd7657); border-radius: 64px; }
|
||||
.foliage-cover-panel { left: 80px; right: 80px; top: 410px; bottom: 70px; }
|
||||
.foliage .foliage-phone { position: absolute; overflow: hidden; box-sizing: content-box; width: 338px; aspect-ratio: 47 / 100; border: 15px solid #242327; border-radius: 53px; background: #fff; box-shadow: 0 28px 52px #59331c61, inset 0 0 0 2px #555; z-index: 2; }
|
||||
.foliage .foliage-phone img { display: block; width: 100%; height: 100%; object-fit: contain; }
|
||||
.foliage-cover .foliage-phone { top: 436px; left: 340px; width: 370px; transform: rotate(-4deg); }
|
||||
.foliage .foliage-leaf { position: absolute; width: 110px; height: 110px; object-fit: contain; z-index: 1; filter: drop-shadow(0 12px 10px #963c2929); }
|
||||
.foliage .foliage-leaf-a { top: 585px; left: 145px; transform: rotate(-21deg); }
|
||||
.foliage .foliage-leaf-b { top: 725px; right: 150px; transform: rotate(18deg); }
|
||||
.foliage .foliage-leaf-c { bottom: 132px; left: 165px; transform: rotate(15deg); }
|
||||
.foliage .foliage-list-title { top: 229px; font-size: 80px; line-height: 1.05; }
|
||||
.foliage .foliage-list-title em { font-style: normal; color: #c6462b; }
|
||||
.foliage .foliage-board { position: absolute; left: 80px; right: 80px; top: 350px; bottom: 160px; display: grid; gap: 22px; }
|
||||
.foliage-duo .foliage-board { grid-template-rows: repeat(2, minmax(0, 1fr)); }
|
||||
.foliage-grid .foliage-board { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
|
||||
.foliage .foliage-tile { position: relative; overflow: hidden; min-width: 0; border-radius: 38px; background: #aa7254; box-shadow: 0 12px 28px #5c382b26; }
|
||||
.foliage .foliage-tile::after { content: ''; position: absolute; inset: 20% 0 0; background: linear-gradient(transparent 18%, #1c1719c4 76%, #120f11e8); }
|
||||
.foliage .foliage-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
|
||||
.foliage .foliage-rank { position: absolute; top: 22px; left: 23px; z-index: 2; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; background: #fff9ec; color: #b43e29; font: 64px/1 Jua, sans-serif; box-shadow: 0 5px 15px #0003; }
|
||||
.foliage .foliage-tile-copy { position: absolute; left: 28px; right: 20px; bottom: 24px; z-index: 2; color: #fff; }
|
||||
.foliage .foliage-name { display: block; overflow: hidden; color: #fff; font: 72px/1.08 Jua, sans-serif; letter-spacing: -1.7px; white-space: nowrap; text-overflow: clip; }
|
||||
.foliage-grid .foliage-name { font-size: 49px; letter-spacing: -2px; }
|
||||
.foliage .foliage-facts { display: flex; align-items: center; gap: 12px; margin-top: 10px; color: #fff; font-size: 29px; font-weight: 750; white-space: nowrap; }
|
||||
.foliage-grid .foliage-facts { gap: 7px; font-size: 22px; letter-spacing: -1px; }
|
||||
.foliage .foliage-facts > span:not(:first-child)::before { content: '·'; margin-right: 12px; opacity: .8; }
|
||||
.foliage-grid .foliage-facts > span:not(:first-child)::before { margin-right: 7px; }
|
||||
.foliage .foliage-kind { display: inline-flex; align-items: center; gap: 3px; }
|
||||
.foliage .foliage-kind img { width: 30px; height: 30px; object-fit: contain; }
|
||||
.foliage-grid .foliage-kind img { width: 23px; height: 23px; }
|
||||
.foliage .foliage-line { margin-top: 6px; color: #fff8ed; font-size: 30px; font-weight: 650; white-space: nowrap; }
|
||||
.foliage .foliage-credit { position: absolute; left: 80px; right: 80px; bottom: 70px; color: #795e4d; font-size: 23px; font-weight: 600; line-height: 1.3; }
|
||||
.foliage .foliage-cta-title { top: 220px; color: #b43e29; font-size: 82px; line-height: 1.1; }
|
||||
.foliage .foliage-cta-body { position: absolute; left: 84px; right: 80px; top: 330px; color: #69584d; font-size: 36px; font-weight: 700; }
|
||||
.foliage-cta-panel { left: 80px; right: 80px; top: 410px; bottom: 105px; }
|
||||
.foliage-cta .foliage-phone { top: 440px; left: 124px; width: 330px; transform: rotate(-4deg); }
|
||||
.foliage .foliage-actions { position: absolute; top: 790px; left: 460px; right: 112px; z-index: 3; display: flex; flex-direction: column; gap: 20px; }
|
||||
.foliage .foliage-actions span { display: block; padding: 24px 18px; border-radius: 25px; background: #fffaf0; color: #a8402d; font-size: 31px; font-weight: 800; text-align: center; box-shadow: 0 8px 18px #703c252b; white-space: nowrap; }
|
||||
.foliage .foliage-actions span + span { background: #a8402d; color: #fff; }
|
||||
.foliage .foliage-source { position: absolute; left: 80px; right: 80px; bottom: 51px; color: #795e4d; font-size: 21px; font-weight: 600; }
|
||||
@@ -10,6 +10,7 @@ import { Frame, Lines } from './Frame'
|
||||
import { tidy } from './text'
|
||||
import { DEFAULT_STYLE, dailyOutfits, needsOuter, ootdBand, ootdOutfits, styleLabel } from './ootd'
|
||||
import { gakArt, gakByCode } from './gaks'
|
||||
import foliageData from '../assets/foliage/seoul-2026-10-29.json'
|
||||
|
||||
// 대주제(skin)마다 한 번 만든 배경 그림 (npm run gen-image -- tarot-bg <skin>). 없으면 민무늬 배경
|
||||
const TAROT_BG = import.meta.glob<string>('../assets/tarot-bg/*.webp', { eager: true, import: 'default' })
|
||||
@@ -39,6 +40,17 @@ export const hasTarotBg = (skin?: string) => !!tarotBg(skin)
|
||||
import { iconUrl } from './icons'
|
||||
import { toneVars } from './themes'
|
||||
|
||||
const FOLIAGE_IMAGES = import.meta.glob<string>('../assets/foliage/*.webp', { eager: true, import: 'default' })
|
||||
const foliageImage = (file: string) => FOLIAGE_IMAGES[`../assets/foliage/${file}.webp`]
|
||||
// 카드에 날짜 숫자는 쓰지 않는다: 오늘이 든 주(월~일) 안이면 '이번 주 절정', 그 뒤면 '다음 주 절정'
|
||||
const foliagePeak = (date: string) => {
|
||||
const today = new Date()
|
||||
const sunday = new Date(today.getFullYear(), today.getMonth(), today.getDate() + ((7 - today.getDay()) % 7))
|
||||
return new Date(`${date}T00:00:00`) <= sunday ? '이번 주 절정' : '다음 주 절정'
|
||||
}
|
||||
const foliageCredit = (spots: typeof foliageData.spots, firstRank: number) =>
|
||||
`사진: 한국관광공사 · ${spots.map((spot, i) => `${firstRank + i}위 ${spot.photo.by.replace(/^한국관광공사\s*/, '')}`).join(' · ')}`
|
||||
|
||||
|
||||
export type Copy = Record<string, string>
|
||||
export type Field = { key: string; label: string }
|
||||
@@ -266,6 +278,116 @@ const tarot: Template = {
|
||||
|
||||
const INTRO_GAK_CODES = ['walk', 'camping', 'fishing', 'chimaek', 'jjamppong', 'carwash', 'laundry', 'vent', 'stars', 'hiking', 'date', 'golf']
|
||||
|
||||
const foliage: Template = {
|
||||
id: 'foliage',
|
||||
name: '서울 근교 단풍 TOP 10',
|
||||
about: '2026.10.29 기준 서울 근교 단풍 명소 10곳 · 사진 순위 5장',
|
||||
how: [
|
||||
'src/assets/foliage/seoul-2026-10-29.json의 순서가 1~10위다. 이름·지역·단풍 종류·절정 날짜와 사진 촬영자도 그 파일에서 가져온다.',
|
||||
'1장은 앱 단풍 지도, 2~4장은 명소 사진 10장(1~2위는 크게, 3~10위는 4곳씩), 5장은 앱 명소 화면을 쓴다. 날씨 예보나 Claude 기획은 쓰지 않는다.',
|
||||
'절정 날짜는 산림청 2026 단풍절정 예측 기준이다. 명소 사진은 한국관광공사 관광사진 공공누리 제1유형이므로 2~4장 아래에 촬영자와 함께 출처를 적는다.',
|
||||
'모든 문구는 관리자 화면에서 직접 고칠 수 있다. 앱 안내는 토스 검색과 weather.o2o.kr을 함께 보여 준다.',
|
||||
],
|
||||
fields: [
|
||||
{ key: 'date', label: '1장 날짜 줄' },
|
||||
{ key: 'title', label: '1장 제목' },
|
||||
{ key: 'subtitle', label: '1장 부제' },
|
||||
{ key: 'heading2', label: '2장 제목' },
|
||||
{ key: 'heading3', label: '3장 제목' },
|
||||
{ key: 'heading4', label: '4장 제목' },
|
||||
...foliageData.spots.flatMap((_, i) => {
|
||||
const n = i + 1
|
||||
return [
|
||||
{ key: `name${n}`, label: `${n}위 이름` },
|
||||
{ key: `region${n}`, label: `${n}위 지역` },
|
||||
{ key: `kind${n}`, label: `${n}위 단풍/은행` },
|
||||
{ key: `peak${n}`, label: `${n}위 절정 시기` },
|
||||
]
|
||||
}),
|
||||
{ key: 'line1', label: '1위 한 줄' },
|
||||
{ key: 'line2', label: '2위 한 줄' },
|
||||
{ key: 'credit2', label: '2장 사진 출처' },
|
||||
{ key: 'credit3', label: '3장 사진 출처' },
|
||||
{ key: 'credit4', label: '4장 사진 출처' },
|
||||
{ key: 'ctaTitle', label: '5장 제목' },
|
||||
{ key: 'ctaBody', label: '5장 본문' },
|
||||
{ key: 'button1', label: '5장 버튼 1' },
|
||||
{ key: 'button2', label: '5장 버튼 2' },
|
||||
{ key: 'source', label: '5장 출처' },
|
||||
],
|
||||
defaults: () => ({
|
||||
date: '이번 주 단풍',
|
||||
title: '서울 근교 단풍 TOP 10',
|
||||
subtitle: '멀리 안 가도 돼요, 이번 주말 가볍게',
|
||||
heading2: '1~2위', heading3: '3~6위', heading4: '7~10위',
|
||||
...Object.fromEntries(foliageData.spots.flatMap((spot, i) => {
|
||||
const n = i + 1
|
||||
return [[`name${n}`, spot.name], [`region${n}`, spot.region], [`kind${n}`, spot.kind === 'ginkgo' ? '은행' : '단풍'], [`peak${n}`, foliagePeak(spot.peak)]]
|
||||
})),
|
||||
line1: '절 마당을 덮는 천연기념물 은행나무',
|
||||
line2: '노란 잎이 깔린 메타세쿼이아·은행나무길',
|
||||
credit2: foliageCredit(foliageData.spots.slice(0, 2), 1),
|
||||
credit3: foliageCredit(foliageData.spots.slice(2, 6), 3),
|
||||
credit4: foliageCredit(foliageData.spots.slice(6, 10), 7),
|
||||
ctaTitle: '우리 동네 단풍은 지금 어디쯤?',
|
||||
ctaBody: '전국 단풍 명소 68곳, 절정 날짜를 지도로 한눈에',
|
||||
button1: "토스에서 '날씨각' 검색",
|
||||
button2: 'weather.o2o.kr',
|
||||
source: '절정 날짜: 산림청 2026 단풍절정 예측 · 사진: 한국관광공사',
|
||||
}),
|
||||
post: (_d, c) => ({
|
||||
title: c.title,
|
||||
caption: `${c.title} 🍁\n멀리 안 가도 돼요. 이번 주말 가볍게 다녀올 곳, 절정 시기 보고 골라요.\n\n전국 68곳 단풍 지도는 토스에서 '날씨각' 검색, 또는 weather.o2o.kr\n\n${c.source}\n${c.credit2}\n${c.credit3}\n${c.credit4}`,
|
||||
hashtags: '#날씨각 #서울단풍 #단풍명소 #서울근교 #가을나들이 #단풍절정 #은행나무 #주말나들이',
|
||||
}),
|
||||
slides: (_d, c) => {
|
||||
const frame = (page: number, className: string, children: ReactNode) =>
|
||||
<Frame page={page} total={5} theme="sunset" className={`foliage foliage-${className}`} key={page}>{children}</Frame>
|
||||
const phone = (file: string) => <div className="foliage-phone"><img src={foliageImage(file)} alt="날씨각 앱 단풍 지도 화면" /></div>
|
||||
const tile = (i: number) => {
|
||||
const spot = foliageData.spots[i]
|
||||
const n = i + 1
|
||||
const kind = c[`kind${n}`]
|
||||
return <div className="foliage-tile" key={spot.file}>
|
||||
<img className="foliage-photo" src={foliageImage(spot.file)} alt={c[`name${n}`]} />
|
||||
<span className="foliage-rank">{n}</span>
|
||||
<div className="foliage-tile-copy">
|
||||
<strong className="foliage-name">{c[`name${n}`]}</strong>
|
||||
<div className="foliage-facts"><span>{c[`region${n}`]}</span><span className="foliage-kind"><img src={iconUrl(kind === '은행' ? 'ginkgo' : 'maple')} alt="" />{kind}</span><span>{c[`peak${n}`]}</span></div>
|
||||
{i < 2 && <p className="foliage-line">{c[`line${n}`]}</p>}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
return [
|
||||
frame(0, 'cover', <>
|
||||
<p className="foliage-meta">{c.date}</p>
|
||||
<h1 className="foliage-title">{c.title}</h1>
|
||||
<p className="foliage-subtitle">{c.subtitle}</p>
|
||||
<div className="foliage-cover-panel" />
|
||||
{phone('app-map')}
|
||||
<img className="foliage-leaf foliage-leaf-a" src={iconUrl('maple')} alt="" />
|
||||
<img className="foliage-leaf foliage-leaf-b" src={iconUrl('ginkgo')} alt="" />
|
||||
<img className="foliage-leaf foliage-leaf-c" src={iconUrl('fallen_leaf')} alt="" />
|
||||
</>),
|
||||
...[[0, 1], [2, 3, 4, 5], [6, 7, 8, 9]].map((indices, j) => frame(j + 1, j === 0 ? 'duo' : 'grid', <>
|
||||
<p className="foliage-meta">{c.date}</p>
|
||||
<h1 className="foliage-list-title">서울 근교 단풍 <em>{c[`heading${j + 2}`]}</em></h1>
|
||||
<div className="foliage-board">{indices.map(tile)}</div>
|
||||
<p className="foliage-credit">{c[`credit${j + 2}`]}</p>
|
||||
</>)),
|
||||
frame(4, 'cta', <>
|
||||
<p className="foliage-meta">{c.date}</p>
|
||||
<h1 className="foliage-cta-title">{c.ctaTitle}</h1>
|
||||
<p className="foliage-cta-body">{c.ctaBody}</p>
|
||||
<div className="foliage-cta-panel" />
|
||||
{phone('app-spot')}
|
||||
<div className="foliage-actions"><span>{c.button1}</span><span>{c.button2}</span></div>
|
||||
<p className="foliage-source">{c.source}</p>
|
||||
</>),
|
||||
]
|
||||
},
|
||||
}
|
||||
|
||||
const intro: Template = {
|
||||
id: 'intro',
|
||||
name: '날씨각 소개',
|
||||
@@ -381,6 +503,6 @@ const intro: Template = {
|
||||
},
|
||||
}
|
||||
|
||||
export const TEMPLATES: Template[] = [tarot, ootd, intro]
|
||||
export const TEMPLATES: Template[] = [tarot, ootd, intro, foliage]
|
||||
|
||||
export const templateById = (id: string) => TEMPLATES.find((t) => t.id === id)
|
||||