Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>ความคืบหน้า - BetterMe</title> | |
| <link rel="icon" type="image/x-icon" href="/static/favicon.ico"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet"> | |
| <style> | |
| body { | |
| font-family: 'Poppins', sans-serif; | |
| background-color: #f8f9fa; | |
| } | |
| .gradient-bg { | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| } | |
| .card-shadow { | |
| box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); | |
| } | |
| .active-tab { | |
| border-bottom: 3px solid #667eea; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50"> | |
| <!-- Header --> | |
| <header class="bg-white shadow-sm sticky top-0 z-10"> | |
| <div class="container mx-auto px-4 py-4 flex justify-between items-center"> | |
| <div class="flex items-center"> | |
| <button class="p-2 rounded-full text-gray-600" onclick="window.location.href='index.html'"> | |
| <i data-feather="arrow-left"></i> | |
| </button> | |
| <h1 class="ml-2 text-xl font-bold text-gray-800">ความคืบหน้าของฉัน</h1> | |
| </div> | |
| <button class="p-2 rounded-full bg-gray-100 text-gray-600"> | |
| <i data-feather="more-vertical"></i> | |
| </button> | |
| </div> | |
| </header> | |
| <!-- Main Content --> | |
| <main class="container mx-auto px-4 py-6"> | |
| <!-- Stats Overview --> | |
| <section class="mb-8"> | |
| <div class="grid grid-cols-2 gap-4"> | |
| <div class="bg-white rounded-xl p-5 card-shadow"> | |
| <div class="flex items-center"> | |
| <div class="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center text-blue-500"> | |
| <i data-feather="heart"></i> | |
| </div> | |
| <div class="ml-4"> | |
| <p class="text-sm text-gray-500">วันติดต่อกัน</p> | |
| <p class="text-2xl font-bold text-gray-900">7 วัน</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-xl p-5 card-shadow"> | |
| <div class="flex items-center"> | |
| <div class="w-12 h-12 rounded-full bg-green-100 flex items-center justify-center text-green-500"> | |
| <i data-feather="award"></i> | |
| </div> | |
| <div class="ml-4"> | |
| <p class="text-sm text-gray-500">คะแนนรวม</p> | |
| <p class="text-2xl font-bold text-gray-900">1,240</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Weekly Overview --> | |
| <section class="mb-8"> | |
| <h3 class="text-lg font-semibold text-gray-800 mb-4">สัปดาห์นี้</h3> | |
| <div class="bg-white rounded-xl p-5 card-shadow"> | |
| <div class="flex justify-between mb-6"> | |
| <div> | |
| <p class="text-sm text-gray-500">คะแนนสุขภาพ</p> | |
| <p class="text-2xl font-bold text-gray-900 mt-1">82</p> | |
| </div> | |
| <div class="text-right"> | |
| <p class="text-sm text-gray-500">สัปดาห์ที่แล้ว</p> | |
| <p class="text-2xl font-bold text-gray-900 mt-1">78</p> | |
| </div> | |
| </div> | |
| <div class="h-64"> | |
| <canvas id="weeklyChart"></canvas> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Monthly Progress --> | |
| <section class="mb-8"> | |
| <h3 class="text-lg font-semibold text-gray-800 mb-4">ภาพรวมรายเดือน</h3> | |
| <div class="bg-white rounded-xl p-5 card-shadow"> | |
| <div class="flex justify-between mb-4"> | |
| <div> | |
| <p class="text-sm text-gray-500">อัตราการทำสำเร็จ</p> | |
| <p class="text-2xl font-bold text-gray-900 mt-1">76%</p> | |
| </div> | |
| <div class="text-right"> | |
| <p class="text-sm text-gray-500">เป้าหมาย</p> | |
| <p class="text-2xl font-bold text-gray-900 mt-1">80%</p> | |
| </div> | |
| </div> | |
| <div class="h-64"> | |
| <canvas id="monthlyChart"></canvas> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Achievements --> | |
| <section> | |
| <h3 class="text-lg font-semibold text-gray-800 mb-4">รางวัลล่าสุด</h3> | |
| <div class="bg-white rounded-xl p-5 card-shadow"> | |
| <div class="flex items-center mb-4"> | |
| <div class="w-12 h-12 rounded-full bg-yellow-100 flex items-center justify-center text-yellow-500"> | |
| <i data-feather="star"></i> | |
| </div> | |
| <div class="ml-4"> | |
| <h4 class="font-medium text-gray-800">7 วันติดต่อกัน</h4> | |
| <p class="text-sm text-gray-500">ทำสมาธิทุกวันเป็นเวลา 7 วัน</p> | |
| </div> | |
| </div> | |
| <div class="flex items-center"> | |
| <div class="w-12 h-12 rounded-full bg-purple-100 flex items-center justify-center text-purple-500"> | |
| <i data-feather="target"></i> | |
| </div> | |
| <div class="ml-4"> | |
| <h4 class="font-medium text-gray-800">นกตื่นเช้า</h4> | |
| <p class="text-sm text-gray-500">ทำกิจวัตรเช้าครบ 5 วันติดต่อกัน</p> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| </main> | |
| <!-- Bottom Navigation --> | |
| <nav class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200"> | |
| <div class="container mx-auto px-4"> | |
| <div class="flex justify-around"> | |
| <a href="index.html" class="flex flex-col items-center py-3 text-gray-500"> | |
| <i data-feather="home" class="w-5 h-5 mb-1"></i> | |
| <span class="text-xs">หน้าหลัก</span> | |
| </a> | |
| <a href="#" class="flex flex-col items-center py-3 text-indigo-600 active-tab"> | |
| <i data-feather="bar-chart-2" class="w-5 h-5 mb-1"></i> | |
| <span class="text-xs">ความคืบหน้า</span> | |
| </a> | |
| <a href="challenges.html" class="flex flex-col items-center py-3 text-gray-500"> | |
| <i data-feather="calendar" class="w-5 h-5 mb-1"></i> | |
| <span class="text-xs">กิจกรรม</span> | |
| </a> | |
| <a href="profile.html" class="flex flex-col items-center py-3 text-gray-500"> | |
| <i data-feather="user" class="w-5 h-5 mb-1"></i> | |
| <span class="text-xs">โปรไฟล์</span> | |
| </a> | |
| </div> | |
| </div> | |
| </nav> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <script> | |
| // Initialize Feather Icons | |
| feather.replace(); | |
| // Weekly Chart | |
| const weeklyCtx = document.getElementById('weeklyChart').getContext('2d'); | |
| const weeklyChart = new Chart(weeklyCtx, { | |
| type: 'bar', | |
| data: { | |
| labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], | |
| datasets: [{ | |
| label: 'Wellness Score', | |
| data: [72, 75, 78, 80, 82, 81, 82], | |
| backgroundColor: [ | |
| 'rgba(102, 126, 234, 0.7)', | |
| 'rgba(102, 126, 234, 0.7)', | |
| 'rgba(102, 126, 234, 0.7)', | |
| 'rgba(102, 126, 234, 0.7)', | |
| 'rgba(102, 126, 234, 0.7)', | |
| 'rgba(92, 150, 233, 0.7)', | |
| 'rgba(92, 150, 233, 0.7)' | |
| ], | |
| borderColor: [ | |
| 'rgba(102, 126, 234, 1)', | |
| 'rgba(102, 126, 234, 1)', | |
| 'rgba(102, 126, 234, 1)', | |
| 'rgba(102, 126, 234, 1)', | |
| 'rgba(102, 126, 234, 1)', | |
| 'rgba(92, 150, 233, 1)', | |
| 'rgba(92, 150, 233, 1)' | |
| ], | |
| borderWidth: 1 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| plugins: { | |
| legend: { | |
| display: false | |
| } | |
| }, | |
| scales: { | |
| y: { | |
| beginAtZero: true, | |
| max: 100, | |
| grid: { | |
| display: false | |
| }, | |
| ticks: { | |
| color: '#9ca3af' | |
| } | |
| }, | |
| x: { | |
| grid: { | |
| display: false | |
| }, | |
| ticks: { | |
| color: '#9ca3af' | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Monthly Chart | |
| const monthlyCtx = document.getElementById('monthlyChart').getContext('2d'); | |
| const monthlyChart = new Chart(monthlyCtx, { | |
| type: 'line', | |
| data: { | |
| labels: ['Week 1', 'Week 2', 'Week 3', 'Week 4'], | |
| datasets: [{ | |
| label: 'Completion Rate', | |
| data: [65, 70, 75, 76], | |
| borderColor: '#667eea', | |
| backgroundColor: 'rgba(102, 126, 234, 0.1)', | |
| borderWidth: 3, | |
| pointBackgroundColor: '#fff', | |
| pointBorderWidth: 3, | |
| pointRadius: 5, | |
| pointHoverRadius: 7, | |
| fill: true, | |
| tension: 0.4 | |
| }, { | |
| label: 'Goal', | |
| data: [70, 75, 80, 80], | |
| borderColor: '#94a3b8', | |
| borderWidth: 2, | |
| borderDash: [5, 5], | |
| fill: false, | |
| pointRadius: 0 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| plugins: { | |
| legend: { | |
| display: false | |
| } | |
| }, | |
| scales: { | |
| y: { | |
| beginAtZero: true, | |
| max: 100, | |
| grid: { | |
| display: false | |
| }, | |
| ticks: { | |
| color: '#9ca3af' | |
| } | |
| }, | |
| x: { | |
| grid: { | |
| display: false | |
| }, | |
| ticks: { | |
| color: '#9ca3af' | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| </script> | |
| </body> | |
| </html> | |