작품 목록 분리: 판매 중 / 판매 완료(카톡 제작 문의 버튼)
This commit is contained in:
1 parent
aba5d4d6e2
commit
b803ab4efd
6 files changed
+157
-8
No files matched your search
+73
-3
@@ -25,8 +25,8 @@
|
||||
<section class="section works" id="works" aria-labelledby="works-title">
|
||||
<div class="shell">
|
||||
<header class="section-head">
|
||||
<p class="label">WORKS</p>
|
||||
<h2 id="works-title">작품</h2>
|
||||
<p class="label">FOR SALE</p>
|
||||
<h2 id="works-title">판매 중인 작품</h2>
|
||||
<p class="section-note">{{works_note}}</p>
|
||||
</header>
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
<h3>{{title}}</h3>
|
||||
<p class="work-sub">{{subtitle}}</p>
|
||||
<p class="work-price">{{price_text}}</p>
|
||||
{{sold_html}}
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
@@ -50,6 +49,77 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section soldout" id="soldout" aria-labelledby="soldout-title">
|
||||
<div class="shell">
|
||||
<header class="section-head">
|
||||
<p class="label">SOLD OUT</p>
|
||||
<h2 id="soldout-title">지난 작품 — 제작 문의</h2>
|
||||
<p class="section-note">{{sold_note}}</p>
|
||||
</header>
|
||||
|
||||
{{sold_empty_html}}
|
||||
<div class="works-grid">
|
||||
{{#sold_products}}
|
||||
<article class="work is-sold">
|
||||
<a class="work-link" href="{{href}}">
|
||||
<figure class="work-figure">
|
||||
<img src="{{image}}" alt="{{alt}}" width="{{width}}" height="{{height}}" loading="lazy" decoding="async">
|
||||
</figure>
|
||||
<div class="work-caption">
|
||||
<h3>{{title}}</h3>
|
||||
<p class="work-sub">{{subtitle}}</p>
|
||||
<p class="work-price">{{price_text}}</p>
|
||||
<p class="work-sold">판매 완료</p>
|
||||
</div>
|
||||
</a>
|
||||
<button class="inquiry-btn" type="button" data-inquiry="{{inquiry_title}}">카톡으로 제작 문의</button>
|
||||
<p class="inquiry-note">재고가 없어 주문을 받은 뒤 제작합니다. 아래 문구가 복사되니 카톡 대화창에 붙여넣어 주세요.</p>
|
||||
</article>
|
||||
{{/sold_products}}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
var KAKAO = "{{kakao_url}}";
|
||||
var TEMPLATE = function (title) {
|
||||
return title + " 재제작 문의드립니다.
|
||||
|
||||
"
|
||||
+ "- 원하는 시기:
|
||||
"
|
||||
+ "- 크기·색상:
|
||||
"
|
||||
+ "- 문의 내용: ";
|
||||
};
|
||||
document.querySelectorAll("[data-inquiry]").forEach(function (btn) {
|
||||
btn.addEventListener("click", function () {
|
||||
var title = btn.getAttribute("data-inquiry") || "작품";
|
||||
var text = TEMPLATE(title);
|
||||
var note = btn.parentElement.querySelector(".inquiry-note");
|
||||
var done = function (copied) {
|
||||
if (note) {
|
||||
note.textContent = copied
|
||||
? "문의 문구를 복사했습니다. 카톡 대화창에 붙여넣어 보내 주세요."
|
||||
: "카톡에서 새 대화를 열고 아래 내용을 적어 보내 주세요: " + text;
|
||||
}
|
||||
};
|
||||
if (navigator.clipboard && navigator.clipboard.writeText) {
|
||||
navigator.clipboard.writeText(text).then(function () { done(true); }, function () { done(false); });
|
||||
} else {
|
||||
done(false);
|
||||
}
|
||||
if (KAKAO) {
|
||||
window.open(KAKAO, "_blank", "noopener");
|
||||
} else {
|
||||
window.location.href = "kakaotalk://";
|
||||
}
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
<section class="section process" id="process" aria-labelledby="process-title">
|
||||
<div class="shell">
|
||||
<header class="section-head">
|
||||
|
||||
Reference in new issue
Block a user