Spaces:
Running
Running
Fix catalogue: CSS chồng chéo, thêm OCR cho Canzy/Demax/GROB, tabs đẹp hơn
Browse files- catalogue_ocr.json +0 -0
- index.html +15 -5
catalogue_ocr.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width,initial-scale=1">
|
| 6 |
<title>MALLOCA | Smart Kitchen - Smart Life</title>
|
| 7 |
-
<meta name="description" content="
|
| 8 |
<link rel="icon" href="https://bizweb.dktcdn.net/100/567/847/themes/1041000/assets/favicon.png">
|
| 9 |
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet">
|
| 10 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
|
@@ -108,6 +108,9 @@ img{max-width:100%;display:block}a{text-decoration:none;color:inherit}
|
|
| 108 |
.pgb:hover{border-color:var(--p);color:var(--p)}
|
| 109 |
.pgb.active{background:var(--p);color:#fff;border-color:var(--p)}
|
| 110 |
.pgb:disabled{opacity:.3;cursor:default}
|
|
|
|
|
|
|
|
|
|
| 111 |
.pg-dots{display:flex;align-items:center;font-size:.8rem;color:var(--g);padding:0 4px}
|
| 112 |
|
| 113 |
/* ========== DETAIL VIEW ========== */
|
|
@@ -481,7 +484,7 @@ textarea.form-input{height:120px;resize:vertical}
|
|
| 481 |
<div class="page-section" id="page-catalogue">
|
| 482 |
<div class="section-header" style="text-align:center;margin-bottom:10px">
|
| 483 |
<h2 style="font-size:1.8rem;font-weight:800;color:var(--d)"><i class="fas fa-book-open" style="color:var(--a);margin-right:10px"></i>Catalogue <span style="color:var(--a)">Sản phẩm</span></h2>
|
| 484 |
-
<p style="color:var(--g);font-size:.9rem;max-width:550px;margin:10px auto 0">
|
| 485 |
<div style="max-width:480px;margin:16px auto 0;position:relative">
|
| 486 |
<i class="fas fa-search" style="position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--g);font-size:.85rem"></i>
|
| 487 |
<input type="text" id="catSearch" placeholder="Tìm trong catalogue... (tên SP, mã SP, thông số...)" oninput="searchCatalogue()" style="width:100%;padding:10px 14px 10px 40px;border:2px solid var(--gl);border-radius:12px;font-size:.85rem;font-family:inherit;outline:none">
|
|
@@ -489,7 +492,7 @@ textarea.form-input{height:120px;resize:vertical}
|
|
| 489 |
</div>
|
| 490 |
</div>
|
| 491 |
<!-- Tab selector -->
|
| 492 |
-
<div id="catTabs"
|
| 493 |
<!-- Catalogue content renders here -->
|
| 494 |
<div id="catContent"></div>
|
| 495 |
</div>
|
|
@@ -628,7 +631,7 @@ textarea.form-input{height:120px;resize:vertical}
|
|
| 628 |
|
| 629 |
<footer class="footer"><div class="container">
|
| 630 |
<div class="footer-grid">
|
| 631 |
-
<div class="footer-brand"><div class="logo-name" style="color:#fff;font-size:1.1rem">MALL<span style="color:var(--a)">OCA</span> & EURO<span style="color:var(--a)">GOLD</span> & GR<span style="color:var(--a)">OB</span> & CAN<span style="color:var(--a)">ZY</span> & DE<span style="color:var(--a)">MAX</span></div><p>
|
| 632 |
<div class="social-links"><a href="https://www.facebook.com/CongTyMalloca" target="_blank"><i class="fab fa-facebook-f"></i></a><a href="https://www.youtube.com/@mallocakitchenware" target="_blank"><i class="fab fa-youtube"></i></a><a href="https://www.tiktok.com/@mallocavietnam" target="_blank"><i class="fab fa-tiktok"></i></a></div></div>
|
| 633 |
<div><h4>Thiết Bị Nhà Bếp</h4><ul class="footer-links"><li><a href="javascript:void(0)" onclick="setCat('may-hut-khoi-khu-mui')">Máy hút khói khử mùi</a></li><li><a href="javascript:void(0)" onclick="setCat('bep-dien-tu-bep-gas')">Bếp điện từ, bếp gas</a></li><li><a href="javascript:void(0)" onclick="setCat('lo-nuong')">Lò nướng, lò hấp</a></li><li><a href="javascript:void(0)" onclick="setCat('chau-rua-chen')">Chậu rửa chén</a></li><li><a href="javascript:void(0)" onclick="setCat('voi-rua-chen')">Vòi rửa chén</a></li></ul></div>
|
| 634 |
<div><h4>Thêm</h4><ul class="footer-links"><li><a href="javascript:void(0)" onclick="setCat('tu-lanh-tu-ruou')">Tủ lạnh, tủ rượu</a></li><li><a href="javascript:void(0)" onclick="setCat('may-rua-chen-may-say-chen')">Máy rửa chén</a></li><li><a href="javascript:void(0)" onclick="setCat('thiet-bi-gia-dung-nho')">Gia dụng nhỏ</a></li><li><a href="javascript:void(0)" onclick="showPage('catalogue')">Catalogue</a></li><li><a href="javascript:void(0)" onclick="toggleChat()">🤖 Tư Vấn AI</a></li></ul></div>
|
|
@@ -873,7 +876,14 @@ catLoaded=true;
|
|
| 873 |
function initCatTabs(){
|
| 874 |
let tabs=document.getElementById('catTabs');
|
| 875 |
if(!tabs||!CAT_LIST.length)return;
|
| 876 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 877 |
}
|
| 878 |
|
| 879 |
function loadCatalogue(idx){
|
|
|
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width,initial-scale=1">
|
| 6 |
<title>MALLOCA | Smart Kitchen - Smart Life</title>
|
| 7 |
+
<meta name="description" content="2134 sản phẩm thiết bị nhà bếp & khóa thông minh Malloca, Eurogold, Grob, Canzy & Demax chính hãng — đầy đủ thông số, hình ảnh, mô tả chi tiết.">
|
| 8 |
<link rel="icon" href="https://bizweb.dktcdn.net/100/567/847/themes/1041000/assets/favicon.png">
|
| 9 |
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet">
|
| 10 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
|
|
|
| 108 |
.pgb:hover{border-color:var(--p);color:var(--p)}
|
| 109 |
.pgb.active{background:var(--p);color:#fff;border-color:var(--p)}
|
| 110 |
.pgb:disabled{opacity:.3;cursor:default}
|
| 111 |
+
#catTabs .pgb{width:auto;height:auto;padding:8px 18px;border-radius:20px;font-size:.8rem;gap:6px}
|
| 112 |
+
#catTabs{display:flex;gap:8px;overflow-x:auto;padding-bottom:8px;justify-content:flex-start;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
|
| 113 |
+
@media(max-width:768px){#catTabs .pgb{padding:7px 12px;font-size:.72rem}}
|
| 114 |
.pg-dots{display:flex;align-items:center;font-size:.8rem;color:var(--g);padding:0 4px}
|
| 115 |
|
| 116 |
/* ========== DETAIL VIEW ========== */
|
|
|
|
| 484 |
<div class="page-section" id="page-catalogue">
|
| 485 |
<div class="section-header" style="text-align:center;margin-bottom:10px">
|
| 486 |
<h2 style="font-size:1.8rem;font-weight:800;color:var(--d)"><i class="fas fa-book-open" style="color:var(--a);margin-right:10px"></i>Catalogue <span style="color:var(--a)">Sản phẩm</span></h2>
|
| 487 |
+
<p style="color:var(--g);font-size:.9rem;max-width:550px;margin:10px auto 0">10 bộ catalogue — tìm kiếm theo văn bản trong ảnh</p>
|
| 488 |
<div style="max-width:480px;margin:16px auto 0;position:relative">
|
| 489 |
<i class="fas fa-search" style="position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--g);font-size:.85rem"></i>
|
| 490 |
<input type="text" id="catSearch" placeholder="Tìm trong catalogue... (tên SP, mã SP, thông số...)" oninput="searchCatalogue()" style="width:100%;padding:10px 14px 10px 40px;border:2px solid var(--gl);border-radius:12px;font-size:.85rem;font-family:inherit;outline:none">
|
|
|
|
| 492 |
</div>
|
| 493 |
</div>
|
| 494 |
<!-- Tab selector -->
|
| 495 |
+
<div id="catTabs"></div>
|
| 496 |
<!-- Catalogue content renders here -->
|
| 497 |
<div id="catContent"></div>
|
| 498 |
</div>
|
|
|
|
| 631 |
|
| 632 |
<footer class="footer"><div class="container">
|
| 633 |
<div class="footer-grid">
|
| 634 |
+
<div class="footer-brand"><div class="logo-name" style="color:#fff;font-size:1.1rem">MALL<span style="color:var(--a)">OCA</span> & EURO<span style="color:var(--a)">GOLD</span> & GR<span style="color:var(--a)">OB</span> & CAN<span style="color:var(--a)">ZY</span> & DE<span style="color:var(--a)">MAX</span></div><p>2134 sản phẩm với dữ liệu chi tiết đầy đủ — hình ảnh, thông số kỹ thuật, mô tả, tính năng — tích hợp từ malloca.com, eurogold.vn, catalogue Grob, Canzy & Demax.</p>
|
| 635 |
<div class="social-links"><a href="https://www.facebook.com/CongTyMalloca" target="_blank"><i class="fab fa-facebook-f"></i></a><a href="https://www.youtube.com/@mallocakitchenware" target="_blank"><i class="fab fa-youtube"></i></a><a href="https://www.tiktok.com/@mallocavietnam" target="_blank"><i class="fab fa-tiktok"></i></a></div></div>
|
| 636 |
<div><h4>Thiết Bị Nhà Bếp</h4><ul class="footer-links"><li><a href="javascript:void(0)" onclick="setCat('may-hut-khoi-khu-mui')">Máy hút khói khử mùi</a></li><li><a href="javascript:void(0)" onclick="setCat('bep-dien-tu-bep-gas')">Bếp điện từ, bếp gas</a></li><li><a href="javascript:void(0)" onclick="setCat('lo-nuong')">Lò nướng, lò hấp</a></li><li><a href="javascript:void(0)" onclick="setCat('chau-rua-chen')">Chậu rửa chén</a></li><li><a href="javascript:void(0)" onclick="setCat('voi-rua-chen')">Vòi rửa chén</a></li></ul></div>
|
| 637 |
<div><h4>Thêm</h4><ul class="footer-links"><li><a href="javascript:void(0)" onclick="setCat('tu-lanh-tu-ruou')">Tủ lạnh, tủ rượu</a></li><li><a href="javascript:void(0)" onclick="setCat('may-rua-chen-may-say-chen')">Máy rửa chén</a></li><li><a href="javascript:void(0)" onclick="setCat('thiet-bi-gia-dung-nho')">Gia dụng nhỏ</a></li><li><a href="javascript:void(0)" onclick="showPage('catalogue')">Catalogue</a></li><li><a href="javascript:void(0)" onclick="toggleChat()">🤖 Tư Vấn AI</a></li></ul></div>
|
|
|
|
| 876 |
function initCatTabs(){
|
| 877 |
let tabs=document.getElementById('catTabs');
|
| 878 |
if(!tabs||!CAT_LIST.length)return;
|
| 879 |
+
const icons={'bep':'fa-fire','may-hut':'fa-wind','lo':'fa-temperature-high','chau':'fa-sink','khac':'fa-box','gia':'fa-tags','master':'fa-layer-group','grob':'fa-cogs','canzy':'fa-kitchen-set','demax':'fa-lock'};
|
| 880 |
+
tabs.innerHTML=CAT_LIST.map((c,i)=>{
|
| 881 |
+
let slug=c.slug||'';
|
| 882 |
+
let icon='fa-book-open';
|
| 883 |
+
for(let k in icons){if(slug.includes(k)){icon=icons[k];break;}}
|
| 884 |
+
let pCount=c.pages?c.pages.length:0;
|
| 885 |
+
return `<button class="pgb${i===0?' active':''}" onclick="loadCatalogue(${i})" style="white-space:nowrap"><i class="fas ${icon}"></i> ${c.name||'Catalogue '+(i+1)} <span style="opacity:.6;font-size:.65rem">(${pCount})</span></button>`;
|
| 886 |
+
}).join('');
|
| 887 |
}
|
| 888 |
|
| 889 |
function loadCatalogue(idx){
|