Spaces:
Runtime error
Runtime error
| <html lang="vi"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Before & After | TTL1979</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| body { | |
| background-color: #000; | |
| color: #fff; | |
| overflow-x: hidden; | |
| } | |
| .parallax-bg { | |
| background-attachment: fixed; | |
| background-position: center; | |
| background-repeat: no-repeat; | |
| background-size: cover; | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .glow-effect { | |
| position: absolute; | |
| width: 200px; | |
| height: 200px; | |
| border-radius: 50%; | |
| filter: blur(60px); | |
| opacity: 0.3; | |
| z-index: 0; | |
| } | |
| .glow-teal { | |
| background: #38b2ac; | |
| } | |
| .glow-blue { | |
| background: #3b82f6; | |
| } | |
| .glow-purple { | |
| background: #8b5cf6; | |
| } | |
| .case-comparison { | |
| position: relative; | |
| width: 100%; | |
| height: 600px; | |
| overflow: hidden; | |
| border-radius: 16px; | |
| box-shadow: 0 10px 30px rgba(0,0,0,0.5); | |
| } | |
| .before-image, .after-image { | |
| position: absolute; | |
| width: 100%; | |
| height: 100%; | |
| object-fit: cover; | |
| } | |
| .before-image { | |
| clip-path: polygon(0 0, 50% 0, 50% 100%, 0% 100%); | |
| } | |
| .after-image { | |
| clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%); | |
| } | |
| .comparison-slider { | |
| position: absolute; | |
| top: 0; | |
| bottom: 0; | |
| width: 4px; | |
| background: white; | |
| left: 50%; | |
| transform: translateX(-50%); | |
| cursor: ew-resize; | |
| z-index: 10; | |
| } | |
| .comparison-slider::before { | |
| content: ''; | |
| position: absolute; | |
| width: 50px; | |
| height: 50px; | |
| border-radius: 50%; | |
| background: white; | |
| top: 50%; | |
| left: 50%; | |
| transform: translate(-50%, -50%); | |
| } | |
| .comparison-slider::after { | |
| content: '\f337'; | |
| font-family: 'Font Awesome 6 Free'; | |
| font-weight: 900; | |
| position: absolute; | |
| color: #000; | |
| top: 50%; | |
| left: 50%; | |
| transform: translate(-50%, -50%); | |
| font-size: 20px; | |
| } | |
| .treatment-timeline { | |
| position: relative; | |
| padding-left: 30px; | |
| } | |
| .treatment-timeline::before { | |
| content: ''; | |
| position: absolute; | |
| left: 0; | |
| top: 0; | |
| bottom: 0; | |
| width: 4px; | |
| background: linear-gradient(to bottom, #3b82f6, #8b5cf6); | |
| } | |
| .timeline-item { | |
| position: relative; | |
| padding-bottom: 30px; | |
| } | |
| .timeline-item::before { | |
| content: ''; | |
| position: absolute; | |
| left: -33px; | |
| top: 5px; | |
| width: 12px; | |
| height: 12px; | |
| border-radius: 50%; | |
| background: #3b82f6; | |
| border: 2px solid white; | |
| } | |
| .gallery-slider { | |
| scroll-snap-type: x mandatory; | |
| scroll-behavior: smooth; | |
| } | |
| .gallery-slide { | |
| scroll-snap-align: start; | |
| flex: 0 0 100%; | |
| } | |
| .case-card { | |
| position: relative; | |
| overflow: hidden; | |
| border-radius: 8px; | |
| box-shadow: 0 4px 6px rgba(0,0,0,0.5); | |
| transition: all 0.3s ease; | |
| } | |
| .case-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 15px rgba(0,0,0,0.7); | |
| } | |
| @media (max-width: 768px) { | |
| .parallax-bg { | |
| background-attachment: scroll; | |
| } | |
| .case-comparison { | |
| height: 400px; | |
| } | |
| .gallery-slide { | |
| flex: 0 0 100%; | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <!-- Floating Glow Effects --> | |
| <div class="glow-effect glow-teal" style="top: 10%; left: 10%;"></div> | |
| <div class="glow-effect glow-blue" style="top: 60%; right: 5%;"></div> | |
| <div class="glow-effect glow-purple" style="bottom: 10%; left: 20%;"></div> | |
| <!-- Header --> | |
| <header class="py-6 px-4 fixed w-full z-50 bg-black bg-opacity-80 backdrop-filter backdrop-blur-sm"> | |
| <div class="container mx-auto flex justify-between items-center"> | |
| <div class="flex items-center"> | |
| <i class="fas fa-tooth text-3xl text-teal-400 mr-3"></i> | |
| <h1 class="text-2xl font-bold bg-gradient-to-r from-teal-400 to-blue-500 bg-clip-text text-transparent">TTL1979</h1> | |
| </div> | |
| <button id="menu-toggle" class="md:hidden text-white"> | |
| <i class="fas fa-bars text-2xl"></i> | |
| </button> | |
| <nav id="main-nav" class="hidden md:flex space-x-8"> | |
| <a href="/" class="nav-link text-white hover:text-teal-400 transition">Home</a> | |
| <a href="/thuvien" class="nav-link text-white hover:text-teal-400 transition">Thư viện</a> | |
| <a href="/dichvu" class="nav-link text-white hover:text-teal-400 transition">Dịch vụ</a> | |
| <a href="/lienhe" class="nav-link text-white hover:text-teal-400 transition">Liên hệ</a> | |
| </nav> | |
| </div> | |
| </header> | |
| <!-- Mobile Menu --> | |
| <div id="mobile-menu" class="fixed inset-0 bg-black bg-opacity-90 z-40 hidden flex-col items-center justify-center space-y-8"> | |
| <button id="close-menu" class="absolute top-6 right-6 text-white text-2xl"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| <a href="/" class="text-white text-2xl hover:text-teal-400 transition">Home</a> | |
| <a href="/thuvien" class="text-white text-2xl hover:text-teal-400 transition">Thư viện</a> | |
| <a href="/dichvu" class="text-white text-2xl hover:text-teal-400 transition">Dịch vụ</a> | |
| <a href="/lienhe" class="text-white text-2xl hover:text-teal-400 transition">Liên hệ</a> | |
| </div> | |
| <!-- Main Content --> | |
| <section class="pt-32 pb-20 px-4"> | |
| <div class="container mx-auto"> | |
| {% if selected_case %} | |
| <!-- Case Study Hero --> | |
| <div class="flex flex-col md:flex-row items-center mb-12"> | |
| <div class="md:w-1/2 mb-8 md:mb-0 md:pr-8"> | |
| <span class="inline-block bg-gradient-to-r from-teal-500 to-blue-600 text-white px-4 py-1 rounded-full text-sm font-semibold mb-4">Case #{{ selected_case.case_id }}</span> | |
| <h1 class="text-4xl md:text-5xl font-bold mb-6 bg-gradient-to-r from-teal-400 to-blue-500 bg-clip-text text-transparent">{{ selected_case.title }}</h1> | |
| <p class="text-xl text-gray-300 mb-6">{{ selected_case.description }}</p> | |
| <div class="flex items-center"> | |
| <div class="w-16 h-16 rounded-full overflow-hidden border-2 border-teal-500 mr-4"> | |
| <img src="{{ selected_case.patient_avatar or 'https://randomuser.me/api/portraits/women/44.jpg' }}" alt="Patient" class="w-full h-full object-cover"> | |
| </div> | |
| <div> | |
| <h4 class="font-bold">{{ selected_case.patient_name }}</h4> | |
| <p class="text-teal-400">Khách hàng hài lòng</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="md:w-1/2"> | |
| <div class="bg-gradient-to-br from-teal-500 to-blue-600 p-1 rounded-2xl"> | |
| <div class="case-comparison bg-black rounded-xl overflow-hidden"> | |
| <img src="{{ selected_case.before_image }}" alt="Before treatment" class="before-image"> | |
| <img src="{{ selected_case.after_image }}" alt="After treatment" class="after-image"> | |
| <div class="comparison-slider"></div> | |
| <div class="absolute top-4 left-4 bg-black bg-opacity-70 text-white px-3 py-1 rounded-full text-sm"> | |
| <i class="fas fa-arrow-left mr-1"></i> Trước | |
| </div> | |
| <div class="absolute top-4 right-4 bg-black bg-opacity-70 text-white px-3 py-1 rounded-full text-sm"> | |
| Sau <i class="fas fa-arrow-right ml-1"></i> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="flex flex-wrap justify-center gap-4 mb-12"> | |
| <span class="bg-gray-800 text-teal-400 px-4 py-2 rounded-full font-medium">{{ selected_case.treatment }}</span> | |
| <span class="bg-gray-800 text-blue-400 px-4 py-2 rounded-full font-medium">Thẩm mỹ</span> | |
| <span class="bg-gray-800 text-purple-400 px-4 py-2 rounded-full font-medium">Không đau</span> | |
| <span class="bg-gray-800 text-pink-400 px-4 py-2 rounded-full font-medium">{{ selected_case.duration or 'N/A' }}</span> | |
| </div> | |
| <!-- Case Details --> | |
| <section class="py-16 px-4 bg-gray-900 bg-opacity-50"> | |
| <div class="container mx-auto"> | |
| <div class="grid grid-cols-1 lg:grid-cols-3 gap-12"> | |
| <div class="lg:col-span-2"> | |
| <h2 class="text-3xl font-bold mb-8 bg-gradient-to-r from-teal-400 to-blue-500 bg-clip-text text-transparent">Chi tiết ca điều trị</h2> | |
| <div class="bg-gray-800 bg-opacity-70 rounded-xl p-6 mb-8 backdrop-filter backdrop-blur-sm"> | |
| <h3 class="text-xl font-semibold mb-4 text-teal-400 flex items-center"> | |
| <i class="fas fa-clipboard-list mr-2"></i> Mô tả ca điều trị | |
| </h3> | |
| <p class="text-gray-300 mb-4">{{ selected_case.description }}</p> | |
| </div> | |
| <div class="bg-gray-800 bg-opacity-70 rounded-xl p-6 mb-8 backdrop-filter backdrop-blur-sm"> | |
| <h3 class="text-xl font-semibold mb-4 text-blue-400 flex items-center"> | |
| <i class="fas fa-procedures mr-2"></i> Phương pháp điều trị | |
| </h3> | |
| <p class="text-gray-300 mb-4">{{ selected_case.treatment }}</p> | |
| </div> | |
| </div> | |
| <div> | |
| <div class="sticky top-24"> | |
| <div class="bg-gray-800 bg-opacity-70 rounded-xl p-6 mb-6 backdrop-filter backdrop-blur-sm"> | |
| <h3 class="text-xl font-semibold mb-4 border-b border-gray-700 pb-2">Thông tin ca điều trị</h3> | |
| <div class="space-y-4"> | |
| <div> | |
| <p class="text-gray-400 text-sm">Bệnh nhân</p> | |
| <p class="font-medium">{{ selected_case.patient_name }}</p> | |
| </div> | |
| <div> | |
| <p class="text-gray-400 text-sm">Tuổi</p> | |
| <p class="font-medium">{{ selected_case.patient_age }}</p> | |
| </div> | |
| <div> | |
| <p class="text-gray-400 text-sm">Phương pháp</p> | |
| <p class="font-medium text-teal-400">{{ selected_case.treatment }}</p> | |
| </div> | |
| <div> | |
| <p class="text-gray-400 text-sm">Thời gian</p> | |
| <p class="font-medium">{{ selected_case.duration or 'N/A' }}</p> | |
| </div> | |
| <div> | |
| <p class="text-gray-400 text-sm">Số lần thăm khám</p> | |
| <p class="font-medium">{{ selected_case.visits or 'N/A' }}</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Patient Testimonial --> | |
| <section class="py-16 px-4 bg-gradient-to-br from-gray-900 to-gray-800"> | |
| <div class="container mx-auto max-w-4xl"> | |
| <div class="bg-gray-800 bg-opacity-70 rounded-xl p-8 md:p-12 backdrop-filter backdrop-blur-sm"> | |
| <div class="flex flex-col md:flex-row items-center mb-8"> | |
| <div class="md:w-1/4 mb-6 md:mb-0 flex justify-center"> | |
| <div class="w-32 h-32 rounded-full overflow-hidden border-4 border-teal-500"> | |
| <img src="{{ selected_case.patient_avatar or 'https://randomuser.me/api/portraits/women/44.jpg' }}" alt="Patient" class="w-full h-full object-cover"> | |
| </div> | |
| </div> | |
| <div class="md:w-3/4 md:pl-8 text-center md:text-left"> | |
| <h3 class="text-2xl font-bold mb-2">{{ selected_case.patient_name }}</h3> | |
| <p class="text-teal-400 mb-4">Khách hàng hài lòng</p> | |
| <div class="flex justify-center md:justify-start space-x-1 text-yellow-400"> | |
| {% for _ in range(selected_case.patient_rating | int) %} | |
| <i class="fas fa-star"></i> | |
| {% endfor %} | |
| </div> | |
| </div> | |
| </div> | |
| <div class="text-center"> | |
| <div class="flex justify-center space-x-4"> | |
| <button class="bg-teal-600 hover:bg-teal-700 text-white px-6 py-3 rounded-full font-medium transition flex items-center"> | |
| <i class="fas fa-calendar-check mr-2"></i> Đặt lịch ngay | |
| </button> | |
| <button class="bg-transparent border-2 border-teal-500 text-teal-400 hover:bg-teal-900 hover:bg-opacity-30 px-6 py-3 rounded-full font-medium transition flex items-center"> | |
| <i class="fas fa-phone-alt mr-2"></i> 0901.234.567 | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| {% else %} | |
| <!-- Case Studies List --> | |
| <div class="text-center mb-12"> | |
| <h1 class="text-4xl md:text-5xl font-bold mb-6 bg-gradient-to-r from-teal-400 to-blue-500 bg-clip-text text-transparent">Before & After</h1> | |
| <p class="text-xl text-gray-300">Xem các ca điều trị thành công của chúng tôi</p> | |
| </div> | |
| {% if cases %} | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"> | |
| {% for case in cases %} | |
| <a href="/bfat/{{ case.id }}" class="case-card bg-gray-800 rounded-xl overflow-hidden"> | |
| <div class="relative"> | |
| <img src="{{ case.before_image }}" alt="{{ case.title }}" class="w-full h-64 object-cover"> | |
| <div class="absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center"> | |
| <span class="text-white text-lg font-semibold">Trước & Sau</span> | |
| </div> | |
| </div> | |
| <div class="p-4"> | |
| <h3 class="text-xl font-bold mb-2 text-teal-400">{{ case.title }}</h3> | |
| <p class="text-gray-400 mb-2">{{ case.treatment }}</p> | |
| <p class="text-sm text-gray-500">{{ case.date }}</p> | |
| </div> | |
| </a> | |
| {% endfor %} | |
| </div> | |
| {% else %} | |
| <div class="text-center"> | |
| <h1 class="text-4xl font-bold mb-6 text-gray-300">Chưa có dữ liệu ca điều trị</h1> | |
| <p class="text-xl text-gray-400">Vui lòng thêm dữ liệu vào dataset để hiển thị ca điều trị.</p> | |
| </div> | |
| {% endif %} | |
| {% endif %} | |
| </div> | |
| </section> | |
| <!-- Footer --> | |
| <footer class="bg-black py-12 px-4"> | |
| <div class="container mx-auto"> | |
| <div class="grid grid-cols-1 md:grid-cols-4 gap-8"> | |
| <div> | |
| <div class="flex items-center mb-4"> | |
| <i class="fas fa-tooth text-3xl text-teal-400 mr-3"></i> | |
| <h3 class="text-2xl font-bold bg-gradient-to-r from-teal-400 to-blue-500 bg-clip-text text-transparent">TTL1979</h3> | |
| </div> | |
| <p class="text-gray-400 mb-4">Nha khoa thẩm mỹ hàng đầu Việt Nam với hơn 15 năm kinh nghiệm.</p> | |
| <div class="flex space-x-4"> | |
| <a href="#" class="text-gray-400 hover:text-teal-400 transition"> | |
| <i class="fab fa-facebook-f"></i> | |
| </a> | |
| <a href="#" class="text-gray-400 hover:text-teal-400 transition"> | |
| <i class="fab fa-instagram"></i> | |
| </a> | |
| <a href="#" class="text-gray-400 hover:text-teal-400 transition"> | |
| <i class="fab fa-youtube"></i> | |
| </a> | |
| <a href="#" class="text-gray-400 hover:text-teal-400 transition"> | |
| <i class="fab fa-tiktok"></i> | |
| </a> | |
| </div> | |
| </div> | |
| <div> | |
| <h4 class="text-lg font-semibold mb-4 text-white border-b border-gray-800 pb-2">Dịch vụ</h4> | |
| <ul class="space-y-2"> | |
| <li><a href="#" class="text-gray-400 hover:text-teal-400 transition">Dán sứ Veneer</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-teal-400 transition">Bọc răng sứ</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-teal-400 transition">Niềng răng</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-teal-400 transition">Cấy ghép Implant</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-teal-400 transition">Tẩy trắng răng</a></li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h4 class="text-lg font-semibold mb-4 text-white border-b border-gray-800 pb-2">Liên hệ</h4> | |
| <ul class="space-y-3 text-gray-400"> | |
| <li class="flex items-start"> | |
| <i class="fas fa-map-marker-alt mt-1 mr-3 text-teal-400"></i> | |
| <span>123 Nguyễn Văn Linh, Quận 7, TP.HCM</span> | |
| </li> | |
| <li class="flex items-center"> | |
| <i class="fas fa-phone-alt mr-3 text-teal-400"></i> | |
| <span>0901.234.567</span> | |
| </li> | |
| <li class="flex items-center"> | |
| <i class="fas fa-envelope mr-3 text-teal-400"></i> | |
| <span>info@ttl1979.com</span> | |
| </li> | |
| <li class="flex items-center"> | |
| <i class="fas fa-clock mr-3 text-teal-400"></i> | |
| <span>8:00 - 20:00 (T2 - CN)</span> | |
| </li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h4 class="text-lg font-semibold mb-4 text-white border-b border-gray-800 pb-2">Đăng ký nhận tin</h4> | |
| <p class="text-gray-400 mb-4">Nhận thông tin ưu đãi và kiến thức nha khoa hữu ích.</p> | |
| <div class="flex"> | |
| <input type="email" placeholder="Email của bạn" class="bg-gray-900 text-white px-4 py-2 rounded-l-lg focus:outline-none focus:ring-2 focus:ring-teal-500 w-full"> | |
| <button type="submit" class="bg-teal-600 hover:bg-teal-700 text-white px-4 py-2 rounded-r-lg"> | |
| <i class="fas fa-paper-plane"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="border-t border-gray-800 mt-12 pt-8 flex flex-col md:flex-row justify-between items-center"> | |
| <p class="text-gray-500 text-sm mb-4 md:mb-0">© 2025 TTL1979. All rights reserved.</p> | |
| <div class="flex space-x-6"> | |
| <a href="#" class="text-gray-500 hover:text-teal-400 text-sm transition">Chính sách bảo mật</a> | |
| <a href="#" class="text-gray-500 hover:text-teal-400 text-sm transition">Điều khoản sử dụng</a> | |
| <a href="#" class="text-gray-500 hover:text-teal-400 text-sm transition">Sitemap</a> | |
| </div> | |
| </div> | |
| </div> | |
| </footer> | |
| <script> | |
| // Mobile menu toggle | |
| const menuToggle = document.getElementById('menu-toggle'); | |
| const closeMenu = document.getElementById('close-menu'); | |
| const mobileMenu = document.getElementById('mobile-menu'); | |
| menuToggle.addEventListener('click', () => { | |
| mobileMenu.classList.remove('hidden'); | |
| mobileMenu.classList.add('flex'); | |
| }); | |
| closeMenu.addEventListener('click', () => { | |
| mobileMenu.classList.add('hidden'); | |
| mobileMenu.classList.remove('flex'); | |
| }); | |
| // Before/After slider (only if a case is selected) | |
| {% if selected_case %} | |
| const slider = document.querySelector('.comparison-slider'); | |
| const beforeImage = document.querySelector('.before-image'); | |
| let isDragging = false; | |
| slider.addEventListener('mousedown', (e) => { | |
| isDragging = true; | |
| document.addEventListener('mousemove', onDrag); | |
| document.addEventListener('mouseup', () => { | |
| isDragging = false; | |
| document.removeEventListener('mousemove', onDrag); | |
| }); | |
| }); | |
| slider.addEventListener('touchstart', (e) => { | |
| isDragging = true; | |
| document.addEventListener('touchmove', onDrag); | |
| document.addEventListener('touchend', () => { | |
| isDragging = false; | |
| document.removeEventListener('touchmove', onDrag); | |
| }); | |
| }); | |
| function onDrag(e) { | |
| if (!isDragging) return; | |
| let x; | |
| if (e.type === 'mousemove') { | |
| x = e.clientX; | |
| } else if (e.type === 'touchmove') { | |
| x = e.touches[0].clientX; | |
| } | |
| const containerRect = slider.parentNode.getBoundingClientRect(); | |
| let percentage = ((x - containerRect.left) / containerRect.width) * 100; | |
| // Limit between 5% and 95% | |
| percentage = Math.max(5, Math.min(95, percentage)); | |
| beforeImage.style.clipPath = `polygon(0 0, ${percentage}% 0, ${percentage}% 100%, 0% 100%)`; | |
| slider.style.left = `${percentage}%`; | |
| } | |
| {% endif %} | |
| </script> | |
| </body> | |
| </html> |