From 2f22e71ea46bbd8b812426bd8c322896796acf7a Mon Sep 17 00:00:00 2001
From: koreafood
Date: Sat, 31 Oct 2026 09:26:28 +0900
Subject: [PATCH] =?UTF-8?q?1=EC=B0=A8=20=EC=82=AC=EC=9D=B4=ED=8A=B8:=20?=
=?UTF-8?q?=EC=B2=AB=20=ED=8E=98=EC=9D=B4=EC=A7=80=C2=B7=EC=9E=91=ED=92=88?=
=?UTF-8?q?=203=EC=A0=90=C2=B7=EC=A0=9C=EC=9E=91=20=EA=B3=BC=EC=A0=95?=
=?UTF-8?q?=C2=B7=ED=82=A4=ED=8A=B8=20=EC=95=88=EB=82=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
assets/css/site.css | 1235 +++++++++++++++++++++++++
build.py | 679 ++++++++++++++
content/process/01-fabric.md | 7 +
content/process/02-pattern.md | 5 +
content/process/03-stitch.md | 7 +
content/process/04-finish.md | 5 +
content/products/cedar-tea-mat.md | 21 +
content/products/kit-first-stitch.md | 21 +
content/products/whitework-tea-mat.md | 21 +
content/site.json | 36 +
scripts/deploy.sh | 22 +
scripts/preview.sh | 9 +
scripts/rollback.sh | 15 +
templates/base.html | 65 ++
templates/index.html | 128 +++
templates/product.html | 47 +
16 files changed, 2323 insertions(+)
create mode 100644 assets/css/site.css
create mode 100644 build.py
create mode 100644 content/process/01-fabric.md
create mode 100644 content/process/02-pattern.md
create mode 100644 content/process/03-stitch.md
create mode 100644 content/process/04-finish.md
create mode 100644 content/products/cedar-tea-mat.md
create mode 100644 content/products/kit-first-stitch.md
create mode 100644 content/products/whitework-tea-mat.md
create mode 100644 content/site.json
create mode 100755 scripts/deploy.sh
create mode 100755 scripts/preview.sh
create mode 100755 scripts/rollback.sh
create mode 100644 templates/base.html
create mode 100644 templates/index.html
create mode 100644 templates/product.html
diff --git a/assets/css/site.css b/assets/css/site.css
new file mode 100644
index 0000000..81e1021
--- /dev/null
+++ b/assets/css/site.css
@@ -0,0 +1,1235 @@
+/* 한땀 — 사이트 스타일 전부 */
+
+:root {
+ --paper: #F6F2EA;
+ --ink: #26241F;
+ --muted: #6B6357;
+ --sage: #6C7A63;
+ --clay: #A2705A;
+ --line: #DCD3C4;
+
+ --serif: "Noto Serif KR", "AppleMyungjo", "Nanum Myeongjo", "Times New Roman", serif;
+ --sans: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, -apple-system, sans-serif;
+}
+
+*,
+*::before,
+*::after {
+ box-sizing: border-box;
+}
+
+html {
+ scroll-behavior: smooth;
+ word-break: keep-all;
+ overflow-wrap: break-word;
+ -webkit-text-size-adjust: 100%;
+}
+
+body {
+ margin: 0;
+ background: var(--paper);
+ color: var(--ink);
+ font-family: var(--sans);
+ font-size: 17px;
+ font-weight: 400;
+ line-height: 1.75;
+ -webkit-font-smoothing: antialiased;
+ text-rendering: optimizeLegibility;
+}
+
+h1,
+h2,
+h3 {
+ margin: 0;
+ font-family: var(--serif);
+ font-weight: 400;
+ letter-spacing: -0.02em;
+ line-height: 1.12;
+}
+
+p {
+ margin: 0;
+}
+
+a {
+ color: inherit;
+ text-decoration-thickness: 1px;
+ text-underline-offset: 0.18em;
+}
+
+a:hover {
+ text-decoration-color: var(--sage);
+}
+
+img {
+ display: block;
+ max-width: 100%;
+ height: auto;
+}
+
+figure {
+ margin: 0;
+}
+
+ul,
+ol {
+ margin: 0;
+ padding: 0;
+}
+
+strong {
+ font-weight: 500;
+}
+
+::selection {
+ background: var(--ink);
+ color: var(--paper);
+}
+
+:focus-visible {
+ outline: 2px solid var(--clay);
+ outline-offset: 3px;
+}
+
+.shell {
+ width: min(1180px, calc(100% - 80px));
+ margin-inline: auto;
+}
+
+.skip-link {
+ position: absolute;
+ top: -100px;
+ left: 20px;
+ z-index: 10;
+ padding: 10px 16px;
+ background: var(--ink);
+ color: var(--paper);
+ font-size: 13px;
+ text-decoration: none;
+}
+
+.skip-link:focus {
+ top: 16px;
+}
+
+.label {
+ display: flex;
+ align-items: center;
+ gap: 9px;
+ margin: 0;
+ color: var(--muted);
+ font-family: var(--sans);
+ font-size: 11px;
+ font-weight: 500;
+ letter-spacing: 0.18em;
+ line-height: 1.4;
+ text-transform: uppercase;
+}
+
+.label::before {
+ content: "";
+ flex: none;
+ width: 16px;
+ height: 1px;
+ background: var(--sage);
+}
+
+.label-invert {
+ color: rgba(246, 242, 234, 0.7);
+}
+
+.label-invert::before {
+ background: rgba(246, 242, 234, 0.55);
+}
+
+/* ---------------------------------------------------------------- header */
+
+.site-head {
+ border-bottom: 1px solid var(--line);
+}
+
+.head-inner {
+ display: flex;
+ align-items: baseline;
+ justify-content: space-between;
+ gap: 24px;
+ padding-block: 22px;
+}
+
+.wordmark {
+ display: inline-flex;
+ align-items: baseline;
+ gap: 10px;
+ text-decoration: none;
+}
+
+.wordmark-ko {
+ font-family: var(--serif);
+ font-size: 22px;
+ letter-spacing: -0.02em;
+ line-height: 1;
+}
+
+.wordmark-en {
+ color: var(--muted);
+ font-size: 9px;
+ font-weight: 500;
+ letter-spacing: 0.22em;
+ line-height: 1;
+}
+
+.nav {
+ display: flex;
+ gap: 26px;
+ font-size: 13px;
+ letter-spacing: 0.02em;
+}
+
+.nav a {
+ color: var(--muted);
+ text-decoration: none;
+}
+
+.nav a:hover {
+ color: var(--ink);
+ text-decoration: underline;
+ text-underline-offset: 0.25em;
+}
+
+/* ------------------------------------------------------------------ hero */
+
+.hero {
+ padding-block: clamp(44px, 6vw, 88px) clamp(80px, 10vw, 140px);
+}
+
+.hero-grid {
+ display: grid;
+ grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
+ gap: clamp(36px, 6vw, 96px);
+ align-items: end;
+}
+
+.hero-copy {
+ padding-bottom: clamp(0px, 4vw, 56px);
+}
+
+.hero h1 {
+ font-size: clamp(3rem, 6vw, 5.75rem);
+ letter-spacing: -0.035em;
+ line-height: 0.98;
+ animation: rise 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) both;
+}
+
+.hero-lede {
+ max-width: 36ch;
+ margin-top: 28px;
+ font-size: 17px;
+ line-height: 1.8;
+ animation: rise 0.9s 0.08s cubic-bezier(0.2, 0.6, 0.2, 1) both;
+}
+
+.hero-actions {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ gap: 24px;
+ margin-top: 32px;
+ animation: rise 0.9s 0.16s cubic-bezier(0.2, 0.6, 0.2, 1) both;
+}
+
+.hero-meta {
+ margin-top: 28px;
+ color: var(--muted);
+ font-size: 12px;
+ letter-spacing: 0.04em;
+ animation: rise 0.9s 0.24s cubic-bezier(0.2, 0.6, 0.2, 1) both;
+}
+
+.hero-media {
+ aspect-ratio: 4 / 5;
+ overflow: hidden;
+ background: var(--line);
+}
+
+.hero-media img {
+ width: 100%;
+ height: 110%;
+ object-fit: cover;
+ object-position: center top;
+ animation: settle 1.4s cubic-bezier(0.2, 0.6, 0.2, 1) both;
+}
+
+.hero-figure figcaption {
+ display: flex;
+ justify-content: space-between;
+ gap: 16px;
+ margin-top: 12px;
+ color: var(--muted);
+ font-size: 12px;
+ line-height: 1.6;
+}
+
+.hero-figure figcaption a {
+ color: var(--ink);
+ text-decoration: none;
+}
+
+.hero-figure figcaption a:hover {
+ border-bottom: 1px solid var(--sage);
+}
+
+/* ---------------------------------------------------------------- buttons */
+
+.btn {
+ display: inline-block;
+ appearance: none;
+ padding: 14px 22px;
+ border: 1px solid var(--ink);
+ border-radius: 0;
+ background: var(--ink);
+ color: var(--paper);
+ font-family: var(--sans);
+ font-size: 13px;
+ font-weight: 500;
+ letter-spacing: 0.03em;
+ line-height: 1.4;
+ text-align: center;
+ text-decoration: none;
+ cursor: pointer;
+ transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
+}
+
+.btn:hover {
+ background: transparent;
+ color: var(--ink);
+}
+
+.btn:disabled,
+.btn-disabled {
+ border-style: dashed;
+ border-color: var(--muted);
+ background: transparent;
+ color: var(--muted);
+ cursor: not-allowed;
+}
+
+.btn:disabled:hover,
+.btn-disabled:hover {
+ border-color: var(--muted);
+ background: transparent;
+ color: var(--muted);
+}
+
+.text-link {
+ border-bottom: 1px solid var(--ink);
+ padding-bottom: 2px;
+ font-size: 13px;
+ text-decoration: none;
+ transition: color 0.2s ease, border-color 0.2s ease;
+}
+
+.text-link:hover {
+ border-color: var(--sage);
+}
+
+.pending {
+ max-width: 280px;
+ margin-top: 24px;
+ padding-top: 12px;
+ border-top: 1px solid var(--line);
+ color: var(--muted);
+ font-size: 12px;
+ letter-spacing: 0.02em;
+ line-height: 1.6;
+}
+
+.pending-inline {
+ color: var(--muted);
+}
+
+/* --------------------------------------------------------------- sections */
+
+.section {
+ padding-block: clamp(72px, 9vw, 128px);
+ border-top: 1px solid var(--line);
+}
+
+.section-head {
+ display: grid;
+ grid-template-columns: 120px minmax(0, 1fr) minmax(240px, 340px);
+ gap: clamp(20px, 4vw, 56px);
+ align-items: start;
+ margin-bottom: clamp(40px, 6vw, 72px);
+}
+
+.section-head .label {
+ padding-top: 10px;
+}
+
+.section-head h2 {
+ font-size: clamp(2.2rem, 4.4vw, 4rem);
+ letter-spacing: -0.035em;
+ line-height: 1.04;
+}
+
+.section-note {
+ align-self: end;
+ justify-self: end;
+ max-width: 36ch;
+ color: var(--muted);
+ font-size: 14px;
+ line-height: 1.7;
+}
+
+/* ----------------------------------------------------------------- works */
+
+.works-grid {
+ display: grid;
+ grid-template-columns: repeat(3, minmax(0, 1fr));
+ gap: clamp(28px, 4vw, 52px);
+ align-items: start;
+}
+
+.work-link {
+ display: block;
+ text-decoration: none;
+}
+
+.work-figure {
+ aspect-ratio: 4 / 5;
+ overflow: hidden;
+ background: var(--line);
+}
+
+.work-figure img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ transition: transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
+}
+
+.work-link:hover .work-figure img,
+.work-link:focus-visible .work-figure img {
+ transform: scale(1.02);
+}
+
+.work-caption {
+ padding-top: 16px;
+}
+
+.work-caption h3 {
+ font-size: clamp(1.2rem, 1.7vw, 1.55rem);
+ line-height: 1.25;
+}
+
+.work-link:hover h3 {
+ text-decoration: underline;
+ text-decoration-thickness: 1px;
+ text-underline-offset: 0.18em;
+}
+
+.work-sub {
+ margin-top: 6px;
+ color: var(--muted);
+ font-size: 14px;
+ line-height: 1.6;
+}
+
+.work-price {
+ margin-top: 10px;
+ font-size: 14px;
+ font-variant-numeric: tabular-nums;
+}
+
+.work-sold {
+ margin-top: 8px;
+ color: var(--muted);
+ font-size: 12px;
+}
+
+/* --------------------------------------------------------------- process */
+
+.process-list {
+ list-style: none;
+}
+
+.process-step {
+ display: grid;
+ grid-template-columns: 80px minmax(0, 4fr) minmax(0, 5fr);
+ grid-template-areas: "num copy fig";
+ gap: clamp(24px, 4vw, 64px);
+ padding-block: clamp(40px, 5.5vw, 72px);
+ border-top: 1px solid var(--line);
+ align-items: start;
+}
+
+.process-step:first-child {
+ border-top: 0;
+ padding-top: 0;
+}
+
+.process-step:nth-child(even) {
+ grid-template-areas: "num fig copy";
+}
+
+.process-step.no-image {
+ grid-template-columns: 80px minmax(0, 1fr);
+ grid-template-areas: "num copy";
+}
+
+.step-number {
+ grid-area: num;
+ color: var(--clay);
+ font-family: var(--serif);
+ font-size: clamp(2rem, 3.4vw, 3.2rem);
+ font-variant-numeric: tabular-nums;
+ line-height: 0.9;
+}
+
+.step-copy {
+ grid-area: copy;
+}
+
+.step-copy h3 {
+ margin-bottom: 14px;
+ font-size: clamp(1.45rem, 2.4vw, 2rem);
+ line-height: 1.2;
+}
+
+.step-copy p {
+ max-width: 38ch;
+ font-size: 16px;
+ line-height: 1.8;
+}
+
+.no-image .step-copy p {
+ max-width: 60ch;
+}
+
+.step-figure {
+ grid-area: fig;
+ aspect-ratio: 4 / 3;
+ overflow: hidden;
+ background: var(--line);
+}
+
+.step-figure img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+}
+
+.process-step:first-child .step-figure img {
+ object-position: 28% 38%;
+ transform: scale(1.28);
+}
+
+.process-step:nth-child(3) .step-figure {
+ width: 100%;
+ max-width: 420px;
+ aspect-ratio: 3 / 4;
+ justify-self: end;
+}
+
+/* ------------------------------------------------------------------- kit */
+
+.kit {
+ margin-top: clamp(56px, 7vw, 96px);
+ padding-block: clamp(72px, 9vw, 120px);
+ background: var(--ink);
+ color: var(--paper);
+}
+
+.kit-grid {
+ display: grid;
+ grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
+ gap: clamp(36px, 6vw, 100px);
+ align-items: center;
+}
+
+.kit h2 {
+ max-width: 12ch;
+ margin-top: 14px;
+ color: var(--paper);
+ font-size: clamp(2.3rem, 4.6vw, 4rem);
+ letter-spacing: -0.035em;
+ line-height: 1.04;
+}
+
+.kit-sub {
+ margin-top: 18px;
+ color: rgba(246, 242, 234, 0.72);
+ font-size: 17px;
+}
+
+.kit-copy p {
+ max-width: 46ch;
+ margin-top: 18px;
+ color: rgba(246, 242, 234, 0.78);
+ font-size: 16px;
+ line-height: 1.8;
+}
+
+.kit-note {
+ padding-top: 16px;
+ border-top: 1px solid rgba(246, 242, 234, 0.22);
+ color: rgba(246, 242, 234, 0.66) !important;
+ font-size: 13px !important;
+}
+
+.kit-price {
+ color: var(--paper) !important;
+ font-size: 18px !important;
+ font-variant-numeric: tabular-nums;
+}
+
+.kit .btn {
+ margin-top: 24px;
+ border-color: var(--paper);
+ background: var(--paper);
+ color: var(--ink);
+}
+
+.kit .btn:hover {
+ background: transparent;
+ color: var(--paper);
+}
+
+.kit .pending {
+ border-color: rgba(246, 242, 234, 0.28);
+ color: rgba(246, 242, 234, 0.72);
+}
+
+.kit-more {
+ display: block;
+ width: fit-content;
+ margin-top: 20px;
+ border-bottom: 1px solid rgba(246, 242, 234, 0.4);
+ color: var(--paper);
+ font-size: 13px;
+ text-decoration: none;
+}
+
+.kit-more:hover {
+ border-color: var(--paper);
+ color: var(--paper);
+}
+
+.kit-figure {
+ aspect-ratio: 4 / 5;
+ overflow: hidden;
+ background: #1b1a17;
+}
+
+.kit-figure img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+}
+
+/* ----------------------------------------------------------------- order */
+
+.order-grid {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: clamp(32px, 6vw, 96px);
+}
+
+.order-col h3 {
+ margin-bottom: 10px;
+ font-size: clamp(1.4rem, 2vw, 1.8rem);
+}
+
+.info-list {
+ list-style: none;
+}
+
+.info-list li {
+ padding-block: 14px;
+ border-top: 1px solid var(--line);
+ font-size: 15px;
+ line-height: 1.7;
+}
+
+.info-list li:last-child {
+ border-bottom: 1px solid var(--line);
+}
+
+.order-note {
+ max-width: 52ch;
+ margin-top: 32px;
+ color: var(--muted);
+ font-size: 14px;
+}
+
+.order-note a {
+ color: var(--ink);
+}
+
+/* --------------------------------------------------------------- contact */
+
+.contact {
+ padding-block: clamp(80px, 10vw, 140px);
+}
+
+.contact h2 {
+ margin-top: 16px;
+ font-size: clamp(2rem, 4.2vw, 3.6rem);
+ letter-spacing: -0.035em;
+ line-height: 1.15;
+}
+
+.contact-email {
+ display: inline-block;
+ margin-top: 36px;
+ padding-bottom: 5px;
+ border-bottom: 1px solid var(--ink);
+ font-family: var(--serif);
+ font-size: clamp(1.7rem, 3.6vw, 2.9rem);
+ line-height: 1.2;
+ text-decoration: none;
+}
+
+.contact-email:hover {
+ border-color: var(--sage);
+}
+
+.contact-sub {
+ margin-top: 24px;
+ color: var(--muted);
+ font-size: 14px;
+}
+
+/* ---------------------------------------------------------------- footer */
+
+.site-foot {
+ margin-top: clamp(40px, 6vw, 80px);
+ padding-block: 32px 24px;
+ border-top: 1px solid var(--line);
+}
+
+.foot-meta {
+ display: grid;
+ grid-template-columns: 1fr auto;
+ gap: 16px 32px;
+ align-items: start;
+ color: var(--muted);
+ font-size: 12px;
+ line-height: 1.6;
+}
+
+.foot-contact {
+ text-align: right;
+}
+
+.foot-sep {
+ margin-inline: 8px;
+ color: var(--line);
+}
+
+.foot-brand {
+ margin-block: clamp(48px, 8vw, 96px) 28px;
+ font-family: var(--serif);
+ font-size: clamp(7rem, 26vw, 19rem);
+ letter-spacing: -0.055em;
+ line-height: 0.8;
+}
+
+.foot-credits {
+ display: grid;
+ grid-template-columns: 120px minmax(0, 1fr);
+ gap: 20px;
+ padding-top: 20px;
+ border-top: 1px solid var(--line);
+}
+
+.credits-title {
+ color: var(--muted);
+ font-size: 11px;
+ letter-spacing: 0.08em;
+}
+
+.credits {
+ display: grid;
+ gap: 6px;
+ list-style: none;
+ color: var(--muted);
+ font-size: 11px;
+ line-height: 1.6;
+}
+
+.credits span {
+ color: var(--ink);
+}
+
+.foot-copy {
+ margin-top: 32px;
+ color: var(--muted);
+ font-size: 11px;
+}
+
+/* --------------------------------------------------------------- product */
+
+.back-link {
+ display: inline-block;
+ margin-block: 8px 28px;
+ color: var(--muted);
+ font-size: 13px;
+ text-decoration: none;
+}
+
+.back-link:hover {
+ color: var(--ink);
+}
+
+.product {
+ padding-bottom: clamp(40px, 6vw, 80px);
+}
+
+.product-top {
+ display: grid;
+ grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
+ gap: clamp(36px, 5vw, 80px);
+ align-items: start;
+}
+
+.product-media {
+ aspect-ratio: 4 / 5;
+ overflow: hidden;
+ background: var(--line);
+}
+
+.product-media img {
+ width: 100%;
+ height: 110%;
+ object-fit: cover;
+ object-position: center top;
+}
+
+.product-info {
+ position: sticky;
+ top: 32px;
+ padding-top: clamp(8px, 3vw, 40px);
+}
+
+.product-info h1 {
+ font-size: clamp(2.3rem, 4.4vw, 4.1rem);
+ letter-spacing: -0.035em;
+ line-height: 1.06;
+}
+
+.product-sub {
+ margin-top: 14px;
+ color: var(--muted);
+ font-size: 17px;
+}
+
+.product-price {
+ margin-top: 26px;
+ font-size: 18px;
+ font-variant-numeric: tabular-nums;
+}
+
+.product-info .btn,
+.product-info .pending {
+ margin-top: 24px;
+}
+
+.product-sold {
+ margin-top: 8px;
+ color: var(--muted);
+ font-size: 12px;
+}
+
+.spec {
+ margin-top: 44px;
+ border-top: 1px solid var(--line);
+}
+
+.spec div {
+ display: grid;
+ grid-template-columns: 76px minmax(0, 1fr);
+ gap: 16px;
+ padding-block: 12px;
+ border-bottom: 1px solid var(--line);
+}
+
+.spec dt {
+ color: var(--muted);
+ font-size: 12px;
+ letter-spacing: 0.02em;
+}
+
+.spec dd {
+ margin: 0;
+ font-size: 14px;
+ line-height: 1.6;
+}
+
+.product-story {
+ display: grid;
+ grid-template-columns: 120px minmax(0, 1fr);
+ gap: clamp(20px, 4vw, 56px);
+ align-items: start;
+ margin-top: clamp(72px, 10vw, 140px);
+}
+
+.product-story .label {
+ padding-top: 10px;
+}
+
+.prose {
+ max-width: 64ch;
+}
+
+.prose p {
+ margin-bottom: 1.4em;
+ font-size: 17px;
+ line-height: 1.85;
+}
+
+.prose p:first-child {
+ font-size: clamp(1.25rem, 1.9vw, 1.5rem);
+ line-height: 1.7;
+}
+
+.prose p:last-child {
+ margin-bottom: 0;
+}
+
+.prose h2 {
+ margin: 2em 0 0.7em;
+ font-size: clamp(1.4rem, 2.2vw, 1.8rem);
+}
+
+.prose ul {
+ margin-bottom: 1.4em;
+ padding-left: 1.2em;
+}
+
+.prose li {
+ margin-bottom: 0.4em;
+}
+
+.prose figure {
+ margin-block: 32px;
+}
+
+.gallery {
+ grid-column: 2;
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 20px;
+ margin-top: 24px;
+}
+
+.gallery-figure {
+ aspect-ratio: 4 / 5;
+ overflow: hidden;
+ background: var(--line);
+}
+
+.gallery-figure img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+}
+
+.pager {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 24px;
+ margin-top: clamp(80px, 10vw, 140px);
+ padding-top: 20px;
+ border-top: 1px solid var(--line);
+}
+
+.pager-link {
+ display: block;
+ text-decoration: none;
+}
+
+.pager-next {
+ text-align: right;
+}
+
+.pager-label {
+ display: block;
+ color: var(--muted);
+ font-size: 11px;
+ letter-spacing: 0.08em;
+}
+
+.pager-title {
+ display: block;
+ margin-top: 6px;
+ font-family: var(--serif);
+ font-size: clamp(1.2rem, 1.8vw, 1.5rem);
+ line-height: 1.3;
+}
+
+.pager-link:hover .pager-title {
+ text-decoration: underline;
+ text-underline-offset: 0.2em;
+}
+
+/* ---------------------------------------------------------------- motion */
+
+@keyframes rise {
+ from {
+ opacity: 0;
+ transform: translateY(16px);
+ }
+ to {
+ opacity: 1;
+ transform: translateY(0);
+ }
+}
+
+@keyframes settle {
+ from {
+ opacity: 0;
+ transform: scale(1.03);
+ }
+ to {
+ opacity: 1;
+ transform: scale(1);
+ }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ html {
+ scroll-behavior: auto;
+ }
+
+ *,
+ *::before,
+ *::after {
+ animation-duration: 0.01ms !important;
+ animation-delay: 0ms !important;
+ animation-iteration-count: 1 !important;
+ transition-duration: 0.01ms !important;
+ }
+
+ .hero-media img {
+ transform: none;
+ }
+
+ .work-link:hover .work-figure img,
+ .work-link:focus-visible .work-figure img {
+ transform: none;
+ }
+}
+
+/* ------------------------------------------------------------- responsive */
+
+@media (max-width: 1040px) {
+ .section-head {
+ grid-template-columns: 90px minmax(0, 1fr);
+ }
+
+ .section-note {
+ grid-column: 2;
+ justify-self: start;
+ max-width: 46ch;
+ }
+
+ .works-grid {
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ }
+}
+
+@media (max-width: 900px) {
+ .shell {
+ width: calc(100% - 48px);
+ }
+
+ .hero-grid {
+ grid-template-columns: minmax(0, 1fr);
+ }
+
+ .hero-copy {
+ padding-bottom: 0;
+ }
+
+ .hero h1 {
+ font-size: clamp(3rem, 9.6vw, 5.2rem);
+ }
+
+ .hero-lede {
+ max-width: 42ch;
+ }
+
+ .hero-figure {
+ margin-top: 40px;
+ }
+
+ .kit-grid {
+ grid-template-columns: minmax(0, 1fr);
+ }
+
+ .kit-figure {
+ margin-top: 8px;
+ }
+
+ .order-grid {
+ grid-template-columns: minmax(0, 1fr);
+ gap: 48px;
+ }
+
+ .product-top {
+ grid-template-columns: minmax(0, 1fr);
+ }
+
+ .product-info {
+ position: static;
+ padding-top: 0;
+ }
+
+ .product-info .spec {
+ margin-top: 36px;
+ }
+
+ .product-story {
+ grid-template-columns: minmax(0, 1fr);
+ }
+
+ .product-story .label {
+ padding-top: 0;
+ }
+
+ .gallery {
+ grid-column: 1;
+ }
+
+ .foot-meta {
+ grid-template-columns: minmax(0, 1fr);
+ }
+
+ .foot-contact {
+ text-align: left;
+ }
+
+ .foot-credits {
+ grid-template-columns: minmax(0, 1fr);
+ gap: 10px;
+ }
+}
+
+@media (max-width: 720px) {
+ .shell {
+ width: calc(100% - 40px);
+ }
+
+ .nav {
+ gap: 18px;
+ font-size: 12px;
+ }
+
+ .wordmark-en {
+ display: none;
+ }
+
+ .section-head {
+ grid-template-columns: minmax(0, 1fr);
+ gap: 12px;
+ }
+
+ .section-head .label {
+ padding-top: 0;
+ }
+
+ .section-note {
+ grid-column: 1;
+ justify-self: start;
+ max-width: 42ch;
+ }
+
+ .works-grid {
+ grid-template-columns: minmax(0, 1fr);
+ gap: 40px;
+ }
+
+ .process-step,
+ .process-step:nth-child(even),
+ .process-step.no-image {
+ grid-template-columns: 44px minmax(0, 1fr);
+ grid-template-areas:
+ "num copy"
+ "num fig";
+ gap: 16px 20px;
+ padding-block: 40px;
+ }
+
+ .process-step:first-child {
+ padding-top: 0;
+ }
+
+ .step-number {
+ font-size: 2rem;
+ padding-top: 2px;
+ }
+
+ .step-figure,
+ .process-step:nth-child(3) .step-figure {
+ width: 100%;
+ max-width: none;
+ aspect-ratio: 4 / 3;
+ margin-top: 8px;
+ justify-self: stretch;
+ }
+
+ .kit {
+ margin-top: 48px;
+ }
+
+ .contact h2 br {
+ display: none;
+ }
+
+ .contact-email {
+ font-size: clamp(1.5rem, 7vw, 2rem);
+ }
+
+ .gallery {
+ grid-template-columns: minmax(0, 1fr);
+ }
+
+ .pager {
+ grid-template-columns: minmax(0, 1fr);
+ gap: 18px;
+ }
+
+ .pager-next {
+ text-align: left;
+ padding-top: 18px;
+ border-top: 1px solid var(--line);
+ }
+
+ .foot-brand {
+ font-size: clamp(5.5rem, 30vw, 9rem);
+ }
+}
+
+@media (max-width: 420px) {
+ .head-inner {
+ gap: 12px;
+ }
+
+ .nav {
+ gap: 14px;
+ }
+
+ .wordmark-ko {
+ font-size: 20px;
+ }
+
+ .hero-meta {
+ font-size: 11px;
+ }
+
+ .spec div {
+ grid-template-columns: 64px minmax(0, 1fr);
+ gap: 12px;
+ }
+}
diff --git a/build.py b/build.py
new file mode 100644
index 0000000..e5d21aa
--- /dev/null
+++ b/build.py
@@ -0,0 +1,679 @@
+#!/usr/bin/env python3
+"""한땀 정적 사이트 빌드.
+
+content/ + templates/ + assets/ -> dist/
+표준 라이브러리만 쓴다. 템플릿은 {{key}} 치환과 목록 반복만 지원한다.
+"""
+
+from __future__ import annotations
+
+import html
+import json
+import re
+import shutil
+import sys
+from pathlib import Path
+from typing import Any, Dict, Iterable, List, Optional, Tuple
+
+ROOT = Path(__file__).resolve().parent
+CONTENT = ROOT / "content"
+TEMPLATES = ROOT / "templates"
+ASSETS = ROOT / "assets"
+DIST = ROOT / "dist"
+SITE_BASE = "https://home.lala.dedyn.io/teamat/"
+
+VAR_RE = re.compile(r"{{\s*(\w+)\s*}}")
+LOOP_RE = re.compile(r"{{#(\w+)}}(.*?){{/\1}}", re.S)
+BOLD_RE = re.compile(r"\*\*(.+?)\*\*")
+IMAGE_LINE_RE = re.compile(r"^!\[(.*?)\]\((.+?)\)$")
+
+
+def esc(value: Any) -> str:
+ return html.escape(str(value), quote=True)
+
+
+def fail(message: str) -> None:
+ print(f"빌드 오류: {message}", file=sys.stderr)
+ raise SystemExit(1)
+
+
+# ---------------------------------------------------------------- front matter
+
+
+def parse_scalar(value: str) -> Any:
+ value = value.strip()
+ if value in ("true", "false"):
+ return value == "true"
+ if value in ("", '""', "''"):
+ return ""
+ if re.fullmatch(r"-?\d+", value):
+ return int(value)
+ if len(value) >= 2 and value[0] == value[-1] and value[0] in ("'", '"'):
+ return value[1:-1]
+ return value
+
+
+def parse_markdown_file(path: Path) -> Tuple[Dict[str, Any], str]:
+ raw = path.read_text(encoding="utf-8")
+ if not raw.startswith("---"):
+ fail(f"{path} 파일이 --- 로 시작하지 않습니다.")
+
+ parts = raw.split("---", 2)
+ if len(parts) != 3:
+ fail(f"{path} 파일의 front matter가 닫히지 않았습니다.")
+
+ front, body = parts[1], parts[2].lstrip("\n")
+ data: Dict[str, Any] = {}
+ current_key: Optional[str] = None
+
+ for line in front.splitlines():
+ if not line.strip() or line.lstrip().startswith("#"):
+ continue
+
+ stripped = line.strip()
+ if stripped.startswith("- ") and current_key:
+ if data.get(current_key) is None:
+ data[current_key] = []
+ if not isinstance(data[current_key], list):
+ fail(f"{path} 의 {current_key} 는 목록이 아닙니다.")
+ data[current_key].append(parse_scalar(stripped[2:]))
+ continue
+
+ if ":" not in line:
+ fail(f"{path} 의 front matter 줄을 읽을 수 없습니다: {line}")
+
+ key, value = line.split(":", 1)
+ key = key.strip()
+ value = value.strip()
+ if value == "":
+ data[key] = None
+ current_key = key
+ else:
+ data[key] = parse_scalar(value)
+ current_key = None
+
+ for key, value in list(data.items()):
+ if value is None:
+ data[key] = ""
+
+ return data, body
+
+
+# ------------------------------------------------------------------- markdown
+
+
+def inline_markdown(text: str) -> str:
+ return BOLD_RE.sub(r"\1 ", esc(text))
+
+
+def markdown_to_html(text: str, img_prefix: str = "") -> str:
+ lines = text.replace("\r\n", "\n").split("\n")
+ out: List[str] = []
+ paragraph: List[str] = []
+ index = 0
+
+ def flush_paragraph() -> None:
+ if paragraph:
+ out.append("" + inline_markdown(" ".join(paragraph)) + "
")
+ paragraph.clear()
+
+ while index < len(lines):
+ line = lines[index].strip()
+
+ if not line:
+ flush_paragraph()
+ index += 1
+ continue
+
+ if line.startswith("## "):
+ flush_paragraph()
+ out.append("" + inline_markdown(line[3:].strip()) + " ")
+ index += 1
+ continue
+
+ if line.startswith("- "):
+ flush_paragraph()
+ items: List[str] = []
+ while index < len(lines) and lines[index].strip().startswith("- "):
+ items.append("" + inline_markdown(lines[index].strip()[2:].strip()) + " ")
+ index += 1
+ out.append("")
+ continue
+
+ image_match = IMAGE_LINE_RE.match(line)
+ if image_match:
+ flush_paragraph()
+ alt, src = image_match.group(1), image_match.group(2).strip()
+ out.append(
+ ' '
+ )
+ index += 1
+ continue
+
+ paragraph.append(line)
+ index += 1
+
+ flush_paragraph()
+ return "\n".join(out)
+
+
+# --------------------------------------------------------------------- images
+
+
+def jpeg_size(path: Path) -> Tuple[int, int]:
+ data = path.read_bytes()
+ if data[:2] != b"\xff\xd8":
+ fail(f"JPEG 파일이 아닙니다: {path}")
+
+ sof_markers = set(range(0xC0, 0xC4)) | set(range(0xC5, 0xC8)) | set(range(0xC9, 0xCC)) | set(range(0xCD, 0xD0))
+ pos = 2
+ while pos + 9 < len(data):
+ if data[pos] != 0xFF:
+ pos += 1
+ continue
+ marker = data[pos + 1]
+ if marker in (0xD8, 0xD9):
+ pos += 2
+ continue
+ length = int.from_bytes(data[pos + 2 : pos + 4], "big")
+ if marker in sof_markers:
+ height = int.from_bytes(data[pos + 5 : pos + 7], "big")
+ width = int.from_bytes(data[pos + 7 : pos + 9], "big")
+ return width, height
+ pos += 2 + length
+
+ fail(f"이미지 크기를 읽을 수 없습니다: {path}")
+
+
+_image_sizes: Dict[str, Tuple[int, int]] = {}
+
+
+def image_size(rel_path: str) -> Tuple[int, int]:
+ if not rel_path:
+ fail("이미지 경로가 비어 있습니다.")
+ if rel_path.startswith(("http://", "https://", "/")):
+ fail(f"이미지 경로는 상대경로여야 합니다: {rel_path}")
+ if rel_path not in _image_sizes:
+ path = ROOT / rel_path
+ if not path.is_file():
+ fail(f"이미지 파일이 없습니다: {rel_path}")
+ _image_sizes[rel_path] = jpeg_size(path)
+ return _image_sizes[rel_path]
+
+
+def img_tag(
+ rel_path: str,
+ alt: str,
+ *,
+ prefix: str = "",
+ loading: str = "lazy",
+ priority: bool = False,
+) -> str:
+ width, height = image_size(rel_path)
+ extra = ' fetchpriority="high"' if priority else ""
+ return (
+ f' '
+ )
+
+
+def figure_html(
+ rel_path: str,
+ alt: str,
+ css_class: str,
+ *,
+ prefix: str = "",
+ loading: str = "lazy",
+ priority: bool = False,
+) -> str:
+ return (
+ f''
+ + img_tag(rel_path, alt, prefix=prefix, loading=loading, priority=priority)
+ + " "
+ )
+
+
+def absolute_url(rel_path: str) -> str:
+ return SITE_BASE + rel_path.lstrip("/")
+
+
+# -------------------------------------------------------------------- helpers
+
+
+def format_price(value: Any) -> str:
+ if value is None or value == "":
+ return "문의"
+ if isinstance(value, int):
+ return f"{value:,}원"
+ return esc(value)
+
+
+def collapse(text: str) -> str:
+ return re.sub(r"\s+", " ", text).strip()
+
+
+def render(template: str, context: Dict[str, Any], name: str = "template") -> str:
+ def replace_loop(match: re.Match) -> str:
+ key, body = match.group(1), match.group(2)
+ items = context.get(key, [])
+ if items in (None, ""):
+ items = []
+ if not isinstance(items, Iterable) or isinstance(items, (str, bytes, dict)):
+ fail(f"{name} 의 {key} 는 목록이어야 합니다.")
+ rendered: List[str] = []
+ for item in items:
+ local = dict(context)
+ if isinstance(item, dict):
+ local.update(item)
+ else:
+ local["text"] = item
+ rendered.append(VAR_RE.sub(lambda m: str(local.get(m.group(1), "")), body))
+ return "".join(rendered)
+
+ output = LOOP_RE.sub(replace_loop, template)
+ output = VAR_RE.sub(lambda m: str(context.get(m.group(1), "")), output)
+
+ leftover = re.search(r"{{[^}]+}}", output)
+ if leftover:
+ fail(f"{name} 에 치환되지 않은 값이 있습니다: {leftover.group(0)}")
+ return output
+
+
+def load_products() -> List[Dict[str, Any]]:
+ products: List[Dict[str, Any]] = []
+ for path in sorted((CONTENT / "products").glob("*.md")):
+ data, body = parse_markdown_file(path)
+ slug = str(data.get("slug", "")).strip()
+ if not slug:
+ fail(f"{path.name} 에 slug 가 없습니다.")
+ if slug != path.stem:
+ fail(f"{path.name} 의 slug({slug})가 파일명과 다릅니다.")
+ data["slug"] = slug
+ data["body"] = body
+ data["_path"] = path
+ image_size(str(data.get("image", "")))
+ gallery = data.get("gallery") or []
+ if not isinstance(gallery, list):
+ fail(f"{path.name} 의 gallery 는 목록이어야 합니다.")
+ for gallery_image in gallery:
+ image_size(str(gallery_image))
+ products.append(data)
+
+ if not products:
+ fail("content/products 에 작품이 없습니다.")
+ return products
+
+
+def sort_products(products: List[Dict[str, Any]], order: str) -> List[Dict[str, Any]]:
+ reverse = order != "oldest"
+ return sorted(products, key=lambda p: (str(p.get("date", "")), p["slug"]), reverse=reverse)
+
+
+def load_process() -> List[Dict[str, Any]]:
+ steps: List[Dict[str, Any]] = []
+ for path in sorted((CONTENT / "process").glob("*.md")):
+ data, body = parse_markdown_file(path)
+ if data.get("step") in ("", None):
+ fail(f"{path.name} 에 step 이 없습니다.")
+ data["step"] = int(data["step"])
+ data["body"] = body
+ if data.get("image"):
+ image_size(str(data["image"]))
+ steps.append(data)
+ if not steps:
+ fail("content/process 에 단계가 없습니다.")
+ return sorted(steps, key=lambda s: s["step"])
+
+
+def build_shared(site: Dict[str, Any], home: str, asset_prefix: str) -> Dict[str, Any]:
+ brand = site["brand"]
+ contact = site["contact"]
+ email = str(contact.get("email", "")).strip()
+ instagram = str(contact.get("instagram", "")).strip()
+
+ if email:
+ email_href = "mailto:" + email
+ email_html = f'{esc(email)} '
+ else:
+ email_href = ""
+ email_html = '메일 준비 중 '
+
+ if instagram:
+ instagram_link = f'인스타그램 '
+ else:
+ instagram_link = '인스타그램 준비 중 '
+
+ credits = [
+ {
+ "title": esc(item.get("title", "")),
+ "author": esc(item.get("author", "")),
+ "license": esc(item.get("license", "")),
+ }
+ for item in site.get("image_credits", [])
+ ]
+
+ return {
+ "brand_name": esc(brand["name"]),
+ "brand_name_en": esc(brand["name_en"]),
+ "tagline": esc(brand["tagline"]),
+ "since": esc(brand["since"]),
+ "footer_note": esc(site.get("footer_note", "")),
+ "contact_email": esc(email) if email else "",
+ "email_href": esc(email_href) if email_href else "",
+ "email_html": email_html,
+ "instagram_link": instagram_link,
+ "credits": credits,
+ "home": home,
+ "asset_prefix": asset_prefix,
+ }
+
+
+def product_loop_items(products: List[Dict[str, Any]]) -> List[Dict[str, Any]]:
+ items: List[Dict[str, Any]] = []
+ for product in products:
+ image = str(product["image"])
+ width, height = image_size(image)
+ sold_html = '판매 완료
' if product.get("sold_out") else ""
+ items.append(
+ {
+ "href": f"p/{product['slug']}.html",
+ "image": esc(image),
+ "alt": esc(product.get("image_alt") or product["title"]),
+ "width": str(width),
+ "height": str(height),
+ "title": esc(product["title"]),
+ "subtitle": esc(product.get("subtitle", "")),
+ "price_text": format_price(product.get("price")),
+ "sold_html": sold_html,
+ }
+ )
+ return items
+
+
+def process_loop_items(steps: List[Dict[str, Any]]) -> List[Dict[str, Any]]:
+ items: List[Dict[str, Any]] = []
+ for step in steps:
+ image = str(step.get("image", ""))
+ if image:
+ image_html = figure_html(
+ image,
+ str(step.get("image_alt") or step["title"]),
+ "step-figure",
+ )
+ step_class = "process-step has-image"
+ else:
+ image_html = ""
+ step_class = "process-step no-image"
+ items.append(
+ {
+ "step": str(step["step"]),
+ "title": esc(step["title"]),
+ "body_html": markdown_to_html(step["body"]),
+ "image_html": image_html,
+ "step_class": step_class,
+ }
+ )
+ return items
+
+
+def build_index(
+ site: Dict[str, Any],
+ products: List[Dict[str, Any]],
+ steps: List[Dict[str, Any]],
+ shared: Dict[str, Any],
+ brand: Dict[str, Any],
+) -> str:
+ featured = next((p for p in products if p.get("featured")), products[0])
+ hero_image = str(featured["image"])
+ hero_width, hero_height = image_size(hero_image)
+
+ kit = next((p for p in products if p["slug"] == "kit-first-stitch"), None)
+ if kit is None:
+ fail("content/products/kit-first-stitch.md 가 필요합니다.")
+ kit_image = str(kit["image"])
+ kit_width, kit_height = image_size(kit_image)
+ kit_body_html = markdown_to_html(kit["body"])
+ kit_excerpt = kit_body_html.split("
", 1)[0] + "" if "" in kit_body_html else kit_body_html
+
+ kit_url = str(site.get("shop", {}).get("kit_url", "")).strip()
+ if kit_url:
+ kit_action = f'네이버에서 키트 구매 '
+ else:
+ kit_action = '네이버 스마트스토어 준비 중
'
+
+ store_url = str(site.get("shop", {}).get("store_url", "")).strip()
+ if store_url:
+ store_note = (
+ f'네이버 스마트스토어 '
+ "에서 주문하실 수 있습니다."
+ )
+ else:
+ store_note = "온라인 주문은 준비 중입니다. 작품과 키트 문의는 메일로 받습니다."
+
+ intro = collapse(brand["intro"])
+ title = f"{brand['name']} — {brand['tagline']}"
+ context: Dict[str, Any] = dict(shared)
+ context.update(
+ {
+ "title": esc(title),
+ "description": esc(intro),
+ "og_title": esc(title),
+ "og_description": esc(intro),
+ "og_image": esc(absolute_url(hero_image)),
+ "og_type": "website",
+ "body_class": "is-home",
+ "intro": esc(intro),
+ "hero_image": esc(hero_image),
+ "hero_alt": esc(featured.get("image_alt") or featured["title"]),
+ "hero_width": str(hero_width),
+ "hero_height": str(hero_height),
+ "hero_title": esc(featured["title"]),
+ "hero_material": esc(featured.get("material", "")),
+ "hero_href": f"p/{featured['slug']}.html",
+ "products": product_loop_items(products),
+ "process": process_loop_items(steps),
+ "process_intro": esc(site.get("process_intro", "")),
+ "kit_title": esc(kit["title"]),
+ "kit_subtitle": esc(kit.get("subtitle", "")),
+ "kit_excerpt": kit_excerpt,
+ "kit_note": esc(site.get("shop", {}).get("kit_note", "")),
+ "kit_price": format_price(kit.get("price")),
+ "kit_action": kit_action,
+ "kit_href": f"p/{kit['slug']}.html",
+ "kit_image": esc(kit_image),
+ "kit_alt": esc(kit.get("image_alt") or kit["title"]),
+ "kit_width": str(kit_width),
+ "kit_height": str(kit_height),
+ "shipping": [{"text": esc(item)} for item in site.get("shipping", [])],
+ "care": [{"text": esc(item)} for item in site.get("care", [])],
+ "store_note": store_note,
+ }
+ )
+
+ body = render((TEMPLATES / "index.html").read_text(encoding="utf-8"), context, "index.html")
+ context["content"] = body
+ return render((TEMPLATES / "base.html").read_text(encoding="utf-8"), context, "base.html")
+
+
+def pager_html(product: Optional[Dict[str, Any]], label: str, css_class: str) -> str:
+ if product is None:
+ return ""
+ return (
+ f''
+ f''
+ f''
+ " "
+ )
+
+
+def build_product_page(
+ product: Dict[str, Any],
+ products: List[Dict[str, Any]],
+ shared: Dict[str, Any],
+ brand: Dict[str, Any],
+ index: int,
+) -> str:
+ image = str(product["image"])
+ width, height = image_size(image)
+
+ if product.get("sold_out"):
+ buy_html = '판매 완료
'
+ else:
+ naver_url = str(product.get("naver_url", "")).strip()
+ if naver_url:
+ buy_html = f'네이버 스토어에서 구매 '
+ else:
+ buy_html = (
+ ''
+ "네이버 스토어 준비 중"
+ " "
+ )
+
+ gallery = product.get("gallery") or []
+ gallery_figures: List[str] = []
+ for number, gallery_image in enumerate(gallery, start=1):
+ gallery_figures.append(
+ figure_html(
+ str(gallery_image),
+ f"{product['title']} 추가 이미지 {number}",
+ "gallery-figure",
+ prefix="../",
+ )
+ )
+ gallery_html = '' + "".join(gallery_figures) + "
" if gallery_figures else ""
+
+ prev_product = products[index - 1] if index > 0 else None
+ next_product = products[index + 1] if index + 1 < len(products) else None
+ list_fallback = (
+ '"
+ )
+
+ subtitle = str(product.get("subtitle", "")).strip()
+ material = str(product.get("material", "")).strip()
+ description = ". ".join(part for part in (subtitle, material) if part)
+ title = f"{product['title']} — {brand['name']}"
+
+ context: Dict[str, Any] = dict(shared)
+ context.update(
+ {
+ "title": esc(title),
+ "description": esc(description),
+ "og_title": esc(title),
+ "og_description": esc(description),
+ "og_image": esc(absolute_url(image)),
+ "og_type": "product",
+ "body_class": "is-product",
+ "image": esc(image),
+ "alt": esc(product.get("image_alt") or product["title"]),
+ "width": str(width),
+ "height": str(height),
+ "product_title": esc(product["title"]),
+ "title_text": esc(product["title"]),
+ "subtitle": esc(subtitle),
+ "price_text": format_price(product.get("price")),
+ "sold_html": '판매 완료
' if product.get("sold_out") else "",
+ "buy_html": buy_html,
+ "material": esc(material) or "—",
+ "size": esc(product.get("size", "")) or "—",
+ "care": esc(product.get("care", "")) or "—",
+ "body_html": markdown_to_html(product["body"], img_prefix="../"),
+ "gallery_html": gallery_html,
+ "prev_html": pager_html(prev_product, "이전 작품", "pager-link pager-link-prev") or list_fallback,
+ "next_html": pager_html(next_product, "다음 작품", "pager-link pager-link-next") or list_fallback,
+ }
+ )
+
+ # {{title}} is used both by the page and by . The base needs the full title;
+ # the product template needs only the work's name.
+ template = (TEMPLATES / "product.html").read_text(encoding="utf-8")
+ body_context = dict(context)
+ body_context["title"] = esc(product["title"])
+ body_context["title_text"] = esc(product["title"])
+ body = render(template, body_context, f"product {product['slug']}")
+ context["content"] = body
+ return render((TEMPLATES / "base.html").read_text(encoding="utf-8"), context, "base.html")
+
+
+def verify_dist(products: List[Dict[str, Any]]) -> None:
+ pages = [DIST / "index.html", *sorted((DIST / "p").glob("*.html"))]
+ errors: List[str] = []
+ images = 0
+
+ for page in pages:
+ text = page.read_text(encoding="utf-8")
+ images += len(re.findall(r" {attr}")
+
+ if errors:
+ for error in errors:
+ print(f"깨진 경로: {error}", file=sys.stderr)
+ fail(f"깨진 상대경로 {len(errors)}개")
+
+ index_text = (DIST / "index.html").read_text(encoding="utf-8")
+ work_links = sorted(set(re.findall(r'href="p/[^"]+\.html"', index_text)))
+ if len(work_links) < len(products):
+ fail("첫 페이지의 작품 링크 수가 작품 수보다 적습니다.")
+
+ print(f"검증: 페이지 {len(pages)}개, 이미지 {images}개, 깨진 상대경로 0개, 작품 링크 {len(work_links)}개")
+
+
+def main() -> None:
+ try:
+ site = json.loads((CONTENT / "site.json").read_text(encoding="utf-8"))
+ except json.JSONDecodeError as error:
+ fail(f"content/site.json 문법 오류: {error}")
+
+ brand = site["brand"]
+ products_all = load_products()
+ products = sort_products(products_all, str(site.get("product_sort", "newest")))
+ steps = load_process()
+
+ shared_index = build_shared(site, home="", asset_prefix="")
+ shared_product = build_shared(site, home="../", asset_prefix="../")
+
+ index_html = build_index(site, products, steps, shared_index, brand)
+
+ product_pages = {
+ product["slug"]: build_product_page(product, products, shared_product, brand, position)
+ for position, product in enumerate(products)
+ }
+
+ if DIST.exists():
+ shutil.rmtree(DIST)
+ (DIST / "p").mkdir(parents=True)
+ shutil.copytree(
+ ASSETS,
+ DIST / "assets",
+ ignore=shutil.ignore_patterns(".DS_Store", "*.log", "__pycache__"),
+ )
+
+ (DIST / "index.html").write_text(index_html, encoding="utf-8")
+ for slug, page in product_pages.items():
+ (DIST / "p" / f"{slug}.html").write_text(page, encoding="utf-8")
+
+ verify_dist(products)
+ print("빌드 완료: dist/")
+ print(" dist/index.html")
+ for slug in product_pages:
+ print(f" dist/p/{slug}.html")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/content/process/01-fabric.md b/content/process/01-fabric.md
new file mode 100644
index 0000000..7ec54de
--- /dev/null
+++ b/content/process/01-fabric.md
@@ -0,0 +1,7 @@
+---
+step: 1
+title: 천 고르기
+image: assets/img/craft-jogakbo.jpg
+image_alt: 여러 색 천 조각을 이어 붙인 조각보
+---
+린넨은 물에 한 번 담갔다 말려 수축을 빼고 시작합니다. 햇빛에 비춰 올이 고른 쪽, 빛을 고르게 받는 쪽을 고릅니다. 천의 폭이 좁으면 두 폭을 이어 붙입니다.
diff --git a/content/process/02-pattern.md b/content/process/02-pattern.md
new file mode 100644
index 0000000..ce9a315
--- /dev/null
+++ b/content/process/02-pattern.md
@@ -0,0 +1,5 @@
+---
+step: 2
+title: 도안 뜨기
+---
+먹지를 천 위에 놓고 목련이나 솔잎의 윤곽을 옮깁니다. 선은 연하게, 바늘이 지나갈 자리만 남깁니다. 도안이 단순할수록 천의 결이 살아납니다.
diff --git a/content/process/03-stitch.md b/content/process/03-stitch.md
new file mode 100644
index 0000000..233f200
--- /dev/null
+++ b/content/process/03-stitch.md
@@ -0,0 +1,7 @@
+---
+step: 3
+title: 한 땀 놓기
+image: assets/img/work-green-linen.jpg
+image_alt: 성긴 직물 위에 녹색 실로 놓은 자수
+---
+실은 한 번에 길게 빼지 않습니다. 한 땀 놓고, 손을 내리고, 다시 바늘을 잡습니다. 꽃잎은 안쪽에서 바깥으로, 잎은 줄기에서 끝으로 놓습니다. 하루에 두어 시간이 지나면 손목이 먼저 쉬자고 합니다.
diff --git a/content/process/04-finish.md b/content/process/04-finish.md
new file mode 100644
index 0000000..0018f95
--- /dev/null
+++ b/content/process/04-finish.md
@@ -0,0 +1,5 @@
+---
+step: 4
+title: 마감과 세탁
+---
+끝단을 접어 박음질하고, 뒤쪽 실은 짧게 정리합니다. 완성한 천은 미지근한 물에 중성세제로 단독 손세탁합니다. 그늘에서 뉘어 말리고, 다림질할 때는 천 위에 면포를 한 장 댑니다.
diff --git a/content/products/cedar-tea-mat.md b/content/products/cedar-tea-mat.md
new file mode 100644
index 0000000..ca06fea
--- /dev/null
+++ b/content/products/cedar-tea-mat.md
@@ -0,0 +1,21 @@
+---
+slug: cedar-tea-mat
+title: 솔잎 티매트
+subtitle: 창가에 놓은 작은 숲
+date: 2026-10-18
+price: 62000
+sold_out: false
+featured: false
+image: assets/img/work-green-linen.jpg
+image_alt: 성긴 아이보리 직물 위에 녹색 실로 잎을 놓은 티매트
+gallery:
+material: 린넨 100%, 면사 자수
+size: 32 × 48 cm
+care: 미지근한 물에 중성세제로 단독 손세탁
+naver_url: ""
+---
+성긴 린넨의 올 사이로 빛이 지나갑니다. 그 위에 녹색 면사로 솔잎을 길게 놓았습니다. 잎마다 방향을 조금씩 달리해, 같은 잎이 반복되지 않게 했습니다.
+
+가장자리는 접어 박음질하고, 귀퉁이마다 실을 두 번 돌려 마무리했습니다. 티포트를 올리면 잎의 방향을 따라 그림자가 생깁니다.
+
+한 점에 보름 남짓 걸렸습니다. 실의 색은 세 가지를 나란히 놓고 골랐습니다. 쓰고 나면 미지근한 물에 단독으로 손세탁하고 그늘에 뉘어 말립니다.
diff --git a/content/products/kit-first-stitch.md b/content/products/kit-first-stitch.md
new file mode 100644
index 0000000..7b88ac1
--- /dev/null
+++ b/content/products/kit-first-stitch.md
@@ -0,0 +1,21 @@
+---
+slug: kit-first-stitch
+title: 처음 한 땀 티매트 키트
+subtitle: 천과 실, 도안이 함께 오는 상자
+date: 2026-10-05
+price: 32000
+sold_out: false
+featured: false
+image: assets/img/craft-jogakbo.jpg
+image_alt: 여러 천 조각을 이어 붙인 조각보
+gallery:
+material: 린넨 천, 면사, 도안, 바늘
+size: 완성 30 × 45 cm
+care: 완성 후 미지근한 물에 단독 손세탁
+naver_url: ""
+---
+완제품이 아닙니다. 천에 도안이 옅게 찍혀 있고, 실과 바늘이 함께 들어 있습니다. 도안을 따라 한 땀씩 놓으면 30 × 45 cm 티매트 한 장이 됩니다.
+
+처음이면 가장자리부터 시작하세요. 실을 길게 빼지 않고, 한 땀 놓고 손을 한 번 내리는 리듬이 익숙해지면 안쪽으로 들어갑니다. 도안은 단순하게 그렸습니다. 천의 결을 가리지 않도록.
+
+막히면 메일로 물어보셔도 됩니다. 사진 한 장을 보내주시면 어느 자리에서 멈췄는지 함께 봅니다.
diff --git a/content/products/whitework-tea-mat.md b/content/products/whitework-tea-mat.md
new file mode 100644
index 0000000..922d554
--- /dev/null
+++ b/content/products/whitework-tea-mat.md
@@ -0,0 +1,21 @@
+---
+slug: whitework-tea-mat
+title: 목련 한 땀 티매트
+subtitle: 봄볕에 널어둔 천
+date: 2026-10-28
+price: 58000
+sold_out: false
+featured: true
+image: assets/img/work-whitework.jpg
+image_alt: 아이보리 린넨 위에 흰 실로 문양을 놓은 티매트
+gallery:
+material: 린넨 100%, 면사 자수
+size: 30 × 45 cm
+care: 미지근한 물에 중성세제로 단독 손세탁
+naver_url: ""
+---
+아이보리 린넨 위에 흰 면사로 목련 한 송이를 놓았습니다. 꽃잎의 윤곽은 실을 두 번 겹쳐 놓고, 안쪽은 올을 풀어 비웠습니다.
+
+가장자리는 실 한 올씩 풀어 올을 정리했습니다. 찻잔을 올리면 천의 결이 비쳐 보이고, 물기가 닿아도 금세 마릅니다.
+
+한 점에 열흘 남짓 걸렸습니다. 하루에 두어 시간씩, 손이 가는 만큼 천천히 놓았습니다. 쓰고 나면 미지근한 물에 단독으로 손세탁하고 그늘에 뉘어 말립니다.
diff --git a/content/site.json b/content/site.json
new file mode 100644
index 0000000..992acf8
--- /dev/null
+++ b/content/site.json
@@ -0,0 +1,36 @@
+{
+ "brand": {
+ "name": "한땀",
+ "name_en": "HAN TTAM",
+ "tagline": "천 위에, 한 땀씩.",
+ "intro": "한땀은 손으로 자수 티매트를 만드는 작은 작업실입니다. 아이보리 린넨과 무명 위에 면사로 그림을 놓습니다. 한 점을 시작하면 며칠에 걸쳐 한 땀씩 앉습니다.",
+ "since": "2026"
+ },
+ "contact": {
+ "email": "hello@hanttam.kr",
+ "instagram": "",
+ "kakao": ""
+ },
+ "shop": {
+ "store_url": "",
+ "kit_url": "",
+ "kit_note": "린넨 천, 면사, 도안, 바늘 — 처음 시작하는 사람에게 필요한 것들"
+ },
+ "process_intro": "천을 고르고, 도안을 옮기고, 한 땀씩 놓아 마감하기까지. 서두르지 않고 네 단계로 만납니다.",
+ "shipping": [
+ "주문 후 3~5일 이내 제작·발송",
+ "택배비 3,000원 / 5만원 이상 무료"
+ ],
+ "care": [
+ "미지근한 물에 중성세제로 단독 손세탁",
+ "그늘에서 뉘어 말리기",
+ "다림질은 천 위에 면포를 대고"
+ ],
+ "product_sort": "newest",
+ "footer_note": "사업자등록번호와 통신판매업 신고 번호는 추후 기재합니다.",
+ "image_credits": [
+ {"title": "Linen towel with drawn threadwork and whitework embroidery", "author": "Wikimedia Commons", "license": "Public domain"},
+ {"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"}
+ ]
+}
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
new file mode 100755
index 0000000..b9a62d7
--- /dev/null
+++ b/scripts/deploy.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+cd "$(dirname "$0")/.."
+
+REMOTE="admin@100.101.79.24"
+REMOTE_DIR="/share/CACHEDEV8_DATA/web/www/teamat/"
+SITE_URL="https://home.lala.dedyn.io/teamat/"
+
+python3 build.py
+
+echo
+echo "배포: ${REMOTE}:${REMOTE_DIR}"
+rsync -az --delete dist/ "${REMOTE}:${REMOTE_DIR}"
+
+status="$(curl -s -o /dev/null -w '%{http_code}' "$SITE_URL")"
+if [ "$status" != "200" ]; then
+ echo "배포 후 확인 실패: ${SITE_URL} (HTTP ${status})" >&2
+ exit 1
+fi
+
+echo "배포 완료: ${SITE_URL} (HTTP ${status})"
diff --git a/scripts/preview.sh b/scripts/preview.sh
new file mode 100755
index 0000000..5446e8d
--- /dev/null
+++ b/scripts/preview.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+cd "$(dirname "$0")/.."
+
+python3 build.py
+echo
+echo "미리보기: http://localhost:8080"
+python3 -m http.server 8080 --directory dist
diff --git a/scripts/rollback.sh b/scripts/rollback.sh
new file mode 100755
index 0000000..de527e7
--- /dev/null
+++ b/scripts/rollback.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+cd "$(dirname "$0")/.."
+
+if [ "$#" -eq 0 ]; then
+ echo "마지막 커밋을 되돌립니다."
+ git revert --no-edit HEAD
+else
+ echo "${1} 커밋을 되돌립니다."
+ git revert --no-edit "$1"
+fi
+
+python3 build.py
+bash scripts/deploy.sh
diff --git a/templates/base.html b/templates/base.html
new file mode 100644
index 0000000..d7343e9
--- /dev/null
+++ b/templates/base.html
@@ -0,0 +1,65 @@
+
+
+
+
+
+ {{title}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 본문으로 건너뛰기
+
+
+
+
+ {{content}}
+
+
+
+
+
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..0093da1
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,128 @@
+
+
+
+
천 위에, 한 땀씩.
+
{{intro}}
+
+
자수 티매트 · 린넨 · 손바느질 · {{since}}
+
+
+
+
+
+ {{hero_title}}
+ {{hero_material}}
+
+
+
+
+
+
+
+
+
+
+ PROCESS
+ 한 점이 되기까지
+ {{process_intro}}
+
+
+
+ {{#process}}
+
+ {{step}}
+
+
{{title}}
+ {{body_html}}
+
+ {{image_html}}
+
+ {{/process}}
+
+
+
+
+
+
+
+
KIT
+
{{kit_title}}
+
{{kit_subtitle}}
+ {{kit_excerpt}}
+
{{kit_note}}
+
{{kit_price}}
+ {{kit_action}}
+
키트 자세히 보기 →
+
+
+
+
+
+
+
+
+
+
+
+
+
+
배송
+
+ {{#shipping}}{{text}} {{/shipping}}
+
+
+
+
세탁
+
+ {{#care}}{{text}} {{/care}}
+
+
+
+
+
{{store_note}}
+
+
+
+
diff --git a/templates/product.html b/templates/product.html
new file mode 100644
index 0000000..e498534
--- /dev/null
+++ b/templates/product.html
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
{{title}}
+
{{subtitle}}
+
{{price_text}}
+ {{sold_html}}
+ {{buy_html}}
+
+
+
+
소재
+ {{material}}
+
+
+
규격
+ {{size}}
+
+
+
세탁
+ {{care}}
+
+
+
+
+
+
+
STORY
+
+ {{body_html}}
+
+ {{gallery_html}}
+
+
+
+