diff --git a/admin/scripts/card.mjs b/admin/scripts/card.mjs index c4e4bfc..a875e2a 100644 --- a/admin/scripts/card.mjs +++ b/admin/scripts/card.mjs @@ -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 diff --git a/admin/src/assets/foliage/app-map.webp b/admin/src/assets/foliage/app-map.webp new file mode 100644 index 0000000..beeb671 Binary files /dev/null and b/admin/src/assets/foliage/app-map.webp differ diff --git a/admin/src/assets/foliage/app-spot.webp b/admin/src/assets/foliage/app-spot.webp new file mode 100644 index 0000000..0848f52 Binary files /dev/null and b/admin/src/assets/foliage/app-spot.webp differ diff --git a/admin/src/assets/foliage/changdeokgung.webp b/admin/src/assets/foliage/changdeokgung.webp new file mode 100644 index 0000000..e4bad77 Binary files /dev/null and b/admin/src/assets/foliage/changdeokgung.webp differ diff --git a/admin/src/assets/foliage/childrenpark.webp b/admin/src/assets/foliage/childrenpark.webp new file mode 100644 index 0000000..28acf5f Binary files /dev/null and b/admin/src/assets/foliage/childrenpark.webp differ diff --git a/admin/src/assets/foliage/deoksugung.webp b/admin/src/assets/foliage/deoksugung.webp new file mode 100644 index 0000000..b0beed2 Binary files /dev/null and b/admin/src/assets/foliage/deoksugung.webp differ diff --git a/admin/src/assets/foliage/gyeongbokgung.webp b/admin/src/assets/foliage/gyeongbokgung.webp new file mode 100644 index 0000000..351a006 Binary files /dev/null and b/admin/src/assets/foliage/gyeongbokgung.webp differ diff --git a/admin/src/assets/foliage/mulhyanggi.webp b/admin/src/assets/foliage/mulhyanggi.webp new file mode 100644 index 0000000..9f2675a Binary files /dev/null and b/admin/src/assets/foliage/mulhyanggi.webp differ diff --git a/admin/src/assets/foliage/myeongnyundang.webp b/admin/src/assets/foliage/myeongnyundang.webp new file mode 100644 index 0000000..ecc33d2 Binary files /dev/null and b/admin/src/assets/foliage/myeongnyundang.webp differ diff --git a/admin/src/assets/foliage/namiseom.webp b/admin/src/assets/foliage/namiseom.webp new file mode 100644 index 0000000..e70ca75 Binary files /dev/null and b/admin/src/assets/foliage/namiseom.webp differ diff --git a/admin/src/assets/foliage/namsan.webp b/admin/src/assets/foliage/namsan.webp new file mode 100644 index 0000000..09d6fbd Binary files /dev/null and b/admin/src/assets/foliage/namsan.webp differ diff --git a/admin/src/assets/foliage/seoul-2026-10-29.json b/admin/src/assets/foliage/seoul-2026-10-29.json new file mode 100644 index 0000000..1bc675f --- /dev/null +++ b/admin/src/assets/foliage/seoul-2026-10-29.json @@ -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" + } + } + ] +} \ No newline at end of file diff --git a/admin/src/assets/foliage/seoulforest.webp b/admin/src/assets/foliage/seoulforest.webp new file mode 100644 index 0000000..c3627ce Binary files /dev/null and b/admin/src/assets/foliage/seoulforest.webp differ diff --git a/admin/src/assets/foliage/yongmunsa.webp b/admin/src/assets/foliage/yongmunsa.webp new file mode 100644 index 0000000..33beb54 Binary files /dev/null and b/admin/src/assets/foliage/yongmunsa.webp differ diff --git a/admin/src/cards/cards.css b/admin/src/cards/cards.css index 9d950bd..e1097b1 100644 --- a/admin/src/cards/cards.css +++ b/admin/src/cards/cards.css @@ -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; } diff --git a/admin/src/cards/templates.tsx b/admin/src/cards/templates.tsx index 9919239..10d819e 100644 --- a/admin/src/cards/templates.tsx +++ b/admin/src/cards/templates.tsx @@ -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 ). 없으면 민무늬 배경 const TAROT_BG = import.meta.glob('../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('../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 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) => + {children} + const phone = (file: string) =>
날씨각 앱 단풍 지도 화면
+ const tile = (i: number) => { + const spot = foliageData.spots[i] + const n = i + 1 + const kind = c[`kind${n}`] + return
+ {c[`name${n}`]} + {n} +
+ {c[`name${n}`]} +
{c[`region${n}`]}{kind}{c[`peak${n}`]}
+ {i < 2 &&

{c[`line${n}`]}

} +
+
+ } + return [ + frame(0, 'cover', <> +

{c.date}

+

{c.title}

+

{c.subtitle}

+
+ {phone('app-map')} + + + + ), + ...[[0, 1], [2, 3, 4, 5], [6, 7, 8, 9]].map((indices, j) => frame(j + 1, j === 0 ? 'duo' : 'grid', <> +

{c.date}

+

서울 근교 단풍 {c[`heading${j + 2}`]}

+
{indices.map(tile)}
+

{c[`credit${j + 2}`]}

+ )), + frame(4, 'cta', <> +

{c.date}

+

{c.ctaTitle}

+

{c.ctaBody}

+
+ {phone('app-spot')} +
{c.button1}{c.button2}
+

{c.source}

+ ), + ] + }, +} + 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)