Spaces:
Running
Running
File size: 13,702 Bytes
463fea0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | <!DOCTYPE html>
<html lang="th" class="scroll-smooth">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>การนอน - ชีพจร</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
fontFamily: {
'thai': ['Sarabun', 'sans-serif'],
},
colors: {
'thai': {
50: '#fef7ee',
100: '#feefd7',
200: '#fcdbae',
300: '#f9c27c',
400: '#f59e44',
500: '#f17f0b',
600: '#e36b07',
700: '#bc5308',
800: '#95420e',
900: '#78370f',
},
'sage': {
50: '#f5f7f6',
100: '#e3e9e6',
200: '#c8d3cd',
300: '#a3b5ac',
400: '#7a9485',
500: '#5d7968',
600: '#486152',
700: '#3d4f45',
800: '#334039',
900: '#2c3531',
}
}
}
}
}
</script>
</head>
<body class="bg-slate-50 font-thai" style="font-family: 'Sarabun', sans-serif;">
<!-- Navigation -->
<nav class="fixed top-0 w-full bg-white/90 backdrop-blur-md border-b border-slate-200 z-50">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between items-center h-16">
<div class="flex items-center">
<a href="index.html" class="flex-shrink-0">
<h1 class="text-xl font-bold text-thai-600">ชีพจร</h1>
</a>
<div class="hidden md:block">
<div class="ml-10 flex items-baseline space-x-4">
<a href="index.html" class="nav-link text-slate-700 hover:text-thai-600 px-3 py-2 text-sm font-medium">หน้าแรก</a>
<a href="sleep.html" class="nav-link text-thai-600 px-3 py-2 text-sm font-medium">การนอน</a>
<a href="activity.html" class="nav-link text-slate-700 hover:text-thai-600 px-3 py-2 text-sm font-medium">กิจกรรม</a>
<a href="nutrition.html" class="nav-link text-slate-700 hover:text-thai-600 px-3 py-2 text-sm font-medium">โภชนาการ</a>
</div>
</div>
</div>
<div class="flex items-center space-x-4">
<button class="p-2 rounded-full text-slate-600 hover:bg-slate-100">
<i data-feather="bell" class="w-5 h-5"></i>
</button>
<img class="w-8 h-8 rounded-full" src="http://static.photos/people/200x200/1" alt="Profile">
</div>
</div>
</div>
</nav>
<!-- Main Content -->
<main class="pt-20 pb-20">
<!-- Sleep Overview -->
<section class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<div class="bg-gradient-to-r from-purple-500 to-indigo-600 rounded-2xl p-6 text-white mb-6">
<div class="flex items-center justify-between">
<div>
<h1 class="text-2xl font-bold mb-2">การนอนของคุณเมื่อคืน</h1>
<p class="text-purple-100">คุณภาพการนอนดีมาก</p>
</div>
<div class="text-right">
<div class="text-3xl font-bold">92%</div>
<p class="text-sm text-purple-100">คุณภาพการนอน</p>
</div>
</div>
</div>
<!-- Sleep Metrics -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
<div class="bg-white rounded-2xl shadow-sm border border-slate-200 p-6">
<div class="flex items-center justify-between mb-2">
<h3 class="text-sm font-medium text-slate-600">เวลาที่นอน</h3>
<i data-feather="clock" class="w-5 h-5 text-slate-400"></i>
</div>
<div class="text-2xl font-bold text-slate-900">7h 24m</div>
<p class="text-xs text-slate-500 mt-1">จากเป้า 8h</p>
</div>
<div class="bg-white rounded-2xl shadow-sm border border-slate-200 p-6">
<div class="flex items-center justify-between mb-2">
<h3 class="text-sm font-medium text-slate-600">HRV</h3>
<i data-feather="heart" class="w-5 h-5 text-red-400"></i>
</div>
<div class="text-2xl font-bold text-slate-900">42ms</div>
<p class="text-xs text-green-600 mt-1">+5ms จากเมื่อวาน</p>
</div>
<div class="bg-white rounded-2xl shadow-sm border border-slate-200 p-6">
<div class="flex items-center justify-between mb-2">
<h3 class="text-sm font-medium text-slate-600">อุณหภูมิร่างกาย</h3>
<i data-feather="thermometer" class="w-5 h-5 text-orange-400"></i>
</div>
<div class="text-2xl font-bold text-slate-900">36.2°C</div>
<p class="text-xs text-slate-500 mt-1">ปกติ</p>
</div>
</div>
<!-- Sleep Stages -->
<div class="bg-white rounded-2xl shadow-sm border border-slate-200 p-6 mb-6">
<h3 class="text-lg font-semibold text-slate-900 mb-4">ระยะการนอน</h3>
<div class="space-y-4">
<div>
<div class="flex justify-between items-center mb-2">
<span class="text-sm font-medium text-slate-700">Deep Sleep</span>
<span class="text-sm text-slate-600">1h 51m (25%)</span>
</div>
<div class="w-full bg-slate-200 rounded-full h-2">
<div class="bg-blue-600 h-2 rounded-full" style="width: 25%"></div>
</div>
</div>
<div>
<div class="flex justify-between items-center mb-2">
<span class="text-sm font-medium text-slate-700">REM Sleep</span>
<span class="text-sm text-slate-600">1h 28m (20%)</span>
</div>
<div class="w-full bg-slate-200 rounded-full h-2">
<div class="bg-purple-600 h-2 rounded-full" style="width: 20%"></div>
</div>
</div>
<div>
<div class="flex justify-between items-center mb-2">
<span class="text-sm font-medium text-slate-700">Light Sleep</span>
<span class="text-sm text-slate-600">4h 5m (55%)</span>
</div>
<div class="w-full bg-slate-200 rounded-full h-2">
<div class="bg-green-600 h-2 rounded-full" style="width: 55%"></div>
</div>
</div>
</div>
</div>
<!-- Sleep Timeline -->
<div class="bg-white rounded-2xl shadow-sm border border-slate-200 p-6 mb-6">
<h3 class="text-lg font-semibold text-slate-900 mb-4">ไทม์ไลน์การนอน</h3>
<div class="space-y-3">
<div class="flex items-center justify-between">
<div>
<p class="font-medium text-slate-900">เข้านอน</p>
<p class="text-sm text-slate-600">22:45 น.</p>
</div>
<div class="w-2 h-2 bg-green-500 rounded-full"></div>
</div>
<div class="border-l-2 border-slate-200 ml-1">
<div class="ml-4 pb-3">
<p class="font-medium text-slate-900">หลับลึก</p>
<p class="text-sm text-slate-600">23:15 - 01:06 น. (1h 51m)</p>
</div>
<div class="ml-4 pb-3">
<p class="font-medium text-slate-900">REM Sleep</p>
<p class="text-sm text-slate-600">01:45 - 03:13 น. (1h 28m)</p>
</div>
<div class="ml-4 pb-3">
<p class="font-medium text-slate-900">ตื่นเบา ๆ</p>
<p class="text-sm text-slate-600">05:30 น.</p>
</div>
<div class="ml-4">
<p class="font-medium text-slate-900">ตื่นนอน</p>
<p class="text-sm text-slate-600">06:09 น.</p>
</div>
</div>
</div>
</div>
<!-- Sleep Tips -->
<div class="bg-gradient-to-r from-indigo-50 to-purple-50 rounded-2xl border border-indigo-200 p-6">
<div class="flex items-start">
<div class="flex-shrink-0">
<div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center">
<i data-feather="moon" class="w-6 h-6 text-indigo-600"></i>
</div>
</div>
<div class="ml-4 flex-1">
<h3 class="text-lg font-semibold text-slate-900 mb-2">คำแนะนำการนอน</h3>
<p class="text-slate-700 mb-3">
จากข้อมูลของคุณ พบว่าคุณมี REM sleep น้อยกว่าปกติ แนะนำให้ลดการใช้หน้าจอก่อนนอน 30 นาที
และพยายามนอนให้ตรงเวลามากขึ้นในช่วง 23:00-23:30 น.
</p>
<div class="grid grid-cols-2 gap-3">
<button class="bg-indigo-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-indigo-700 transition">
ตั้งเวลานอน
</button>
<button class="bg-white text-indigo-600 border border-indigo-600 px-4 py-2 rounded-lg text-sm font-medium hover:bg-indigo-50 transition">
ดูเพิ่มเติม
</button>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- Bottom Navigation -->
<nav class="fixed bottom-0 w-full bg-white border-t border-slate-200">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-around items-center h-16">
<a href="index.html" class="flex flex-col items-center py-2 text-slate-600">
<i data-feather="home" class="w-6 h-6 mb-1"></i>
<span class="text-xs">หน้าแรก</span>
</a>
<a href="sleep.html" class="flex flex-col items-center py-2 text-purple-600">
<i data-feather="moon" class="w-6 h-6 mb-1"></i>
<span class="text-xs">การนอน</span>
</a>
<a href="activity.html" class="flex flex-col items-center py-2 text-slate-600">
<i data-feather="activity" class="w-6 h-6 mb-1"></i>
<span class="text-xs">กิจกรรม</span>
</a>
<a href="nutrition.html" class="flex flex-col items-center py-2 text-slate-600">
<i data-feather="coffee" class="w-6 h-6 mb-1"></i>
<span class="text-xs">โภชนาการ</span>
</a>
</div>
</div>
</nav>
<script src="script.js"></script>
<script>
feather.replace();
</script>
</body>
</html> |