From b803ab4efd65d14babf218e8ff8356c57e8841cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=95=9C=EB=95=80=20=EC=9E=91=EC=97=85=EC=8B=A4?= Date: Sun, 1 Nov 2026 04:56:29 +0000 Subject: [PATCH] =?UTF-8?q?=EC=9E=91=ED=92=88=20=EB=AA=A9=EB=A1=9D=20?= =?UTF-8?q?=EB=B6=84=EB=A6=AC:=20=ED=8C=90=EB=A7=A4=20=EC=A4=91=20/=20?= =?UTF-8?q?=ED=8C=90=EB=A7=A4=20=EC=99=84=EB=A3=8C(=EC=B9=B4=ED=86=A1=20?= =?UTF-8?q?=EC=A0=9C=EC=9E=91=20=EB=AC=B8=EC=9D=98=20=EB=B2=84=ED=8A=BC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CLAUDE.md | 1 + README.md | 8 +++++ assets/css/site.css | 48 ++++++++++++++++++++++++++++ build.py | 17 ++++++++-- content/site.json | 15 +++++++-- templates/index.html | 76 ++++++++++++++++++++++++++++++++++++++++++-- 6 files changed, 157 insertions(+), 8 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 4897cba..3a2476a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -113,6 +113,7 @@ naver_url: "" # 스마트스토어 상품 주소. 비우면 ``` - **새 작품 추가 = 이 파일 1개 추가 → `python3 build.py`.** 목록과 상세가 자동 생성된다. +- `sold_out: true` 인 작품은 첫 페이지의 **판매 완료 섹션**으로 내려가고, 카드·상세에 `카톡으로 제작 문의` 버튼이 붙는다. 판매 재개는 `false` 로 되돌리는 것. - 파일명 = `slug` = **`연-월-영문제목`** (예: `2026-11-magnolia-tea-mat.md`). 앞의 연-월로 시기를 바로 구분하고 `ls`·`git log` 가 시간순으로 정렬된다. 한국어 제목은 `title` 에 쓴다(URL 은 영문 유지). - **작품 이미지는 `assets/img//` 폴더에 넣는다** — 대표는 `cover.jpg`, 추가 컷은 `detail-01.jpg` 처럼. 작품마다 폴더 하나, 다른 작품과 섞지 않는다. - 공정·브랜드 공용 이미지는 `assets/img/process/` 에 둔다. diff --git a/README.md b/README.md index d70fdbc..ddd040e 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,14 @@ bash scripts/studio.sh # http://localhost:8081 비상용: 아이맥에서만 돌리는 예전 방식도 남아 있다. `bash scripts/studio-service.sh install`(launchd) + `tailscale serve --bg 8081` → `https://imac.taild8883.ts.net/m`. 지금은 꺼 둔다. +## 작품 목록 — 판매 중 / 판매 완료 + +- 첫 페이지 작품 섹션은 둘로 나뉜다. 위는 **판매 중인 작품**(`sold_out: false`), 아래는 **지난 작품 — 제작 문의**(`sold_out: true`). +- 판매 완료 카드에는 `카톡으로 제작 문의` 버튼이 붙고, 상세 페이지에도 같은 버튼이 들어간다(품절 안내 문구 대신). +- 버튼 동작: 문의 문구(작품명·원하는 시기·크기/색상·문의 내용)를 클립보드에 복사하고 카톡을 연다. `site.json` 의 `contact.kakao` 에 카카오채널 1:1 채팅 주소(`https://pf.kakao.com/_XXXX/chat`)를 넣으면 그 대화창이 바로 열린다. 비어 있으면 `kakaotalk://` 로 앱만 열리므로, 문구를 붙여넣어 보내면 된다. +- 판매 완료 작품이 하나도 없으면 섹션은 빈 안내 문구만 보여준다(나중에 팔리면 자동으로 채워진다). +- 문구는 `site.json` 의 `sold_works_note`. + ## 상세 페이지 구성 ① 작은 제목·부제·가격 → ② 메인 사진(자르지 않고 폭 1080px) → ③ 서브 사진(한 열) → ④ 스토리 → ⑤ DETAILS(구매 버튼 + 소재·규격·세탁). diff --git a/assets/css/site.css b/assets/css/site.css index 1efff9e..98b97ac 100644 --- a/assets/css/site.css +++ b/assets/css/site.css @@ -962,6 +962,54 @@ strong { line-height: 1.6; } +/* ------------------------------------------------------------ sold out */ + +.soldout .section-head { + border-top: 1px solid var(--line); + padding-top: clamp(36px, 5vw, 64px); +} + +.soldout { + margin-top: clamp(56px, 8vw, 112px); +} + + +.work.is-sold .work-figure img { + filter: saturate(0.86); + opacity: 0.92; +} + +.inquiry-btn { + display: inline-flex; + align-items: center; + justify-content: center; + margin-top: 14px; + padding: 11px 16px; + border: 1px solid var(--ink); + background: var(--ink); + color: var(--paper); + font-family: var(--sans, "Noto Sans KR", sans-serif); + font-size: 13px; + letter-spacing: 0.02em; + cursor: pointer; +} + +.inquiry-btn:hover { + background: var(--sage); + border-color: var(--sage); +} + +.inquiry-note { + margin-top: 8px; + color: var(--muted); + font-size: 12px; + line-height: 1.6; +} + +.detail-body .inquiry-btn { + margin-top: 18px; +} + .pager { display: grid; grid-template-columns: 1fr 1fr; diff --git a/build.py b/build.py index 1b60fc1..b06abdc 100644 --- a/build.py +++ b/build.py @@ -370,6 +370,7 @@ def build_shared(site: Dict[str, Any], home: str, asset_prefix: str) -> Dict[str "credits": credits, "home": home, "asset_prefix": asset_prefix, + "kakao_url": esc(str(contact.get("kakao", "")).strip()), } @@ -390,6 +391,7 @@ def product_loop_items(products: List[Dict[str, Any]]) -> List[Dict[str, Any]]: "subtitle": esc(product.get("subtitle", "")), "price_text": format_price(product.get("price")), "sold_html": sold_html, + "inquiry_title": esc(product["title"]), } ) return items @@ -479,7 +481,13 @@ def build_index( "hero_material": esc(featured.get("material", "")), "hero_href": f"p/{featured['slug']}.html", "works_note": esc(site.get("works_note", "")), - "products": product_loop_items(products), + "products": product_loop_items([p for p in products if not p.get("sold_out")]), + "sold_products": product_loop_items([p for p in products if p.get("sold_out")]), + "sold_count": str(sum(1 for p in products if p.get("sold_out"))), + "sold_empty_html": ("" if any(p.get("sold_out") for p in products) + else '

아직 판매 완료된 작품이 없습니다. 판매되면 이 자리에 모아 두고, 같은 무늬로 다시 만들 수 있도록 문의 버튼을 붙입니다.

'), + "sold_note": esc(site.get("sold_works_note", "")), + "kakao_url": esc(str(site.get("contact", {}).get("kakao", "")).strip()), "process": process_loop_items(steps), "process_intro": esc(site.get("process_intro", "")), "kit_title": esc(kit["title"]), @@ -526,7 +534,11 @@ def build_product_page( width, height = image_size(image) if product.get("sold_out"): - buy_html = '

판매 완료 — 재제작을 원하시면 문의해 주세요

' + buy_html = ( + f'" + '

재고가 없어 주문을 받은 뒤 제작합니다. 아래 문구가 복사되니 카톡 대화창에 붙여넣어 주세요.

' + ) else: naver_url = str(product.get("naver_url", "")).strip() if naver_url: @@ -591,6 +603,7 @@ def build_product_page( "price_note_html": price_note_html, "sold_html": '

판매 완료

' if product.get("sold_out") else "", "buy_html": buy_html, + "inquiry_title": esc(product["title"]), "material": esc(material) or "—", "size": esc(product.get("size", "")) or "—", "care": esc(product.get("care", "")) or "—", diff --git a/content/site.json b/content/site.json index 09fb50d..5148e51 100644 --- a/content/site.json +++ b/content/site.json @@ -31,7 +31,16 @@ "product_sort": "newest", "footer_note": "사업자등록번호와 통신판매업 신고 번호는 추후 기재합니다.", "image_credits": [ - {"title": "Japanese flat silk embroidery on leno-weave fabric", "author": "Ineffablebookkeeper", "license": "CC BY-SA 4.0"}, - {"title": "Wrapping cloth (bojagi), Korea", "author": "Hiart", "license": "CC0"} - ] + { + "title": "Japanese flat silk embroidery on leno-weave fabric", + "author": "Ineffablebookkeeper", + "license": "CC BY-SA 4.0" + }, + { + "title": "Wrapping cloth (bojagi), Korea", + "author": "Hiart", + "license": "CC0" + } + ], + "sold_works_note": "재고가 없는 작품입니다. 같은 무늬로 다시 만들 수 있어요 — 카톡으로 문의하시면 제작 일정과 값을 함께 알려 드립니다." } diff --git a/templates/index.html b/templates/index.html index cfcec5e..28bdb8f 100644 --- a/templates/index.html +++ b/templates/index.html @@ -25,8 +25,8 @@
-

WORKS

-

작품

+

FOR SALE

+

판매 중인 작품

{{works_note}}

@@ -41,7 +41,6 @@

{{title}}

{{subtitle}}

{{price_text}}

- {{sold_html}}
@@ -50,6 +49,77 @@
+
+
+
+

SOLD OUT

+

지난 작품 — 제작 문의

+

{{sold_note}}

+
+ + {{sold_empty_html}} +
+ {{#sold_products}} + + {{/sold_products}} +
+
+
+ + +