diff --git a/admin/image-prompts/ootd.json b/admin/image-prompts/ootd.json index ffcefdd..606e157 100644 --- a/admin/image-prompts/ootd.json +++ b/admin/image-prompts/ootd.json @@ -1,6 +1,6 @@ { - "about": "오늘의 코디 옷 그림. 기온 구간(bands) × 스타일(styles: 캐주얼·세미정장·정장·스트릿·꾸안꾸) × 사람(personas)마다 옷 목록(items)만 바꾸고 나머지 문장(style)은 그대로 써서 모든 그림이 같은 모양으로 나오게 한다. labels·outer는 카드에 나가는 한국어. 그림은 src/assets/ootd/<구간>-<사람>-<스타일>.webp 유행: styles.<스타일>.trends.<사람>(2026 가을·겨울 무신사·에이블리·29CM·W컨셉 조사, 10/23), 기온별 레이어링: bands.layering. 조사 근거·출처는 admin/AGENTS.md.", - "style": "Use case: stylized-concept. Asset type: text-free clothing flat-lay image for a Korean weather Instagram card, styled for {persona}, {style}. View straight down at a tasteful arranged collection on a perfectly flat pale sky-blue background near #e9f3ff. The complete outfit is: {items}. Style these items in the current 2026 fall-winter Korean trend seen on Musinsa, Ably, 29CM and W Concept for this person: {trend} (keep the listed items, borrow the trend's silhouette, colors and materials). Layering for today's temperature: {layering}. Every item is a separate article, fully visible, elegantly spaced, naturally laid flat, no overlap hiding them. Balanced, compact product flat-lay. Each garment is empty and flattened, with sleeves spread. Square 1:1 composition, generous clean margin around all objects, complete silhouettes, nothing cropped. No extras beyond the listed items. Absolutely no people, human bodies, faces, hands, skin, legs, mannequins, models, ghosts, stuffed garments, or human-shaped assembly. NO TEXT anywhere: no lettering, labels, logos, brand marks, watermark, numbers, graphics printed on clothes. It is just the clothes and accessories, not a card layout. Style: bright, cheerful, premium 3D clay-toy illustration. Soft rounded shapes, matte clay/rubber-like texture, gentle sculpted folds and clean seams, believable clothing shapes, visually charming but no facial features. Palette accents: orange #ff7a45, warm ivory, soft beige, navy #28304a, soft studio shadows, beautiful diffused daylight. Crisp high quality product arrangement.", + "about": "오늘의 코디 옷 그림. 기온 구간(bands) × 스타일(styles: 캐주얼·세미정장·정장·스트릿·꾸안꾸) × 사람(personas)마다 옷 목록(items)만 바꾸고 나머지 문장(style)은 그대로 써서 모든 그림이 같은 모양으로 나오게 한다. labels·outer는 카드에 나가는 한국어. 그림은 src/assets/ootd/<구간>-<사람>-<스타일>.webp 유행: styles.<스타일>.trends.<사람>(2026 가을·겨울 무신사·에이블리·29CM·W컨셉 조사, 10/23), 기온별 레이어링: bands.layering. 조사 근거·출처는 admin/AGENTS.md. 일교차 8도 이상이면 겉옷(outer)을 5번째 옷으로 그린 <구간>-<사람>-<스타일>-outer.webp 를 쓴다. outers 는 겉옷 한국어 → 영어 프롬프트.", + "style": "Use case: stylized-concept. Asset type: text-free clothing flat-lay image for a Korean weather Instagram card, styled for {persona}, {style}. View straight down at a tasteful arranged collection on a perfectly flat pale sky-blue background near #e9f3ff. The complete outfit is: {items}. Style these items in the current 2026 fall-winter Korean trend seen on Musinsa, Ably, 29CM and W Concept for this person: {trend} (keep the listed items, borrow the trend's silhouette, colors and materials). Draw ONLY the listed items: exactly {count} articles, no extra garment, no outerwear, no cardigan, coat or jacket unless it is one of the listed items. Layering for today's temperature: {layering}. Every item is a separate article, fully visible, elegantly spaced, naturally laid flat, no overlap hiding them. Balanced, compact product flat-lay. Each garment is empty and flattened, with sleeves spread. Square 1:1 composition, generous clean margin around all objects, complete silhouettes, nothing cropped. No extras beyond the listed items. Absolutely no people, human bodies, faces, hands, skin, legs, mannequins, models, ghosts, stuffed garments, or human-shaped assembly. NO TEXT anywhere: no lettering, labels, logos, brand marks, watermark, numbers, graphics printed on clothes. It is just the clothes and accessories, not a card layout. Style: bright, cheerful, premium 3D clay-toy illustration. Soft rounded shapes, matte clay/rubber-like texture, gentle sculpted folds and clean seams, believable clothing shapes, visually charming but no facial features. Palette accents: orange #ff7a45, warm ivory, soft beige, navy #28304a, soft studio shadows, beautiful diffused daylight. Crisp high quality product arrangement.", "styles": { "casual": { "label": "캐주얼", @@ -47,7 +47,7 @@ "prompt": "an effortless minimal basic look with simple neutral pieces", "trends": { "f20": "oatmeal V-neck knit, mermaid midi skirt, ballet flats, soft beige and ivory", - "f40": "long cardigan layered over knit, wide slacks, loafers, ivory and grey tones", + "f40": "fine-knit short-sleeve top, wide slacks, loafers, ivory and grey tones", "m20": "grey sweatshirt, straight chinos, short puffer, minimal white sneakers", "m40": "single-breasted trench, fine knit crewneck, grey slacks, muted earth tones" } @@ -483,7 +483,7 @@ "outer": "얇은 셔츠" }, "f40": { - "items": "(1) a BEIGE short-sleeve fine-knit TOP, (2) NAVY wide-leg SLACKS with two full legs, (3) a pair of BEIGE leather LOAFERS, (4) a small BLACK leather shoulder bag", + "items": "(1) a BEIGE thin summer-weight short-sleeve fine-knit TOP, (2) NAVY wide-leg lightweight SLACKS with two full legs, (3) a pair of BEIGE leather LOAFERS, (4) a small BLACK leather shoulder bag", "labels": [ "반팔 니트", "와이드 슬랙스", @@ -1591,5 +1591,43 @@ }, "layering": "puffer or heavy coat, scarf and beanie, fleece-lined pants, knit layering" } - ] + ], + "outers": { + "라이더 재킷": "a BLACK leather biker jacket", + "맥코트": "a BEIGE single-breasted mac coat", + "야상": "a KHAKI field jacket", + "퀼팅 자켓": "a NAVY quilted jacket", + "트렌치코트": "a BEIGE classic trench coat", + "항공점퍼": "a BLACK bomber jacket", + "롱코트": "a CHARCOAL long wool coat", + "뽀글이": "an IVORY fleece sherpa jacket", + "숏코트": "a CAMEL short wool coat", + "울 코트": "a CAMEL wool coat", + "울코트": "a CAMEL wool coat", + "플리스": "a GREY fleece zip jacket", + "니트": "a GREY crewneck knit sweater", + "롱 가디건": "a BEIGE long knit cardigan", + "바시티 재킷": "a NAVY varsity jacket with cream sleeves", + "블레이저": "a NAVY single-breasted blazer", + "아노락": "a BLACK anorak jacket", + "정장 재킷": "a CHARCOAL suit jacket", + "청자켓": "a mid-blue denim jacket", + "코치 자켓": "a BLACK coach jacket", + "다운 자켓": "a BLACK short down jacket", + "롱 다운 코트": "a BLACK long down coat", + "롱패딩": "a BLACK long padded coat", + "숏패딩": "a BLACK short puffer jacket", + "캐시미어 코트": "a CAMEL cashmere coat", + "린넨 셔츠": "a WHITE linen overshirt", + "린넨 재킷": "a BEIGE linen jacket", + "얇은 가디건": "a BEIGE thin lightweight cardigan", + "얇은 셔츠": "a LIGHT-BLUE thin long-sleeve overshirt", + "여름 정장 재킷": "a LIGHT GREY lightweight summer suit jacket", + "오버핏 셔츠": "a WHITE oversized long-sleeve shirt", + "가디건": "a GREY knit cardigan", + "바람막이": "a BLACK lightweight windbreaker", + "집업 후드": "a GREY zip-up hoodie", + "트랙 재킷": "a NAVY track jacket", + "반팔 셔츠": "a LIGHT-BLUE short-sleeve button shirt worn open" + } } \ No newline at end of file diff --git a/admin/scripts/gen-image.mjs b/admin/scripts/gen-image.mjs index d2fbaa7..f81db0a 100644 --- a/admin/scripts/gen-image.mjs +++ b/admin/scripts/gen-image.mjs @@ -30,21 +30,24 @@ const outDir = resolve(`src/assets/${kind}`) mkdirSync(outDir, { recursive: true }) const outPath = (id) => join(outDir, `${id}.webp`) -// 그림 한 장 = { id, 프롬프트 }. ootd 는 구간 × 스타일 × 사람, tarot 은 주제 꾸밈(skin)마다 +// 그림 한 장 = { id, 프롬프트 }. ootd 는 구간 × 스타일 × 사람 × (옷 4개 | 겉옷까지 5개, id 끝에 -outer), tarot 은 주제 꾸밈(skin)마다 const jobs = spec.bands ? spec.bands.flatMap((b) => Object.entries(b.outfits).flatMap(([style, byPersona]) => - Object.entries(byPersona).map(([persona, outfit]) => ({ - id: `${b.id}-${persona}-${style}`, - band: b.id, - style, - prompt: spec.style - .replace('{items}', outfit.items) - .replace('{persona}', spec.personas[persona].prompt) - .replace('{style}', spec.styles[style].prompt) - .replace('{trend}', spec.styles[style].trends?.[persona] ?? '') - .replace('{layering}', b.layering ?? ''), - })), + Object.entries(byPersona).flatMap(([persona, outfit]) => + [false, true].map((withOuter) => ({ + id: `${b.id}-${persona}-${style}${withOuter ? '-outer' : ''}`, + band: b.id, + style, + prompt: spec.style + .replace('{items}', withOuter ? `${outfit.items}, (5) ${spec.outers?.[outfit.outer] ?? outfit.outer} as the outer layer` : outfit.items) + .replace('{count}', withOuter ? 'five' : 'four') + .replace('{persona}', spec.personas[persona].prompt) + .replace('{style}', spec.styles[style].prompt) + .replace('{trend}', spec.styles[style].trends?.[persona] ?? '') + .replace('{layering}', b.layering ?? ''), + })), + ), ), ) : spec.items.map((it) => ({ diff --git a/admin/src/assets/ootd/warm-f20-minimal-outer.webp b/admin/src/assets/ootd/warm-f20-minimal-outer.webp new file mode 100644 index 0000000..c95caa4 Binary files /dev/null and b/admin/src/assets/ootd/warm-f20-minimal-outer.webp differ diff --git a/admin/src/assets/ootd/warm-f40-minimal-outer.webp b/admin/src/assets/ootd/warm-f40-minimal-outer.webp new file mode 100644 index 0000000..3db3bd0 Binary files /dev/null and b/admin/src/assets/ootd/warm-f40-minimal-outer.webp differ diff --git a/admin/src/assets/ootd/warm-f40-minimal.webp b/admin/src/assets/ootd/warm-f40-minimal.webp index 6d484de..40015d1 100644 Binary files a/admin/src/assets/ootd/warm-f40-minimal.webp and b/admin/src/assets/ootd/warm-f40-minimal.webp differ diff --git a/admin/src/assets/ootd/warm-m20-minimal-outer.webp b/admin/src/assets/ootd/warm-m20-minimal-outer.webp new file mode 100644 index 0000000..f85108d Binary files /dev/null and b/admin/src/assets/ootd/warm-m20-minimal-outer.webp differ diff --git a/admin/src/assets/ootd/warm-m40-minimal-outer.webp b/admin/src/assets/ootd/warm-m40-minimal-outer.webp new file mode 100644 index 0000000..e32a7ec Binary files /dev/null and b/admin/src/assets/ootd/warm-m40-minimal-outer.webp differ diff --git a/admin/src/cards/cards.css b/admin/src/cards/cards.css index 2537e0e..20fd52a 100644 --- a/admin/src/cards/cards.css +++ b/admin/src/cards/cards.css @@ -156,6 +156,13 @@ .ootd-labels span:nth-child(even) { justify-self: end; } +/* 겉옷(5번째) 이름표는 위 가운데 */ +.ootd-labels span:nth-child(5) { + position: absolute; + top: 0; + left: 50%; + transform: translateX(-50%); +} .ootd-labels span { padding: 8px 20px; border-radius: 99px; diff --git a/admin/src/cards/images.ts b/admin/src/cards/images.ts index 55da96d..7994388 100644 --- a/admin/src/cards/images.ts +++ b/admin/src/cards/images.ts @@ -1,7 +1,7 @@ import type { CardData } from './data' import { gakArt } from './gaks' import { hasTarotBg } from './templates' -import { ootdBand, ootdOutfits } from './ootd' +import { needsOuter, ootdOutfits } from './ootd' import type { Copy } from './templates' export type ImageNeed = { kind: string; ids: string[] } @@ -9,11 +9,9 @@ export type ImageNeed = { kind: string; ids: string[] } /** 이 카드에 필요한 그림 중 아직 없는 것 (all 이면 전부). kind 는 image-prompts/.json, 그날 필요한 것만 Codex로 만든다. 타로는 그날 뽑힌 각 카드 그림 */ export function neededImages(templateId: string, d: CardData, copy: Copy, all = false): ImageNeed[] { if (templateId === 'ootd') { - const style = copy.style || 'casual' - const band = ootdBand(d.maxC).id - const ids = ootdOutfits(d.maxC, style) + const ids = ootdOutfits(d.maxC, copy.style, undefined, needsOuter(d.maxC, d.morningC)) .filter((o) => all || !o.image) - .map((o) => `${band}-${o.persona}-${style}`) + .map((o) => o.imageId) return ids.length ? [{ kind: 'ootd', ids }] : [] } if (templateId === 'tarot') { diff --git a/admin/src/cards/ootd.ts b/admin/src/cards/ootd.ts index 874d7f8..f01f4c8 100644 --- a/admin/src/cards/ootd.ts +++ b/admin/src/cards/ootd.ts @@ -1,8 +1,9 @@ import spec from '../../image-prompts/ootd.json' /** 낮 최고기온 구간 × 스타일 × 사람별 옷. 옷 목록·카드 글자는 image-prompts/ootd.json 한 곳에서 정한다. - * 그림은 src/assets/ootd/<구간>-<사람>-<스타일>.webp 가 있으면 자동으로 붙는다 (npm run gen-image -- ootd <구간|스타일>) */ -export type Outfit = { persona: string; label: string; labels: string[]; outer: string; image?: string } + * 그림은 src/assets/ootd/<구간>-<사람>-<스타일>.webp 가 있으면 자동으로 붙는다 (npm run gen-image -- ootd <구간|스타일>). + * 일교차가 크면(OUTER_GAP_C 이상) 겉옷을 5번째 옷으로 그린 <구간>-<사람>-<스타일>-outer.webp 를 쓰고 이름표에도 겉옷을 더한다 */ +export type Outfit = { persona: string; label: string; labels: string[]; outer: string; imageId: string; image?: string } export type OotdBand = { id: string; from: number } const IMAGES = import.meta.glob('../assets/ootd/*.webp', { eager: true, import: 'default' }) @@ -18,17 +19,28 @@ export const styleLabel = (id?: string) => spec.styles[styleOf(id)].label export const OOTD_BANDS: OotdBand[] = spec.bands.map((b) => ({ id: b.id, from: b.from })) +/** 아침·낮 기온 차가 이만큼이면 겉옷까지 보여 준다 (카드 날씨 줄의 '일교차 커요'와 같은 기준) */ +export const OUTER_GAP_C = 8 +export const needsOuter = (maxC: number, morningC: number) => maxC - morningC >= OUTER_GAP_C + export function ootdBand(maxC: number) { return OOTD_BANDS.find((b) => maxC >= b.from) ?? OOTD_BANDS[OOTD_BANDS.length - 1] } -/** 그 구간·스타일의 6명 옷 */ -/** 그 구간·스타일의 6명 옷. bandId 를 주면 기온 대신 그 구간 (예시 카드용) */ -export function ootdOutfits(maxC: number, style?: string, bandId?: string): Outfit[] { +/** 그 구간·스타일의 사람별 옷. bandId 를 주면 기온 대신 그 구간 (예시 카드용). withOuter 면 겉옷 포함 그림·이름표 */ +export function ootdOutfits(maxC: number, style?: string, bandId?: string, withOuter = false): Outfit[] { const band = spec.bands.find((b) => b.id === (bandId || ootdBand(maxC).id))! const st = styleOf(style) return PERSONAS.map((p) => { const o = band.outfits[st][p] - return { persona: p, label: spec.personas[p].label, labels: o.labels, outer: o.outer, image: IMAGES[`../assets/ootd/${band.id}-${p}-${st}.webp`] } + const imageId = `${band.id}-${p}-${st}${withOuter ? '-outer' : ''}` + return { + persona: p, + label: spec.personas[p].label, + labels: withOuter ? [...o.labels, o.outer] : o.labels, + outer: o.outer, + imageId, + image: IMAGES[`../assets/ootd/${imageId}.webp`], + } }) } diff --git a/admin/src/cards/templates.tsx b/admin/src/cards/templates.tsx index 32c86c9..d1f2a4f 100644 --- a/admin/src/cards/templates.tsx +++ b/admin/src/cards/templates.tsx @@ -8,7 +8,7 @@ import stillNight from '../assets/intro/still-night.webp' import type { CardData } from './data' import { Frame, Lines } from './Frame' import { tidy } from './text' -import { DEFAULT_STYLE, ootdBand, ootdOutfits, styleLabel } from './ootd' +import { DEFAULT_STYLE, needsOuter, ootdBand, ootdOutfits, styleLabel } from './ootd' import { gakArt, gakByCode } from './gaks' // 대주제(skin)마다 한 번 만든 배경 그림 (npm run gen-image -- tarot-bg ). 없으면 민무늬 배경 @@ -51,6 +51,7 @@ const ootd: Template = { '서울(중구) 오늘 예보의 아침 6시~밤 9시 중 가장 높은 기온으로 7개 구간(28도 이상 · 23 · 17 · 12 · 9 · 5 · 그 아래) 중 하나를 고른다.', '스타일(캐주얼·세미정장·정장·스트릿·꾸안꾸)을 고르면 바로 그 옷으로 바뀐다. Claude 기획은 쓰지 않는다.', '구간 × 스타일 × 사람(20-30대·40대~ 여자·남자)마다 옷 4가지가 image-prompts/ootd.json에 정해져 있고, 같은 파일의 문장으로 Codex가 그린 그림(src/assets/ootd/<구간>-<사람>-<스타일>.webp)을 붙인다. 그림이 없으면 옷 이름만 나간다.', + '아침·낮 기온 차가 8도 이상이면 겉옷을 5번째 옷으로 그린 그림(<구간>-<사람>-<스타일>-outer.webp)을 쓰고 이름표에도 겉옷을 더한다.', '카드에 지역 이름은 넣지 않는다.', ], fields: [{ key: 'title', label: '제목 (사람·스타일 뒤에 붙음)' }], @@ -64,14 +65,14 @@ const ootd: Template = { hashtags: '#날씨각 #오늘의코디 #OOTD #데일리룩 #옷차림 #코디추천 #날씨 #오늘날씨 #서울날씨 #일상', }), warnings: (d, c) => { - const missing = ootdOutfits(d.maxC, c.style).filter((o) => !o.image) + const missing = ootdOutfits(d.maxC, c.style, undefined, needsOuter(d.maxC, d.morningC)).filter((o) => !o.image) const id = `${ootdBand(d.maxC).id}` return missing.length ? [`낮 최고 ${d.maxC}도 · ${styleLabel(c.style)}에 ${missing.map((o) => o.label).join(', ')} 옷 그림이 아직 없어요. 옷 이름만 나갑니다. (npm run gen-image -- ootd ${id} ${c.style ?? DEFAULT_STYLE})`] : [] }, slides: (d, c) => - ootdOutfits(d.maxC, c.style, c.band).map((o, i, all) => ( + ootdOutfits(d.maxC, c.style, c.band, needsOuter(d.maxC, d.morningC)).map((o, i, all) => (

{d.dateLabel} · 오늘의 코디