first commit
This commit is contained in:
745
html/nha-mau-detail.html
Normal file
745
html/nha-mau-detail.html
Normal file
@@ -0,0 +1,745 @@
|
||||
<!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 Nhà mẫu - 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: 1rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
max-width: 200px;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.hero-section {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.hero-image {
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.hero-overlay {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
|
||||
padding: 2rem 1rem 1rem;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.project-title {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.project-meta {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
font-size: 0.875rem;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.meta-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.info-section {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 1.125rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: 1rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.project-description {
|
||||
font-size: 1rem;
|
||||
color: var(--text-secondary);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.stats-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 1rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.stat-card {
|
||||
background: #f8fafc;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 0.75rem;
|
||||
padding: 1rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.stat-number {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
color: var(--primary-color);
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-secondary);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.spaces-section {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.spaces-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.add-space-btn {
|
||||
background: var(--primary-color);
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 0.5rem;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.add-space-btn:hover {
|
||||
background: var(--primary-dark);
|
||||
}
|
||||
|
||||
.spaces-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.space-card {
|
||||
background: var(--card-background);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 0.75rem;
|
||||
overflow: hidden;
|
||||
transition: all 0.2s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.space-card:hover {
|
||||
border-color: var(--primary-color);
|
||||
box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
|
||||
}
|
||||
|
||||
.space-image {
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.space-content {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.space-title {
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.space-meta {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.space-products {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.space-status {
|
||||
padding: 0.25rem 0.5rem;
|
||||
border-radius: 0.75rem;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.status-complete {
|
||||
background: #dcfce7;
|
||||
color: var(--success-color);
|
||||
}
|
||||
|
||||
.status-progress {
|
||||
background: #fef3c7;
|
||||
color: var(--warning-color);
|
||||
}
|
||||
|
||||
.status-draft {
|
||||
background: #f1f5f9;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 1rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.primary-btn {
|
||||
background: var(--primary-color);
|
||||
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;
|
||||
}
|
||||
|
||||
.primary-btn:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
|
||||
}
|
||||
|
||||
.secondary-btn {
|
||||
background: var(--card-background);
|
||||
color: var(--secondary-color);
|
||||
border: 2px solid var(--border-color);
|
||||
padding: 1rem;
|
||||
border-radius: 0.75rem;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.secondary-btn:hover {
|
||||
border-color: var(--primary-color);
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.empty-spaces {
|
||||
text-align: center;
|
||||
padding: 2rem;
|
||||
background: #f8fafc;
|
||||
border: 2px dashed var(--border-color);
|
||||
border-radius: 0.75rem;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.empty-icon {
|
||||
font-size: 2rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.empty-title {
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 0.5rem;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.empty-desc {
|
||||
font-size: 0.875rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.project-info-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 0.75rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0.75rem;
|
||||
background: #f8fafc;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.content {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.stats-grid {
|
||||
gap: 0.75rem;
|
||||
}
|
||||
}
|
||||
</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" id="headerTitle">Biệt thự chị Lan</h1>
|
||||
<div class="header-actions">
|
||||
<button class="action-button" onclick="editProject()">
|
||||
<i class="fas fa-edit"></i>
|
||||
</button>
|
||||
<button class="action-button" onclick="shareProject()">
|
||||
<i class="fas fa-share-alt"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Hero Section -->
|
||||
<div class="hero-section">
|
||||
<img src="https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?w=800&h=400&fit=crop"
|
||||
alt="Biệt thự chị Lan"
|
||||
class="hero-image">
|
||||
<div class="hero-overlay">
|
||||
<h1 class="project-title">Biệt thự chị Lan - Quận 2</h1>
|
||||
<div class="project-meta">
|
||||
<div class="meta-item">
|
||||
<i class="fas fa-calendar"></i>
|
||||
<span>Tạo: 15/10/2024</span>
|
||||
</div>
|
||||
<div class="meta-item">
|
||||
<i class="fas fa-map-marker-alt"></i>
|
||||
<span>TP.HCM</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Content -->
|
||||
<div class="content">
|
||||
<!-- Project Info -->
|
||||
<div class="info-section">
|
||||
<h2 class="section-title">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
Thông tin dự án
|
||||
</h2>
|
||||
<p class="project-description">
|
||||
Biệt thự hiện đại 3 tầng với phong cách tối giản, sử dụng gạch men cao cấp nhập khẩu.
|
||||
Diện tích xây dựng 200m², được thiết kế với không gian mở, tận dụng ánh sáng tự nhiên.
|
||||
</p>
|
||||
|
||||
<div class="project-info-grid">
|
||||
<div class="info-item">
|
||||
<span class="info-label">Diện tích</span>
|
||||
<span class="info-value">200m²</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">Phong cách</span>
|
||||
<span class="info-value">Hiện đại tối giản</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">Trạng thái</span>
|
||||
<span class="info-value">Hoàn thành</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">Khách hàng</span>
|
||||
<span class="info-value">Chị Lan - 0912.xxx.xxx</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Statistics -->
|
||||
<div class="stats-grid">
|
||||
<div class="stat-card">
|
||||
<div class="stat-number">8</div>
|
||||
<div class="stat-label">Không gian</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="stat-number">156</div>
|
||||
<div class="stat-label">Sản phẩm</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Spaces Section -->
|
||||
<div class="spaces-section">
|
||||
<div class="spaces-header">
|
||||
<h2 class="section-title">
|
||||
<i class="fas fa-home"></i>
|
||||
Không gian
|
||||
</h2>
|
||||
<button class="add-space-btn" onclick="addNewSpace()">
|
||||
<i class="fas fa-plus"></i>
|
||||
Thêm không gian
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="spaces-grid" id="spacesGrid">
|
||||
<!-- Sample Spaces -->
|
||||
<div class="space-card" onclick="openSpaceDetail('phong-khach')">
|
||||
<img src="https://images.unsplash.com/photo-1586023492125-27b2c045efd7?w=400&h=120&fit=crop"
|
||||
alt="Phòng khách"
|
||||
class="space-image">
|
||||
<div class="space-content">
|
||||
<h3 class="space-title">Phòng khách</h3>
|
||||
<div class="space-meta">
|
||||
<div class="space-products">
|
||||
<i class="fas fa-cube"></i>
|
||||
<span>24 sản phẩm</span>
|
||||
</div>
|
||||
<span class="space-status status-complete">Hoàn thành</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-card" onclick="openSpaceDetail('phong-bep')">
|
||||
<img src="https://images.unsplash.com/photo-1556909114-f6e7ad7d3136?w=400&h=120&fit=crop"
|
||||
alt="Phòng bếp"
|
||||
class="space-image">
|
||||
<div class="space-content">
|
||||
<h3 class="space-title">Phòng bếp</h3>
|
||||
<div class="space-meta">
|
||||
<div class="space-products">
|
||||
<i class="fas fa-cube"></i>
|
||||
<span>18 sản phẩm</span>
|
||||
</div>
|
||||
<span class="space-status status-complete">Hoàn thành</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-card" onclick="openSpaceDetail('phong-ngu-master')">
|
||||
<img src="https://images.unsplash.com/photo-1560448204-61dc36dc98c8?w=400&h=120&fit=crop"
|
||||
alt="Phòng ngủ master"
|
||||
class="space-image">
|
||||
<div class="space-content">
|
||||
<h3 class="space-title">Phòng ngủ master</h3>
|
||||
<div class="space-meta">
|
||||
<div class="space-products">
|
||||
<i class="fas fa-cube"></i>
|
||||
<span>16 sản phẩm</span>
|
||||
</div>
|
||||
<span class="space-status status-complete">Hoàn thành</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-card" onclick="openSpaceDetail('phong-tam-master')">
|
||||
<img src="https://images.unsplash.com/photo-1503387762-592deb58ef4e?w=400&h=120&fit=crop"
|
||||
alt="Phòng tắm master"
|
||||
class="space-image">
|
||||
<div class="space-content">
|
||||
<h3 class="space-title">Phòng tắm master</h3>
|
||||
<div class="space-meta">
|
||||
<div class="space-products">
|
||||
<i class="fas fa-cube"></i>
|
||||
<span>22 sản phẩm</span>
|
||||
</div>
|
||||
<span class="space-status status-progress">Đang thiết kế</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-card" onclick="openSpaceDetail('phong-ngu-2')">
|
||||
<img src="https://images.unsplash.com/photo-1571508601891-ca5e7a713859?w=400&h=120&fit=crop"
|
||||
alt="Phòng ngủ 2"
|
||||
class="space-image">
|
||||
<div class="space-content">
|
||||
<h3 class="space-title">Phòng ngủ 2</h3>
|
||||
<div class="space-meta">
|
||||
<div class="space-products">
|
||||
<i class="fas fa-cube"></i>
|
||||
<span>12 sản phẩm</span>
|
||||
</div>
|
||||
<span class="space-status status-complete">Hoàn thành</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-card" onclick="openSpaceDetail('wc-tang-1')">
|
||||
<img src="https://images.unsplash.com/photo-1584622650111-993a426fbf0a?w=400&h=120&fit=crop"
|
||||
alt="WC tầng 1"
|
||||
class="space-image">
|
||||
<div class="space-content">
|
||||
<h3 class="space-title">WC tầng 1</h3>
|
||||
<div class="space-meta">
|
||||
<div class="space-products">
|
||||
<i class="fas fa-cube"></i>
|
||||
<span>14 sản phẩm</span>
|
||||
</div>
|
||||
<span class="space-status status-complete">Hoàn thành</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-card" onclick="openSpaceDetail('san-vuon')">
|
||||
<img src="https://images.unsplash.com/photo-1600210492486-724fe5c67fb0?w=400&h=120&fit=crop"
|
||||
alt="Sân vườn"
|
||||
class="space-image">
|
||||
<div class="space-content">
|
||||
<h3 class="space-title">Sân vườn</h3>
|
||||
<div class="space-meta">
|
||||
<div class="space-products">
|
||||
<i class="fas fa-cube"></i>
|
||||
<span>8 sản phẩm</span>
|
||||
</div>
|
||||
<span class="space-status status-draft">Nháp</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-card" onclick="openSpaceDetail('garage')">
|
||||
<img src="https://images.unsplash.com/photo-1586023492125-27b2c045efd7?w=400&h=120&fit=crop"
|
||||
alt="Garage"
|
||||
class="space-image">
|
||||
<div class="space-content">
|
||||
<h3 class="space-title">Garage</h3>
|
||||
<div class="space-meta">
|
||||
<div class="space-products">
|
||||
<i class="fas fa-cube"></i>
|
||||
<span>6 sản phẩm</span>
|
||||
</div>
|
||||
<span class="space-status status-complete">Hoàn thành</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Action Buttons -->
|
||||
<div class="action-buttons">
|
||||
<button class="primary-btn" onclick="createQuote()">
|
||||
<i class="fas fa-file-alt"></i>
|
||||
Tạo báo giá
|
||||
</button>
|
||||
<button class="secondary-btn" onclick="shareProject()">
|
||||
<i class="fas fa-share-alt"></i>
|
||||
Chia sẻ
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function goBack() {
|
||||
window.history.back();
|
||||
}
|
||||
|
||||
function editProject() {
|
||||
alert('Tính năng chỉnh sửa dự án đang được phát triển');
|
||||
}
|
||||
|
||||
function shareProject() {
|
||||
if (navigator.share) {
|
||||
navigator.share({
|
||||
title: 'Biệt thự chị Lan - Quận 2',
|
||||
text: 'Xem mẫu thiết kế biệt thự hiện đại này',
|
||||
url: window.location.href
|
||||
}).catch(console.error);
|
||||
} else {
|
||||
navigator.clipboard.writeText(window.location.href).then(() => {
|
||||
showToast('Đã sao chép link chia sẻ!');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function addNewSpace() {
|
||||
alert('Tính năng thêm không gian mới đang được phát triển');
|
||||
}
|
||||
|
||||
function openSpaceDetail(spaceId) {
|
||||
window.location.href = `khong-gian-detail.html?nha_mau=villa-chi-lan&space=${spaceId}`;
|
||||
}
|
||||
|
||||
function createQuote() {
|
||||
// Navigate to quote creation with pre-filled data from this nhà mẫu
|
||||
alert('Sẽ chuyển đến trang tạo báo giá với dữ liệu từ nhà mẫu này');
|
||||
// In real app: window.location.href = `quote-create.html?nha_mau=villa-chi-lan`;
|
||||
}
|
||||
|
||||
function showToast(message) {
|
||||
const toast = document.createElement('div');
|
||||
toast.className = 'fixed top-20 left-1/2 transform -translate-x-1/2 bg-green-500 text-white px-4 py-2 rounded-lg z-50 transition-all duration-300';
|
||||
toast.textContent = message;
|
||||
document.body.appendChild(toast);
|
||||
|
||||
setTimeout(() => {
|
||||
toast.style.opacity = '0';
|
||||
setTimeout(() => {
|
||||
document.body.removeChild(toast);
|
||||
}, 300);
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
// Get project info from URL parameters (demo)
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const projectId = urlParams.get('id') || 'villa-chi-lan';
|
||||
|
||||
// Update title based on project ID (demo)
|
||||
const titles = {
|
||||
'villa-chi-lan': 'Biệt thủ chị Lan',
|
||||
'nha-ong-anh-duc': 'Nhà ống anh Đức',
|
||||
'chung-cu-thao-dien': 'Chung cư Thảo Điền'
|
||||
};
|
||||
|
||||
const title = titles[projectId] || 'Nhà mẫu';
|
||||
document.getElementById('headerTitle').textContent = title;
|
||||
|
||||
// Animation on load
|
||||
const cards = document.querySelectorAll('.space-card');
|
||||
cards.forEach((card, index) => {
|
||||
card.style.opacity = '0';
|
||||
card.style.transform = 'translateY(20px)';
|
||||
card.style.transition = 'all 0.5s ease';
|
||||
|
||||
setTimeout(() => {
|
||||
card.style.opacity = '1';
|
||||
card.style.transform = 'translateY(0)';
|
||||
}, index * 100);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user