reset repo
This commit is contained in:
parent
7f70170fe1
commit
9cdef853c4
631 changed files with 4941 additions and 16827 deletions
260
preview/catalog.html
Normal file
260
preview/catalog.html
Normal file
|
|
@ -0,0 +1,260 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Product Catalog - KHY</title>
|
||||
<link rel="stylesheet" href="../assets/styles/main.css" />
|
||||
<style>
|
||||
/* Force responsive behavior */
|
||||
@media (min-width: 640px) {
|
||||
.sm\:hidden {
|
||||
display: none !important;
|
||||
}
|
||||
.sm\:flex {
|
||||
display: flex !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Lazy loading styles */
|
||||
.lazy-load {
|
||||
opacity: 0.7;
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.lazy-load.loaded {
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:wght@100;200;300;400;500;600;700&family=Poppins:wght@400;500;600&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
</head>
|
||||
<body class="bg-white font-sans text-gray-800">
|
||||
<!-- Header -->
|
||||
<header class="fixed w-full h-20 sm:h-28 top-0 left-0 bg-white shadow-[0_8px_24px_rgba(0,0,0,0.06)] border-b border-black/10 z-50">
|
||||
<nav class="h-full">
|
||||
<div
|
||||
class="max-w-7xl mx-auto h-full flex items-center justify-between px-5"
|
||||
>
|
||||
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
|
||||
<main>
|
||||
<!-- Hero Section -->
|
||||
<section class="relative h-80 mt-20 sm:mt-28">
|
||||
<!-- Background Image -->
|
||||
<div class="absolute inset-0 w-full h-full">
|
||||
<img
|
||||
src="../assets/images/prod-catalog.jpg"
|
||||
alt="Product catalog background"
|
||||
class="w-full h-full object-cover object-center"
|
||||
style="filter: blur(3px)"
|
||||
/>
|
||||
|
||||
<!-- White Overlay -->
|
||||
<div class="absolute inset-0 bg-white bg-opacity-60"></div>
|
||||
|
||||
<!-- Overlay Content -->
|
||||
<div
|
||||
class="absolute z-10 inset-0 flex items-center justify-center text-center text-black"
|
||||
>
|
||||
<h1
|
||||
class="font-playfair font-medium text-3xl md:text-4xl lg:text-5xl leading-tight"
|
||||
>
|
||||
Product catalog
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
<!-- Product Controls Section -->
|
||||
<section class="relative w-full h-25 bg-floral-white py-6">
|
||||
<div class="max-w-7xl mx-auto px-5">
|
||||
<div class="flex justify-between items-center">
|
||||
<!-- Left side: Filter and View Controls -->
|
||||
<div class="flex items-center gap-4 relative">
|
||||
<!-- Filter Button -->
|
||||
<button
|
||||
id="filter-toggle"
|
||||
class="flex items-center gap-2 px-4 py-2 border border-light-silver rounded-md bg-white hover:bg-light-bg transition-colors"
|
||||
>
|
||||
<span class="text-lg">☰</span>
|
||||
<span class="font-poppins text-lg text-black">Filter</span>
|
||||
</button>
|
||||
|
||||
<!-- Categories Dropdown -->
|
||||
<div
|
||||
id="filter-dropdown"
|
||||
class="hidden absolute top-12 left-0 w-56 bg-white border border-light-silver rounded-md shadow-lg p-3 space-y-2 z-20"
|
||||
>
|
||||
<!-- Categories will be injected dynamically -->
|
||||
<div id="filter-categories" class="space-y-2"></div>
|
||||
<div class="pt-2 flex justify-end gap-2">
|
||||
<button id="filter-clear" class="text-quick-silver text-sm hover:text-black">Clear</button>
|
||||
<button id="filter-apply" class="text-uc-gold text-sm hover:underline">Apply</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- View Toggle Buttons (removed) -->
|
||||
|
||||
<!-- Results Count -->
|
||||
<span class="font-poppins text-base text-quick-silver"
|
||||
>Showing 1–16 of 32 results</span
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Right side: Sort Dropdown -->
|
||||
<div class="flex items-center gap-4">
|
||||
<!-- Sort Dropdown -->
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="font-poppins text-lg text-black">Sort by:</span>
|
||||
<select
|
||||
class="border border-light-silver rounded px-2 py-1 bg-white"
|
||||
>
|
||||
<option value="default">Default</option>
|
||||
<option value="name-asc">Name: A to Z</option>
|
||||
<option value="name-desc">Name: Z to A</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Product Grid Section -->
|
||||
<section class="relative w-full bg-white py-12">
|
||||
<div class="max-w-7xl mx-auto px-5">
|
||||
<!-- Product Grid -->
|
||||
<div
|
||||
id="product-grid"
|
||||
class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 mb-12"
|
||||
>
|
||||
<!-- Products will be loaded dynamically -->
|
||||
</div>
|
||||
|
||||
<!-- Pagination -->
|
||||
<div id="pagination" class="flex justify-center items-center space-x-10">
|
||||
<!-- Pagination will be loaded dynamically -->
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Features Section -->
|
||||
<section class="relative bg-floral-white py-16">
|
||||
<div class="max-w-7xl mx-auto px-5">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8">
|
||||
<!-- High Quality -->
|
||||
<div class="flex items-center space-x-4">
|
||||
<div class="w-12 h-12">
|
||||
<img
|
||||
src="../assets/icons/trophy.png"
|
||||
alt="Trophy"
|
||||
class="w-full h-full object-contain"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<h3
|
||||
class="font-playfair font-semibold text-2xl text-black mb-1"
|
||||
>
|
||||
High Quality
|
||||
</h3>
|
||||
<p class="font-playfair font-normal text-lg text-gray-500">
|
||||
crafted from top materials
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Warranty Protection -->
|
||||
<div class="flex items-center space-x-4">
|
||||
<div class="w-12 h-12">
|
||||
<img
|
||||
src="../assets/icons/warranty.png"
|
||||
alt="Guarantee"
|
||||
class="w-full h-full object-contain"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<h3
|
||||
class="font-playfair font-semibold text-2xl text-black mb-1"
|
||||
>
|
||||
Warranty Protection
|
||||
</h3>
|
||||
<p class="font-playfair font-normal text-lg text-gray-500">
|
||||
Over 2 years
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Free Shipping -->
|
||||
<div class="flex items-center space-x-4">
|
||||
<div class="w-12 h-12">
|
||||
<img
|
||||
src="../assets/icons/shipping.png"
|
||||
alt="Shipping"
|
||||
class="w-full h-full object-contain"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<h3
|
||||
class="font-playfair font-semibold text-2xl text-black mb-1"
|
||||
>
|
||||
Free Shipping
|
||||
</h3>
|
||||
<p class="font-playfair font-normal text-lg text-gray-500">
|
||||
Order over 150 $
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 24/7 Support -->
|
||||
<div class="flex items-center space-x-4">
|
||||
<div class="w-12 h-12">
|
||||
<img
|
||||
src="../assets/icons/support.png"
|
||||
alt="Support"
|
||||
class="w-full h-full object-contain"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<h3
|
||||
class="font-playfair font-semibold text-2xl text-black mb-1"
|
||||
>
|
||||
24 / 7 Support
|
||||
</h3>
|
||||
<p class="font-playfair font-normal text-lg text-gray-500">
|
||||
Dedicated support
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
|
||||
|
||||
<script src="../scripts/main.js?v=3.0"></script>
|
||||
<script src="../scripts/products.js?v=3.0"></script>
|
||||
|
||||
<script>
|
||||
// Listen for temporary data updates from admin dashboard
|
||||
window.addEventListener('message', function(event) {
|
||||
if (event.data.type === 'UPDATE_PREVIEW_DATA') {
|
||||
// Update the products data with temporary changes
|
||||
if (window.productManager && event.data.data.products) {
|
||||
// Store temporary data for preview
|
||||
window.productManager.tempProducts = event.data.data.products;
|
||||
|
||||
// Re-render with temporary data
|
||||
window.productManager.renderProducts(window.productManager.tempProducts);
|
||||
|
||||
console.log('Preview updated with temporary data:', event.data.data.products.length, 'products');
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
302
preview/detail.html
Normal file
302
preview/detail.html
Normal file
|
|
@ -0,0 +1,302 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Product Detail - KHY</title>
|
||||
<link rel="stylesheet" href="../assets/styles/main.css" />
|
||||
<style>
|
||||
/* Force responsive behavior */
|
||||
@media (min-width: 640px) {
|
||||
.sm\:hidden {
|
||||
display: none !important;
|
||||
}
|
||||
.sm\:flex {
|
||||
display: flex !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:wght@100;200;300;400;500;600;700&family=Poppins:wght@400;500;600&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
</head>
|
||||
<body class="bg-white font-sans text-gray-800">
|
||||
<!-- Header -->
|
||||
<header
|
||||
class="fixed w-full h-20 sm:h-28 top-0 left-0 bg-white shadow-[0_8px_24px_rgba(0,0,0,0.06)] border-b border-black/10 z-50"
|
||||
>
|
||||
<nav class="h-full">
|
||||
<div
|
||||
class="max-w-7xl mx-auto h-full flex items-center justify-between px-5"
|
||||
></div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main class="pt-20 sm:pt-28">
|
||||
<!-- Product Details Section -->
|
||||
<section class="relative w-full bg-white py-6">
|
||||
<div class="max-w-7xl mx-auto px-5">
|
||||
<div class="flex items-center">
|
||||
<h1
|
||||
class="font-playfair font-normal text-base text-quick-silver"
|
||||
id="product-details-title"
|
||||
>
|
||||
Product Details
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Main Product Section -->
|
||||
<section class="relative w-full bg-white py-8">
|
||||
<div class="max-w-7xl mx-auto px-5">
|
||||
<div class="flex flex-col md:flex-row gap-8">
|
||||
<!-- Left Section - Product Images -->
|
||||
<div class="flex flex-col-reverse md:flex-row gap-4">
|
||||
<!-- Thumbnails -->
|
||||
<div
|
||||
class="flex flex-row md:flex-col gap-3 md:gap-4 w-full md:w-32 overflow-x-auto md:overflow-visible"
|
||||
>
|
||||
<!-- Thumbnail images will be populated dynamically -->
|
||||
</div>
|
||||
|
||||
<!-- Main Product Image -->
|
||||
<div
|
||||
class="w-full h-80 md:w-[500px] md:h-[500px] bg-floral-white rounded-lg overflow-hidden"
|
||||
>
|
||||
<!-- Main product image will be populated dynamically -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right Section - Product Details -->
|
||||
<div class="w-full md:w-[500px]">
|
||||
<!-- Product Title -->
|
||||
<h1
|
||||
class="font-playfair font-normal text-4xl text-black mb-8"
|
||||
id="product-title"
|
||||
>
|
||||
<!-- Product title will be populated dynamically -->
|
||||
</h1>
|
||||
|
||||
<!-- Product Description -->
|
||||
<p
|
||||
class="font-playfair font-normal text-sm text-black mb-8 max-w-md"
|
||||
id="product-description"
|
||||
>
|
||||
<!-- Product description will be populated dynamically -->
|
||||
</p>
|
||||
|
||||
<!-- Quantity and Action Buttons -->
|
||||
<div class="flex flex-col md:flex-row gap-4 md:gap-6 mb-3">
|
||||
<!-- Action Buttons -->
|
||||
<a
|
||||
href="../contact.html"
|
||||
class="inline-flex items-center justify-center w-full md:w-[440px] h-[64px] min-h-[64px] bg-white text-black font-playfair font-light text-[20px] leading-none rounded-[15px] border border-quick-silver hover:bg-black hover:text-white hover:shadow-lg transform hover:-translate-y-0.5 transition-all duration-200 box-border whitespace-nowrap mb-4"
|
||||
>
|
||||
Request a Quote
|
||||
</a>
|
||||
<button
|
||||
id="compare-products-btn"
|
||||
class="inline-flex items-center justify-center w-full md:w-[440px] h-[64px] min-h-[64px] bg-white text-black font-playfair font-light text-[20px] leading-none rounded-[15px] border border-quick-silver hover:bg-black hover:text-white hover:shadow-lg transform hover:-translate-y-0.5 transition-all duration-200 box-border whitespace-nowrap"
|
||||
>
|
||||
Compare Products
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Divider -->
|
||||
<div class="w-full h-px bg-light-silver mb-3"></div>
|
||||
|
||||
<!-- Product Specifications -->
|
||||
<div class="mb-8">
|
||||
<div class="space-y-2" id="product-specifications">
|
||||
<!-- Product specifications will be populated dynamically -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Product Metadata -->
|
||||
<div class="space-y-4">
|
||||
<!-- Product metadata will be populated dynamically -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Product Detail Tabs Section -->
|
||||
<section id="product-tabs" class="w-full bg-white">
|
||||
<div class="border-t border-light-silver"></div>
|
||||
<div class="max-w-7xl mx-auto px-5 py-10">
|
||||
<!-- Tabs -->
|
||||
<div class="flex justify-center gap-12 mb-8">
|
||||
<button class="font-playfair text-2xl text-black">
|
||||
Description
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Copy -->
|
||||
<div
|
||||
class="max-w-5xl mx-auto space-y-6 text-center"
|
||||
id="product-description-content"
|
||||
>
|
||||
<!-- Product description content will be populated dynamically -->
|
||||
</div>
|
||||
|
||||
<!-- Images -->
|
||||
<div class="relative mt-10">
|
||||
<div
|
||||
class="grid grid-cols-1 md:grid-cols-2 gap-8"
|
||||
id="product-gallery-images"
|
||||
>
|
||||
<!-- Product gallery images will be populated dynamically -->
|
||||
</div>
|
||||
<!-- Back Arrow -->
|
||||
<button
|
||||
id="gallery-back-btn"
|
||||
class="absolute top-1/2 left-0 transform -translate-y-1/2 bg-white border border-gray-300 rounded-full p-3 shadow-lg hover:shadow-xl transition-all duration-200 opacity-0 pointer-events-none"
|
||||
style="display: none"
|
||||
>
|
||||
<svg
|
||||
class="w-6 h-6 text-gray-600"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
d="M15 19l-7-7 7-7"
|
||||
></path>
|
||||
</svg>
|
||||
</button>
|
||||
<!-- Forward Arrow -->
|
||||
<button
|
||||
id="gallery-next-btn"
|
||||
class="absolute top-1/2 right-0 transform -translate-y-1/2 bg-white border border-gray-300 rounded-full p-3 shadow-lg hover:shadow-xl transition-all duration-200 opacity-0 pointer-events-none"
|
||||
style="display: none"
|
||||
>
|
||||
<svg
|
||||
class="w-6 h-6 text-gray-600"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
d="M9 5l7 7-7 7"
|
||||
></path>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- full-width divider before related products -->
|
||||
<div class="w-full border-t border-light-silver"></div>
|
||||
|
||||
<!-- Related Products Section -->
|
||||
<section id="related-products" class="w-full bg-white py-14">
|
||||
<div class="max-w-7xl mx-auto px-5">
|
||||
<h2
|
||||
class="font-playfair text-4xl font-medium text-center text-black mb-10"
|
||||
>
|
||||
Related Products
|
||||
</h2>
|
||||
|
||||
<div
|
||||
id="related-grid"
|
||||
class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8"
|
||||
>
|
||||
<!-- Related items will be injected here -->
|
||||
</div>
|
||||
|
||||
<div class="mt-10 flex justify-center">
|
||||
<button
|
||||
id="related-show-more"
|
||||
class="w-[245px] h-12 border border-uc-gold rounded-md bg-white font-playfair font-semibold text-base text-uc-gold hover:bg-uc-gold hover:text-white transition-colors"
|
||||
>
|
||||
Show More
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- full-width divider after related products -->
|
||||
<div class="w-full border-t border-light-silver"></div>
|
||||
</main>
|
||||
|
||||
<!-- Image Enlargement Modal -->
|
||||
<div
|
||||
id="image-modal"
|
||||
class="fixed inset-0 bg-black bg-opacity-90 z-50 hidden flex items-center justify-center p-4 transition-opacity duration-300"
|
||||
>
|
||||
<div
|
||||
class="relative max-w-7xl max-h-full w-full h-full flex items-center justify-center"
|
||||
>
|
||||
<!-- Close Button -->
|
||||
<button
|
||||
id="modal-close-btn"
|
||||
class="absolute top-4 right-4 z-10 bg-white bg-opacity-20 hover:bg-opacity-30 text-white rounded-full p-3 transition-all duration-200 backdrop-blur-sm"
|
||||
aria-label="Close modal"
|
||||
>
|
||||
<svg
|
||||
class="w-6 h-6"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
d="M6 18L18 6M6 6l12 12"
|
||||
></path>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<!-- Enlarged Image -->
|
||||
<img
|
||||
id="modal-image"
|
||||
src=""
|
||||
alt=""
|
||||
class="w-[95vw] h-[95vh] object-contain rounded-lg shadow-2xl transform transition-transform duration-300 scale-95"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../scripts/main.js?v=3.5"></script>
|
||||
|
||||
<script>
|
||||
// Listen for temporary data updates from admin dashboard
|
||||
window.addEventListener("message", function (event) {
|
||||
if (event.data.type === "UPDATE_PREVIEW_DATA") {
|
||||
console.log(
|
||||
"Product detail preview received update:",
|
||||
event.data.data
|
||||
);
|
||||
|
||||
// Update the product detail page with new data
|
||||
if (event.data.data.products && window.updateProductDetails) {
|
||||
// Find the current product being viewed
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const productId = urlParams.get("id");
|
||||
|
||||
if (productId) {
|
||||
// Find the updated product in the temporary data
|
||||
const updatedProduct = event.data.data.products.find(
|
||||
(p) => p.id == productId
|
||||
);
|
||||
if (updatedProduct) {
|
||||
console.log("Updating product detail with:", updatedProduct);
|
||||
window.updateProductDetails(updatedProduct);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue