- © 2024 Studio Archive Catalog
- •
- Personal Sales Page
+ © 2026 sori.studio
-
diff --git a/scripts/app.js b/scripts/app.js
index 971647a..1ebc43f 100644
--- a/scripts/app.js
+++ b/scripts/app.js
@@ -81,6 +81,28 @@ let activeStatuses = new Set(
.map(([status]) => status),
);
+function getStatusChipClass(status, isActive) {
+ const base = STATUS_COLOR[status] ?? '';
+
+ if (isActive) {
+ return `
+ ${base}
+ opacity-100
+ shadow-sm
+ `;
+ }
+
+ // 🔥 비활성
+ return `
+ bg-slate-50
+ text-slate-400
+ border-slate-200
+ opacity-30
+ grayscale
+ hover:opacity-50
+ `;
+}
+
function renderStatusChips() {
const container = document.getElementById('status-chips');
if (!container) return;
@@ -89,21 +111,20 @@ function renderStatusChips() {
STATUS_FILTERS.filter((f) => f.visible).forEach(({ key, label }) => {
const isActive = activeStatuses.has(key);
- const baseColor = STATUS_COLOR[key] ?? '';
const chip = document.createElement('button');
-
chip.className = `
- status-chip px-4 py-2 rounded-full text-sm font-medium transition
- border
- ${isActive ? baseColor : 'bg-slate-50 text-slate-600 border-slate-200'}
- `;
+ status-chip
+ px-4 py-2
+ rounded-full
+ text-sm font-medium
+ transition-all duration-200
+ border
+ ${getStatusChipClass(key, isActive)}
+ `;
chip.textContent = label;
-
- chip.onclick = () => {
- toggleStatusFilter(key);
- };
+ chip.onclick = () => toggleStatusFilter(key);
container.appendChild(chip);
});
@@ -382,11 +403,23 @@ function renderPagination() {
if (!container) return;
const totalPages = Math.ceil(visibleProducts.length / ITEMS_PER_PAGE);
- let html = `
`;
+ let html = `
`;
for (let i = 1; i <= totalPages; i++) {
html += `
`;
}
- html += `
`;
+ html += `
`;
container.innerHTML = html;
}
diff --git a/style/tailwind.css b/style/tailwind.css
index 471387a..a5525e2 100644
--- a/style/tailwind.css
+++ b/style/tailwind.css
@@ -398,6 +398,9 @@
.h-2 {
height: calc(var(--spacing) * 2);
}
+ .h-5 {
+ height: calc(var(--spacing) * 5);
+ }
.h-9 {
height: calc(var(--spacing) * 9);
}
@@ -446,6 +449,9 @@
.w-4 {
width: calc(var(--spacing) * 4);
}
+ .w-5 {
+ width: calc(var(--spacing) * 5);
+ }
.w-6 {
width: calc(var(--spacing) * 6);
}
@@ -1006,6 +1012,9 @@
.underline {
text-decoration-line: underline;
}
+ .opacity-30 {
+ opacity: 30%;
+ }
.opacity-70 {
opacity: 70%;
}
@@ -1165,6 +1174,13 @@
}
}
}
+ .hover\:opacity-50 {
+ &:hover {
+ @media (hover: hover) {
+ opacity: 50%;
+ }
+ }
+ }
.hover\:opacity-100 {
&:hover {
@media (hover: hover) {