first commit

This commit is contained in:
Phuoc Nguyen
2025-10-17 15:37:58 +07:00
commit 2125e85d40
123 changed files with 27633 additions and 0 deletions

473
html/promotion-detail.html Normal file
View File

@@ -0,0 +1,473 @@
<!DOCTYPE html>
<html lang="vi">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Chi tiết khuyến mãi - Worker App</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.0/css/all.min.css">
<style>
:root {
--primary-color: #2563eb;
--primary-dark: #1d4ed8;
--secondary-color: #64748b;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--background-color: #f8fafc;
--card-background: #ffffff;
--text-primary: #1e293b;
--text-secondary: #64748b;
--border-color: #e2e8f0;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background-color: var(--background-color);
color: var(--text-primary);
line-height: 1.6;
overflow-x: hidden;
}
.header {
background: var(--card-background);
border-bottom: 1px solid var(--border-color);
position: sticky;
top: 0;
z-index: 100;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}
.header-content {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem;
max-width: 480px;
margin: 0 auto;
}
.back-button {
background: none;
border: none;
color: var(--primary-color);
font-size: 1.25rem;
cursor: pointer;
padding: 0.5rem;
border-radius: 0.5rem;
transition: background-color 0.2s;
}
.back-button:hover {
background-color: #f1f5f9;
}
.header-title {
font-size: 1.125rem;
font-weight: 600;
color: var(--text-primary);
}
.header-actions {
display: flex;
gap: 0.5rem;
}
.action-button {
background: none;
border: none;
color: var(--secondary-color);
font-size: 1.25rem;
cursor: pointer;
padding: 0.5rem;
border-radius: 0.5rem;
transition: all 0.2s;
}
.action-button:hover {
background-color: #f1f5f9;
color: var(--primary-color);
}
.container {
max-width: 480px;
margin: 0 auto;
background: var(--card-background);
min-height: 100vh;
}
.content {
padding-bottom: 100px;
}
.promotion-banner {
width: 100%;
height: 240px;
object-fit: cover;
border-radius: 0;
}
.promotion-header {
padding: 1.5rem 1rem 1rem;
border-bottom: 1px solid var(--border-color);
}
.promotion-title {
font-size: 1.5rem;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 0.75rem;
line-height: 1.3;
}
.promotion-dates {
display: flex;
align-items: center;
gap: 0.5rem;
color: var(--warning-color);
font-weight: 500;
}
.promotion-section {
padding: 1.5rem 1rem;
border-bottom: 1px solid var(--border-color);
}
.section-title {
font-size: 1.125rem;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.section-content {
color: var(--text-secondary);
line-height: 1.7;
}
.section-content p {
margin-bottom: 0.75rem;
}
.section-content ul {
list-style: none;
padding: 0;
}
.section-content li {
padding: 0.5rem 0;
border-bottom: 1px solid #f1f5f9;
display: flex;
align-items: flex-start;
gap: 0.75rem;
}
.section-content li:last-child {
border-bottom: none;
}
.section-content li::before {
content: "•";
color: var(--primary-color);
font-weight: bold;
min-width: 1rem;
}
.highlight-box {
background: linear-gradient(135deg, #fef3c7, #fed7aa);
border: 1px solid #fbbf24;
border-radius: 0.75rem;
padding: 1rem;
margin: 1rem 0;
}
.highlight-text {
color: #92400e;
font-weight: 600;
text-align: center;
}
.action-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: var(--card-background);
border-top: 1px solid var(--border-color);
padding: 1rem;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
z-index: 50;
}
.action-bar-content {
max-width: 480px;
margin: 0 auto;
}
.cta-button {
width: 100%;
background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
color: white;
border: none;
padding: 1rem;
border-radius: 0.75rem;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
}
.cta-button:hover {
transform: translateY(-2px);
box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}
.cta-button:active {
transform: translateY(0);
}
.badge {
display: inline-flex;
align-items: center;
gap: 0.25rem;
background: var(--success-color);
color: white;
padding: 0.25rem 0.75rem;
border-radius: 1rem;
font-size: 0.875rem;
font-weight: 500;
}
@media (max-width: 480px) {
.promotion-title {
font-size: 1.25rem;
}
.promotion-banner {
height: 200px;
}
.promotion-header {
padding: 1rem;
}
.promotion-section {
padding: 1rem;
}
}
</style>
</head>
<body>
<div class="container">
<!-- Header -->
<header class="header">
<div class="header-content">
<button class="back-button" onclick="goBack()">
<i class="fas fa-arrow-left"></i>
</button>
<h1 class="header-title">Chi tiết khuyến mãi</h1>
<div class="header-actions">
<button class="action-button" onclick="sharePromotion()">
<i class="fas fa-share-alt"></i>
</button>
<button class="action-button" onclick="savePromotion()">
<i class="fas fa-bookmark"></i>
</button>
</div>
</div>
</header>
<!-- Content -->
<div class="content">
<!-- Banner Image -->
<img src="https://images.unsplash.com/photo-1581094794329-c8112a89af12?w=800&h=400&fit=crop"
alt="Banner khuyến mãi"
class="promotion-banner">
<!-- Promotion Header -->
<div class="promotion-header">
<h2 class="promotion-title">Khuyến Mãi Lớn Cuối Năm - Giảm Giá Đến 30% Toàn Bộ Gạch Men</h2>
<div class="promotion-dates">
<i class="fas fa-clock"></i>
<span>01/11/2024 - 31/12/2024</span>
<span class="badge">
<i class="fas fa-fire"></i>
Đang diễn ra
</span>
</div>
</div>
<!-- Program Content -->
<div class="promotion-section">
<h3 class="section-title">
<i class="fas fa-gift"></i>
Nội dung chương trình
</h3>
<div class="section-content">
<p>Chương trình khuyến mãi đặc biệt dành cho các công trình xây dựng với mức giảm giá hấp dẫn nhất trong năm.</p>
<div class="highlight-box">
<p class="highlight-text">🎉 Giảm giá lên đến 30% cho tất cả sản phẩm gạch men cao cấp</p>
</div>
<p><strong>Ưu đãi chi tiết:</strong></p>
<ul>
<li>Gạch men 60x60cm: Giảm 25% - 30%</li>
<li>Gạch men 80x80cm: Giảm 20% - 25%</li>
<li>Gạch men 120x60cm: Giảm 15% - 20%</li>
<li>Gạch granite 60x60cm: Giảm 20% - 25%</li>
<li>Gạch ốp tường: Giảm 15% - 20%</li>
</ul>
<p><strong>Ưu đãi bổ sung:</strong></p>
<ul>
<li>Miễn phí vận chuyển cho đơn hàng từ 500m²</li>
<li>Tặng keo dán gạch cho đơn hàng từ 200m²</li>
<li>Hỗ trợ thiết kế 3D miễn phí</li>
<li>Bảo hành sản phẩm lên đến 15 năm</li>
</ul>
</div>
</div>
<!-- Terms & Conditions -->
<div class="promotion-section">
<h3 class="section-title">
<i class="fas fa-file-contract"></i>
Điều kiện áp dụng
</h3>
<div class="section-content">
<ul>
<li>Áp dụng cho tất cả khách hàng là thợ xây dựng đã đăng ký tài khoản</li>
<li>Đơn hàng tối thiểu: 50m² sản phẩm gạch men</li>
<li>Thanh toán tối thiểu 50% giá trị đơn hàng khi đặt</li>
<li>Không áp dụng đồng thời với các chương trình khuyến mãi khác</li>
<li>Giá đã bao gồm VAT, chưa bao gồm phí vận chuyển</li>
<li>Sản phẩm không áp dụng đổi trả sau khi đã cắt, gia công</li>
<li>Thời gian giao hàng: 3-7 ngày làm việc tùy theo khu vực</li>
<li>Khuyến mãi có thể kết thúc sớm nếu hết hàng</li>
</ul>
</div>
</div>
<!-- Contact Info -->
<div class="promotion-section">
<h3 class="section-title">
<i class="fas fa-phone"></i>
Thông tin liên hệ
</h3>
<div class="section-content">
<p><strong>Hotline:</strong> 1900-xxxx (8:00 - 18:00 hàng ngày)</p>
<p><strong>Email:</strong> promotion@company.com</p>
<p><strong>Zalo:</strong> 0123.456.789</p>
</div>
</div>
</div>
<!-- Action Bar -->
<div class="action-bar">
<div class="action-bar-content">
<button class="cta-button" onclick="viewApplicableProducts()">
<i class="fas fa-eye"></i>
Xem sản phẩm áp dụng
</button>
</div>
</div>
</div>
<script>
function goBack() {
window.history.back();
}
function sharePromotion() {
if (navigator.share) {
navigator.share({
title: 'Khuyến Mãi Lớn Cuối Năm - Giảm Giá Đến 30%',
text: 'Khuyến mãi đặc biệt cho gạch men với mức giảm giá lên đến 30%',
url: window.location.href
}).catch(console.error);
} else {
// Fallback cho các trình duyệt không hỗ trợ Web Share API
const url = window.location.href;
navigator.clipboard.writeText(url).then(() => {
alert('Đã sao chép link khuyến mãi!');
});
}
}
function savePromotion() {
const button = event.target.closest('.action-button');
const icon = button.querySelector('i');
if (icon.classList.contains('fas')) {
icon.classList.remove('fas');
icon.classList.add('far');
showToast('Đã bỏ lưu khuyến mãi');
} else {
icon.classList.remove('far');
icon.classList.add('fas');
showToast('Đã lưu khuyến mãi');
}
}
function viewApplicableProducts() {
// Điều hướng đến trang sản phẩm với bộ lọc khuyến mãi
window.location.href = 'products.html?promotion=year-end-2024';
}
function showToast(message) {
// Tạo toast notification
const toast = document.createElement('div');
toast.className = 'fixed top-20 left-1/2 transform -translate-x-1/2 bg-black text-white px-4 py-2 rounded-lg z-50 transition-all duration-300';
toast.textContent = message;
document.body.appendChild(toast);
// Hiệu ứng hiển thị
setTimeout(() => {
toast.style.opacity = '0';
setTimeout(() => {
document.body.removeChild(toast);
}, 300);
}, 2000);
}
// Thêm hiệu ứng scroll cho header
window.addEventListener('scroll', function() {
const header = document.querySelector('.header');
if (window.scrollY > 10) {
header.style.boxShadow = '0 2px 10px rgba(0, 0, 0, 0.1)';
} else {
header.style.boxShadow = '0 1px 3px rgba(0, 0, 0, 0.1)';
}
});
// Animation khi load trang
document.addEventListener('DOMContentLoaded', function() {
const sections = document.querySelectorAll('.promotion-section');
sections.forEach((section, index) => {
section.style.opacity = '0';
section.style.transform = 'translateY(20px)';
section.style.transition = 'all 0.5s ease';
setTimeout(() => {
section.style.opacity = '1';
section.style.transform = 'translateY(0)';
}, index * 100);
});
});
</script>
</body>
</html>