Merge branch 'feat/cafe24-list-thumb'
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
## 기능
|
## 기능
|
||||||
|
|
||||||
- 카페24 관리자에 들어가지 않고 상품 상세페이지(description HTML) 조회·편집·즉시적용·예약적용·버전 이력.
|
- 카페24 관리자에 들어가지 않고 상품 상세페이지(description HTML) 조회·편집·즉시적용·예약적용·버전 이력.
|
||||||
- 3분할 화면(목록 | HTML 편집기 | 상품 정보 패널).
|
- 3분할 화면(목록 | HTML 편집기 | 상품 정보 패널). 목록에 64x64 대표 이미지(`tiny_image`, 없으면 `detail_image`).
|
||||||
- HTML 편집기에서 `<img>` 태그에 마우스를 올리면 태그를 오렌지색으로 칠하고 화면 오른쪽에 폭 500px·창 높이로 파일명과 미리보기(상대 경로는 `CAFE24_SHOP_URL` 루트 기준, 색칠 한도 `HL_LIMIT` 초과 소스는 미동작).
|
- HTML 편집기에서 `<img>` 태그에 마우스를 올리면 태그를 오렌지색으로 칠하고 화면 오른쪽에 폭 500px·창 높이로 파일명과 미리보기(상대 경로는 `CAFE24_SHOP_URL` 루트 기준, 색칠 한도 `HL_LIMIT` 초과 소스는 미동작).
|
||||||
- HTML 편집기에서 커서가 `<img>` 태그 안 어디에 있든 Ctrl+↑/↓ 로 `src` 파일명(`.jpg`/`.gif`/`.png`) 번호 변경. 없음 → `_2` → `_3` …, 이미 `_숫자` 면 다음 숫자부터. 내릴 때는 원래 번호(없었으면 원래 이름) 아래로 안 감 — 다른 편집이 끼거나 다른 이미지로 옮기면 그때 번호가 새 원래 번호.
|
- HTML 편집기에서 커서가 `<img>` 태그 안 어디에 있든 Ctrl+↑/↓ 로 `src` 파일명(`.jpg`/`.gif`/`.png`) 번호 변경. 없음 → `_2` → `_3` …, 이미 `_숫자` 면 다음 숫자부터. 내릴 때는 원래 번호(없었으면 원래 이름) 아래로 안 감 — 다른 편집이 끼거나 다른 이미지로 옮기면 그때 번호가 새 원래 번호.
|
||||||
- 정보 패널(`routes_product_info.py`, `_side.html`)에서 상품명·판매가·공급가·소비자가, 대표이미지, 옵션(생성/이름·썸네일·표시방식 수정/삭제)·품목(자체코드·추가금액·진열·판매) 수정.
|
- 정보 패널(`routes_product_info.py`, `_side.html`)에서 상품명·판매가·공급가·소비자가, 대표이미지, 옵션(생성/이름·썸네일·표시방식 수정/삭제)·품목(자체코드·추가금액·진열·판매) 수정.
|
||||||
|
|||||||
@@ -133,10 +133,11 @@ def _iso(value: Any) -> str:
|
|||||||
|
|
||||||
|
|
||||||
def _row_for_list(raw: dict[str, Any]) -> dict[str, Any]:
|
def _row_for_list(raw: dict[str, Any]) -> dict[str, Any]:
|
||||||
"""왼쪽 목록에 쓸 필드만 — 상품번호·상품명·진열·판매·최근수정."""
|
"""왼쪽 목록에 쓸 필드만 — 상품번호·대표 이미지·상품명·진열·판매·최근수정."""
|
||||||
normalized = products.normalize_product(raw)
|
normalized = products.normalize_product(raw)
|
||||||
return {
|
return {
|
||||||
"product_no": normalized["product_no"],
|
"product_no": normalized["product_no"],
|
||||||
|
"thumb": str(raw.get("tiny_image") or raw.get("detail_image") or ""),
|
||||||
"product_name": normalized["product_name"],
|
"product_name": normalized["product_name"],
|
||||||
"display": normalized["display"],
|
"display": normalized["display"],
|
||||||
"selling": normalized["selling"],
|
"selling": normalized["selling"],
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{# 카페24 모듈 공용 상단 탭. active_tab: products | design:pc_detail | design:mobile_detail | design:swiper | schedules | system #}
|
{# 카페24 모듈 공용 상단 탭. active_tab: products | design:pc_detail | design:mobile_detail | design:swiper | schedules | system #}
|
||||||
<div class="erp-page-actions" style="display:flex;gap:8px;flex-wrap:wrap;align-items:center;">
|
<div class="erp-page-actions" style="display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:10px;">
|
||||||
<a class="erp-btn {% if active_tab=='products' %}erp-btn-primary{% else %}erp-btn-outline{% endif %}"
|
<a class="erp-btn {% if active_tab=='products' %}erp-btn-primary{% else %}erp-btn-outline{% endif %}"
|
||||||
href="/cafe24/">상품관리</a>
|
href="/cafe24/">상품관리</a>
|
||||||
<a class="erp-btn {% if active_tab=='design:pc_detail' %}erp-btn-primary{% else %}erp-btn-outline{% endif %}"
|
<a class="erp-btn {% if active_tab=='design:pc_detail' %}erp-btn-primary{% else %}erp-btn-outline{% endif %}"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends "erp_base.html" %}
|
{% extends "erp_base.html" %}
|
||||||
|
|
||||||
{% block head_extra %}
|
{% block head_extra %}
|
||||||
<link rel="stylesheet" href="/static/cafe24.css?v=20261109a" />
|
<link rel="stylesheet" href="/static/cafe24.css?v=20261110a" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends "erp_base.html" %}
|
{% extends "erp_base.html" %}
|
||||||
|
|
||||||
{% block head_extra %}
|
{% block head_extra %}
|
||||||
<link rel="stylesheet" href="/static/cafe24.css?v=20261109a" />
|
<link rel="stylesheet" href="/static/cafe24.css?v=20261110a" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
@@ -45,6 +45,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="cf24-col-no" data-sort-key="no" data-sort-type="num">번호</th>
|
<th class="cf24-col-no" data-sort-key="no" data-sort-type="num">번호</th>
|
||||||
|
<th class="cf24-col-thumb"></th>
|
||||||
<th class="cf24-col-name" data-sort-key="name" data-sort-type="text">상품명</th>
|
<th class="cf24-col-name" data-sort-key="name" data-sort-type="text">상품명</th>
|
||||||
<th class="cf24-col-flag" data-sort-key="display" data-sort-type="num">진열</th>
|
<th class="cf24-col-flag" data-sort-key="display" data-sort-type="num">진열</th>
|
||||||
<th class="cf24-col-flag" data-sort-key="selling" data-sort-type="num">판매</th>
|
<th class="cf24-col-flag" data-sort-key="selling" data-sort-type="num">판매</th>
|
||||||
@@ -60,6 +61,7 @@
|
|||||||
data-selling="{{ 1 if r.selling else 0 }}"
|
data-selling="{{ 1 if r.selling else 0 }}"
|
||||||
data-updated="{{ r.updated_date }}">
|
data-updated="{{ r.updated_date }}">
|
||||||
<td class="cf24-col-no">{{ r.product_no }}</td>
|
<td class="cf24-col-no">{{ r.product_no }}</td>
|
||||||
|
<td class="cf24-col-thumb"><img class="cf24-thumb" {% if r.thumb %}src="{{ r.thumb }}"{% endif %} loading="lazy" alt="" /></td>
|
||||||
<td class="cf24-col-name" title="{{ r.product_name }}">
|
<td class="cf24-col-name" title="{{ r.product_name }}">
|
||||||
<a href="/cafe24/?{{ qs }}selected={{ r.product_no }}">{{ r.product_name }}</a>
|
<a href="/cafe24/?{{ qs }}selected={{ r.product_no }}">{{ r.product_name }}</a>
|
||||||
</td>
|
</td>
|
||||||
@@ -967,6 +969,8 @@
|
|||||||
if (link) { link.href = p.detail_image; link.classList.remove("is-hidden"); }
|
if (link) { link.href = p.detail_image; link.classList.remove("is-hidden"); }
|
||||||
if (empty) empty.classList.add("is-hidden");
|
if (empty) empty.classList.add("is-hidden");
|
||||||
}
|
}
|
||||||
|
var thumb = document.querySelector('#cf24-list tr.cf24-row[data-no="' + no + '"] .cf24-thumb');
|
||||||
|
if (thumb && (p.tiny_image || p.detail_image)) thumb.src = bust(p.tiny_image || p.detail_image);
|
||||||
root.querySelectorAll("[data-image-key]").forEach(function (el) {
|
root.querySelectorAll("[data-image-key]").forEach(function (el) {
|
||||||
var v = p[el.dataset.imageKey];
|
var v = p[el.dataset.imageKey];
|
||||||
if (!v) return;
|
if (!v) return;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends "erp_base.html" %}
|
{% extends "erp_base.html" %}
|
||||||
|
|
||||||
{% block head_extra %}
|
{% block head_extra %}
|
||||||
<link rel="stylesheet" href="/static/cafe24.css?v=20261109a" />
|
<link rel="stylesheet" href="/static/cafe24.css?v=20261110a" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends "erp_base.html" %}
|
{% extends "erp_base.html" %}
|
||||||
|
|
||||||
{% block head_extra %}
|
{% block head_extra %}
|
||||||
<link rel="stylesheet" href="/static/cafe24.css?v=20261109a" />
|
<link rel="stylesheet" href="/static/cafe24.css?v=20261110a" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
.erp-page {
|
.erp-page {
|
||||||
max-width: none;
|
max-width: none;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
padding-top: 10px; /* 상단 탭 위 여백 — 아래 여백은 _nav.html 의 margin-bottom 과 같은 10px */
|
||||||
}
|
}
|
||||||
|
|
||||||
.cf24-card {
|
.cf24-card {
|
||||||
@@ -123,12 +124,14 @@
|
|||||||
|
|
||||||
.cf24-list-table tbody td {
|
.cf24-list-table tbody td {
|
||||||
padding: 6px 4px;
|
padding: 6px 4px;
|
||||||
vertical-align: top;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 목록 폭 550px 기준. 고정폭을 뺀 나머지(약 290px)가 상품명 몫이다.
|
/* 목록 폭 550px 기준. 고정폭을 뺀 나머지(약 290px)가 상품명 몫이다.
|
||||||
진열/판매 칸은 제목(2글자) + 정렬 화살표가 들어갈 만큼만. */
|
진열/판매 칸은 제목(2글자) + 정렬 화살표가 들어갈 만큼만. */
|
||||||
.cf24-col-no { width: 40px; text-align: right; color: var(--color-midtone-gray, #737373); }
|
.cf24-col-no { width: 40px; text-align: right; color: var(--color-midtone-gray, #737373); }
|
||||||
|
.cf24-col-thumb { width: 64px; box-sizing: content-box; }
|
||||||
|
.cf24-thumb { display: block; width: 64px; height: 64px; object-fit: contain; background: var(--color-ghost-gray, #f2f2f2); }
|
||||||
.cf24-col-flag { width: 40px; text-align: center; }
|
.cf24-col-flag { width: 40px; text-align: center; }
|
||||||
.cf24-col-date { width: 78px; white-space: nowrap; color: var(--color-midtone-gray, #737373); }
|
.cf24-col-date { width: 78px; white-space: nowrap; color: var(--color-midtone-gray, #737373); }
|
||||||
.cf24-col-name { word-break: break-word; }
|
.cf24-col-name { word-break: break-word; }
|
||||||
@@ -876,7 +879,8 @@
|
|||||||
/* 목록은 320~460px 사이에서 **먼저** 줄어들고(편집기 640px 를 남기는 폭), 편집기가 남는 폭을, 패널은 380px 고정.
|
/* 목록은 320~460px 사이에서 **먼저** 줄어들고(편집기 640px 를 남기는 폭), 편집기가 남는 폭을, 패널은 380px 고정.
|
||||||
minmax(320px, 460px) 였을 때는 목록이 460px 를 먼저 차지해 1440폭(세로 모니터)에서 편집기가 288px 로 눌렸다(2026-10-15).
|
minmax(320px, 460px) 였을 때는 목록이 460px 를 먼저 차지해 1440폭(세로 모니터)에서 편집기가 288px 로 눌렸다(2026-10-15).
|
||||||
1920px: 목록 460 → 편집기 약 850px. 1601px: 목록 320 → 편집기 약 610px. 그보다 좁으면 아래 2분할. */
|
1920px: 목록 460 → 편집기 약 850px. 1601px: 목록 320 → 편집기 약 610px. 그보다 좁으면 아래 2분할. */
|
||||||
grid-template-columns: clamp(320px, calc(100% - 380px - 24px - 640px), 460px) minmax(0, 1fr) 380px;
|
/* 대표 이미지 열(64+패딩 8) 만큼 목록 상·하한을 72px 올렸다 — 상품명 칸 폭은 그대로. */
|
||||||
|
grid-template-columns: clamp(392px, calc(100% - 380px - 24px - 640px), 532px) minmax(0, 1fr) 380px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 2분할(정보 패널을 편집기 아래로) 경계 — 가로 화면은 예전대로 1360px 이하, **세로 화면은 1600px 이하**(2026-10-15).
|
/* 2분할(정보 패널을 편집기 아래로) 경계 — 가로 화면은 예전대로 1360px 이하, **세로 화면은 1600px 이하**(2026-10-15).
|
||||||
@@ -886,7 +890,7 @@
|
|||||||
/* 폭이 모자라면 정보 패널을 편집기 아래로 내린다(목록은 그대로 왼쪽).
|
/* 폭이 모자라면 정보 패널을 편집기 아래로 내린다(목록은 그대로 왼쪽).
|
||||||
아래 칸은 높이를 제한해 편집기가 너무 눌리지 않게 한다(패널 안에서 스크롤). */
|
아래 칸은 높이를 제한해 편집기가 너무 눌리지 않게 한다(패널 안에서 스크롤). */
|
||||||
.cf24-split.cf24-split-3 {
|
.cf24-split.cf24-split-3 {
|
||||||
grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
|
grid-template-columns: minmax(372px, 452px) minmax(0, 1fr);
|
||||||
grid-template-areas: "list editor" "list side";
|
grid-template-areas: "list editor" "list side";
|
||||||
grid-template-rows: minmax(0, 1fr) auto;
|
grid-template-rows: minmax(0, 1fr) auto;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user