Spaces:
Running
Running
| <html lang="th" class="scroll-smooth"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>ชีพจร Pulse - แดชบอร์ดสุขภาพของคุณ</title> | |
| <link rel="icon" type="image/x-icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🥷</text></svg>"> | |
| <link rel="stylesheet" href="style.css"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| </head> | |
| <body class="bg-gradient-to-br from-slate-50 via-purple-50 to-teal-50 dark:from-slate-900 dark:via-slate-800 dark:to-slate-900 min-h-screen"> | |
| <!-- Navigation --> | |
| <thai-navbar></thai-navbar> | |
| <main class="pt-4 pb-20"> | |
| <!-- Hero Section with 3-Ring Vitals --> | |
| <section class="px-4 mb-6"> | |
| <div class="text-center mb-6"> | |
| <h1 class="text-2xl font-bold text-slate-800 dark:text-white mb-1">สวัสดีตอนเช้า, คุณแมวเหมียว 🌅</h1> | |
| <p class="text-sm text-slate-600 dark:text-slate-400">วันอังคารที่ 15 ตุลาคม 2567</p> | |
| </div> | |
| <!-- 3-Ring Vitals --> | |
| <div class="flex justify-center items-center space-x-4 mb-8"> | |
| <!-- Recovery Ring --> | |
| <div class="relative w-24 h-24"> | |
| <div class="w-24 h-24 rounded-full border-8 border-slate-200 dark:border-slate-700 flex items-center justify-center"> | |
| <div class="text-center"> | |
| <div class="text-2xl font-bold text-emerald-500">72%</div> | |
| <div class="text-xs text-slate-500 dark:text-slate-400">ฟื้นตัว</div> | |
| </div> | |
| </div> | |
| <div class="absolute inset-0 rounded-full border-8 border-transparent border-t-emerald-500 animate-pulse" style="clip-path: polygon(50% 0%, 50% 50%, 100% 0%, 100% 100%, 0% 100%, 0% 0%);"></div> | |
| </div> | |
| <!-- Strain Ring --> | |
| <div class="relative w-24 h-24"> | |
| <div class="w-24 h-24 rounded-full border-8 border-slate-200 dark:border-slate-700 flex items-center justify-center"> | |
| <div class="text-center"> | |
| <div class="text-2xl font-bold text-orange-500">14.2</div> | |
| <div class="text-xs text-slate-500 dark:text-slate-400">ภาระ</div> | |
| </div> | |
| </div> | |
| <div class="absolute inset-0 rounded-full border-8 border-transparent border-t-orange-500" style="clip-path: polygon(50% 0%, 50% 50%, 100% 0%, 100% 100%, 0% 100%, 0% 0%);"></div> | |
| </div> | |
| <!-- Sleep Ring --> | |
| <div class="relative w-24 h-24"> | |
| <div class="w-24 h-24 rounded-full border-8 border-slate-200 dark:border-slate-700 flex items-center justify-center"> | |
| <div class="text-center"> | |
| <div class="text-2xl font-bold text-purple-500">85%</div> | |
| <div class="text-xs text-slate-500 dark:text-slate-400">การนอน</div> | |
| </div> | |
| </div> | |
| <div class="absolute inset-0 rounded-full border-8 border-transparent border-t-purple-500" style="clip-path: polygon(50% 0%, 50% 50%, 100% 0%, 100% 100%, 0% 100%, 0% 0%);"></div> | |
| </div> | |
| </div> | |
| <!-- AI Coach Summary Card --> | |
| <div class="bg-gradient-to-r from-violet-600 to-purple-700 rounded-2xl p-4 text-white shadow-lg mb-6"> | |
| <div class="flex items-start space-x-3"> | |
| <div class="w-10 h-10 bg-white/20 rounded-full flex items-center justify-center flex-shrink-0"> | |
| <i data-feather="zap" class="w-5 h-5"></i> | |
| </div> | |
| <div class="flex-1"> | |
| <h3 class="font-semibold text-sm mb-1">ผู้ช่วยชีพจร AI</h3> | |
| <p class="text-xs opacity-90 leading-relaxed"> | |
| วันนี้คุณภาพอากาศปานกลาง (AQI 65) และ Recovery 72% แนะนำให้ออกกำลังกายในร่ม เช่น โยคะหรือเวทเทรนนิ่ง หลีกเลี่ยงการวิ่งกลางแจ้งช่วงเย็นนะครับ | |
| </p> | |
| <button class="text-xs bg-white/20 px-3 py-1 rounded-full mt-2 hover:bg-white/30 transition">ดูรายละเอียด</button> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Contextual Vitals --> | |
| <section class="px-4 mb-6"> | |
| <h2 class="text-lg font-semibold text-slate-800 dark:text-white mb-3">ข้อมูลบริบทรอบตัวคุณ</h2> | |
| <div class="grid grid-cols-1 sm:grid-cols-3 gap-3"> | |
| <contextual-vital | |
| icon="wind" | |
| title="คุณภาพอากาศ" | |
| value="ปานกลาง (65)" | |
| status="warning" | |
| detail="PM2.5: 35 μg/m³"> | |
| </contextual-vital> | |
| <contextual-vital | |
| icon="sun" | |
| title="ดัชนีความร้อน" | |
| value="39°C (เสี่ยง)" | |
| status="danger" | |
| detail="ความชื้น: 75%"> | |
| </contextual-vital> | |
| <contextual-vital | |
| icon="navigation" | |
| title="การจราจร" | |
| value="ติดขัด" | |
| status="warning" | |
| detail="เส้นทางกลับบ้าน 45 นาที"> | |
| </contextual-vital> | |
| </div> | |
| </section> | |
| <!-- Quick Actions --> | |
| <section class="px-4 mb-6"> | |
| <h2 class="text-lg font-semibold text-slate-800 dark:text-white mb-3">บันทึกด่วน</h2> | |
| <div class="grid grid-cols-2 sm:grid-cols-4 gap-3"> | |
| <quick-action icon="coffee" text="บันทึกอาหาร" color="bg-orange-500"></quick-action> | |
| <quick-action icon="activity" text="เริ่มออกกำลัง" color="bg-red-500"></quick-action> | |
| <quick-action icon="heart" text="อารมณ์วันนี้" color="bg-pink-500"></quick-action> | |
| <quick-action icon="clock" text="IF Timer" color="bg-teal-500"></quick-action> | |
| </div> | |
| </section> | |
| <!-- Today's Activities --> | |
| <section class="px-4 mb-6"> | |
| <h2 class="text-lg font-semibold text-slate-800 dark:text-white mb-3">กิจกรรมวันนี้</h2> | |
| <div class="space-y-3"> | |
| <div class="bg-white dark:bg-slate-800 rounded-xl p-4 shadow-sm border border-slate-100 dark:border-slate-700"> | |
| <div class="flex items-center justify-between"> | |
| <div class="flex items-center space-x-3"> | |
| <div class="w-10 h-10 bg-red-100 dark:bg-red-900/30 rounded-full flex items-center justify-center"> | |
| <i data-feather="activity" class="w-5 h-5 text-red-500"></i> | |
| </div> | |
| <div> | |
| <h4 class="font-medium text-slate-800 dark:text-white">มวยไทย</h4> | |
| <p class="text-xs text-slate-500 dark:text-slate-400">07:30 - 08:30 (1 ชั่วโมง)</p> | |
| </div> | |
| </div> | |
| <div class="text-right"> | |
| <div class="text-sm font-semibold text-slate-800 dark:text-white">142 แคล</div> | |
| <div class="text-xs text-slate-500 dark:text-slate-400">Strain 8.2</div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white dark:bg-slate-800 rounded-xl p-4 shadow-sm border border-slate-100 dark:border-slate-700"> | |
| <div class="flex items-center justify-between"> | |
| <div class="flex items-center space-x-3"> | |
| <div class="w-10 h-10 bg-purple-100 dark:bg-purple-900/30 rounded-full flex items-center justify-center"> | |
| <i data-feather="moon" class="w-5 h-5 text-purple-500"></i> | |
| </div> | |
| <div> | |
| <h4 class="font-medium text-slate-800 dark:text-white">การนอนหลับ</h4> | |
| <p class="text-xs text-slate-500 dark:text-slate-400">23:15 - 06:45 (7.5 ชั่วโมง)</p> | |
| </div> | |
| </div> | |
| <div class="text-right"> | |
| <div class="text-sm font-semibold text-slate-800 dark:text-white">85%</div> | |
| <div class="text-xs text-slate-500 dark:text-slate-400">Deep: 1.5 ชม.</div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- AI Insights --> | |
| <section class="px-4 mb-6"> | |
| <h2 class="text-lg font-semibold text-slate-800 dark:text-white mb-3">AI Insights ประจำวัน</h2> | |
| <div class="space-y-3"> | |
| <ai-insight | |
| type="warning" | |
| icon="wind" | |
| title="ผลกระทบจาก PM2.5" | |
| message="เราสังเกตว่าค่า HRV ของคุณลดลง 15% ในคืนหลังจากวันที่ PM2.5 สูงเกิน 100 นี่อาจหมายถึงร่างกายคุณเกิดการอักเสบ วันนี้ (ที่ฝุ่นยังสูง) ลองงดออกกำลังกายกลางแจ้ง และทานอาหารต้านอักเสบดูนะครับ" | |
| action="ดูคำแนะนำอาหาร"> | |
| </ai-insight> | |
| <ai-insight | |
| type="info" | |
| icon="clock" | |
| title="IF + Sleep สัมพันธ์กัน" | |
| message="เราพบว่าการทานอาหารมื้อดึก (23.00 น.) ของคุณเมื่อคืน ทำให้ 'Deep Sleep' ลดลง 40 นาที ลองเลื่อนมื้อเย็นเร็วขึ้น 2 ชั่วโมง จะช่วยให้นอนหลับสนิทขึ้นนะครับ" | |
| action="ตั้งเป้าหมายใหม่"> | |
| </ai-insight> | |
| </div> | |
| </section> | |
| </main> | |
| <!-- Footer Navigation --> | |
| <thai-footer></thai-footer> | |
| <!-- Scripts --> | |
| <script src="components/navbar.js"></script> | |
| <script src="components/footer.js"></script> | |
| <script src="components/contextual-vital.js"></script> | |
| <script src="components/ai-insight.js"></script> | |
| <script src="components/quick-action.js"></script> | |
| <script src="script.js"></script> | |
| <script> | |
| // Initialize Feather Icons | |
| feather.replace(); | |
| // Update time | |
| function updateTime() { | |
| const now = new Date(); | |
| const options = { | |
| weekday: 'long', | |
| year: 'numeric', | |
| month: 'long', | |
| day: 'numeric', | |
| timeZone: 'Asia/Bangkok' | |
| }; | |
| const thaiDate = now.toLocaleDateString('th-TH', options); | |
| const timeElement = document.querySelector('p.text-sm.text-slate-600'); | |
| if (timeElement) { | |
| timeElement.textContent = thaiDate; | |
| } | |
| } | |
| updateTime(); | |
| setInterval(updateTime, 60000); | |
| </script> | |
| <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script> | |
| </body> | |
| </html> |