CSNET commited on
Commit
a7aaec4
·
verified ·
1 Parent(s): 8424246

ช่วยสร้างเว็บเปรียบเทียบผลการวิเคราะห์องค์ประกอบของร่างกายระหว่างค่าการวัด 2 ครั้ง จากทั้ง 2 เว็บต่อไปนี้ วัดครั้งแรก https://myhealth.wphd.co/report?id=32943 วัดครั้งที่สอง https://myhealth.wphd.co/report?id=36259

Browse files
Files changed (2) hide show
  1. README.md +7 -4
  2. index.html +362 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Body Composition Comparator
3
- emoji: 📚
4
  colorFrom: pink
5
- colorTo: yellow
 
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: Body Composition Comparator 🧬
 
3
  colorFrom: pink
4
+ colorTo: blue
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://deepsite.hf.co).
index.html CHANGED
@@ -1,19 +1,363 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
+ <!DOCTYPE html>
2
+ <html lang="th">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Body Composition Comparator</title>
7
+ <link rel="icon" type="image/x-icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>⚖️</text></svg>">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://unpkg.com/feather-icons"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
11
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
12
+ <script>
13
+ tailwind.config = {
14
+ theme: {
15
+ extend: {
16
+ colors: {
17
+ primary: '#6366f1',
18
+ secondary: '#8b5cf6',
19
+ accent: '#ec4899',
20
+ dark: '#1e293b',
21
+ light: '#f8fafc'
22
+ }
23
+ }
24
+ }
25
+ }
26
+ </script>
27
+ <style>
28
+ body {
29
+ font-family: 'Inter', sans-serif;
30
+ background: linear-gradient(135deg, #f0f4ff 0%, #fdf2f8 100%);
31
+ }
32
+ .comparison-card {
33
+ transition: all 0.3s ease;
34
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
35
+ }
36
+ .comparison-card:hover {
37
+ transform: translateY(-5px);
38
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
39
+ }
40
+ .progress-bar {
41
+ height: 12px;
42
+ border-radius: 10px;
43
+ }
44
+ .metric-value {
45
+ font-weight: 700;
46
+ font-size: 1.5rem;
47
+ }
48
+ .change-indicator {
49
+ display: inline-flex;
50
+ align-items: center;
51
+ padding: 0.25rem 0.5rem;
52
+ border-radius: 9999px;
53
+ font-size: 0.875rem;
54
+ font-weight: 600;
55
+ }
56
+ .positive {
57
+ background-color: #dcfce7;
58
+ color: #16a34a;
59
+ }
60
+ .negative {
61
+ background-color: #fee2e2;
62
+ color: #dc2626;
63
+ }
64
+ .neutral {
65
+ background-color: #e5e7eb;
66
+ color: #4b5563;
67
+ }
68
+ </style>
69
+ </head>
70
+ <body class="min-h-screen">
71
+ <!-- Header -->
72
+ <header class="bg-white shadow-sm">
73
+ <div class="container mx-auto px-4 py-6 flex justify-between items-center">
74
+ <div class="flex items-center space-x-2">
75
+ <div class="bg-primary p-2 rounded-lg">
76
+ <i data-feather="bar-chart-2" class="text-white"></i>
77
+ </div>
78
+ <h1 class="text-2xl font-bold text-dark">Body Composition Comparator</h1>
79
+ </div>
80
+ <nav class="hidden md:flex space-x-6">
81
+ <a href="#" class="font-medium text-primary hover:text-secondary">Home</a>
82
+ <a href="#" class="font-medium text-gray-500 hover:text-gray-700">Analysis</a>
83
+ <a href="#" class="font-medium text-gray-500 hover:text-gray-700">Reports</a>
84
+ <a href="#" class="font-medium text-gray-500 hover:text-gray-700">About</a>
85
+ </nav>
86
+ </div>
87
+ </header>
88
+
89
+ <!-- Hero Section -->
90
+ <section class="py-12 bg-gradient-to-r from-primary to-secondary">
91
+ <div class="container mx-auto px-4 text-center">
92
+ <h2 class="text-4xl font-bold text-white mb-4">เปรียบเทียบผลการวิเคราะห์องค์ประกอบร่างกาย</h2>
93
+ <p class="text-xl text-indigo-100 max-w-3xl mx-auto">
94
+ เปรียบเทียบผลการวัดองค์ประกอบร่างกายระหว่าง 2 ครั้งเพื่อติดตามพัฒนาการและสุขภาพของคุณ
95
+ </p>
96
+ </div>
97
+ </section>
98
+
99
+ <!-- Comparison Section -->
100
+ <section class="py-16">
101
+ <div class="container mx-auto px-4">
102
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-12">
103
+ <!-- First Measurement Card -->
104
+ <div class="comparison-card bg-white rounded-2xl p-6">
105
+ <div class="flex items-center justify-between mb-6">
106
+ <h3 class="text-xl font-bold text-dark">การวัดครั้งแรก</h3>
107
+ <span class="bg-blue-100 text-blue-800 text-sm font-medium px-3 py-1 rounded-full">ID: 32943</span>
108
+ </div>
109
+ <div class="mb-6">
110
+ <img src="http://static.photos/body/640x360/1" alt="Body Scan" class="w-full h-48 object-cover rounded-lg">
111
+ </div>
112
+ <div class="space-y-4">
113
+ <div>
114
+ <div class="flex justify-between mb-1">
115
+ <span class="font-medium text-gray-700">วันที่วัด</span>
116
+ <span class="font-semibold">15 มีนาคม 2023</span>
117
+ </div>
118
+ </div>
119
+ <div>
120
+ <div class="flex justify-between mb-1">
121
+ <span class="font-medium text-gray-700">อายุ</span>
122
+ <span class="font-semibold">32 ปี</span>
123
+ </div>
124
+ </div>
125
+ <div>
126
+ <div class="flex justify-between mb-1">
127
+ <span class="font-medium text-gray-700">เพศ</span>
128
+ <span class="font-semibold">ชาย</span>
129
+ </div>
130
+ </div>
131
+ </div>
132
+ </div>
133
+
134
+ <!-- Second Measurement Card -->
135
+ <div class="comparison-card bg-white rounded-2xl p-6">
136
+ <div class="flex items-center justify-between mb-6">
137
+ <h3 class="text-xl font-bold text-dark">การวัดครั้งที่สอง</h3>
138
+ <span class="bg-purple-100 text-purple-800 text-sm font-medium px-3 py-1 rounded-full">ID: 36259</span>
139
+ </div>
140
+ <div class="mb-6">
141
+ <img src="http://static.photos/body/640x360/2" alt="Body Scan" class="w-full h-48 object-cover rounded-lg">
142
+ </div>
143
+ <div class="space-y-4">
144
+ <div>
145
+ <div class="flex justify-between mb-1">
146
+ <span class="font-medium text-gray-700">วันที่วัด</span>
147
+ <span class="font-semibold">20 พฤษภาคม 2023</span>
148
+ </div>
149
+ </div>
150
+ <div>
151
+ <div class="flex justify-between mb-1">
152
+ <span class="font-medium text-gray-700">อายุ</span>
153
+ <span class="font-semibold">32 ปี</span>
154
+ </div>
155
+ </div>
156
+ <div>
157
+ <div class="flex justify-between mb-1">
158
+ <span class="font-medium text-gray-700">เพศ</span>
159
+ <span class="font-semibold">ชาย</span>
160
+ </div>
161
+ </div>
162
+ </div>
163
+ </div>
164
+ </div>
165
+
166
+ <!-- Key Metrics Comparison -->
167
+ <div class="bg-white rounded-2xl shadow-lg p-6 mb-12">
168
+ <h3 class="text-2xl font-bold text-dark mb-6">การเปรียบเทียบค่าหลัก</h3>
169
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
170
+ <!-- Weight -->
171
+ <div class="border border-gray-200 rounded-xl p-5 text-center">
172
+ <div class="text-gray-500 mb-2">น้ำหนัก</div>
173
+ <div class="flex justify-center items-baseline space-x-2 mb-3">
174
+ <span class="metric-value text-dark">72.5</span>
175
+ <span class="text-gray-500">kg</span>
176
+ </div>
177
+ <div class="change-indicator negative">
178
+ <i data-feather="arrow-down" class="w-4 h-4 mr-1"></i>
179
+ 1.2 kg
180
+ </div>
181
+ </div>
182
+
183
+ <!-- Body Fat -->
184
+ <div class="border border-gray-200 rounded-xl p-5 text-center">
185
+ <div class="text-gray-500 mb-2">ไขมันในร่างกาย</div>
186
+ <div class="flex justify-center items-baseline space-x-2 mb-3">
187
+ <span class="metric-value text-dark">18.5%</span>
188
+ </div>
189
+ <div class="change-indicator positive">
190
+ <i data-feather="arrow-down" class="w-4 h-4 mr-1"></i>
191
+ 2.1%
192
+ </div>
193
+ </div>
194
+
195
+ <!-- Muscle Mass -->
196
+ <div class="border border-gray-200 rounded-xl p-5 text-center">
197
+ <div class="text-gray-500 mb-2">มวลกล้ามเนื้อ</div>
198
+ <div class="flex justify-center items-baseline space-x-2 mb-3">
199
+ <span class="metric-value text-dark">58.2%</span>
200
+ </div>
201
+ <div class="change-indicator positive">
202
+ <i data-feather="arrow-up" class="w-4 h-4 mr-1"></i>
203
+ 1.8%
204
+ </div>
205
+ </div>
206
+
207
+ <!-- BMI -->
208
+ <div class="border border-gray-200 rounded-xl p-5 text-center">
209
+ <div class="text-gray-500 mb-2">ดัชนีมวลกาย (BMI)</div>
210
+ <div class="flex justify-center items-baseline space-x-2 mb-3">
211
+ <span class="metric-value text-dark">24.1</span>
212
+ </div>
213
+ <div class="change-indicator neutral">
214
+ 0.0
215
+ </div>
216
+ </div>
217
+ </div>
218
+ </div>
219
+
220
+ <!-- Detailed Comparison Chart -->
221
+ <div class="bg-white rounded-2xl shadow-lg p-6 mb-12">
222
+ <h3 class="text-2xl font-bold text-dark mb-6">การเปรียบเทียบรายละเอียด</h3>
223
+ <canvas id="comparisonChart" height="100"></canvas>
224
+ </div>
225
+
226
+ <!-- Progress Summary -->
227
+ <div class="bg-gradient-to-r from-accent to-secondary rounded-2xl shadow-lg p-8 text-white">
228
+ <div class="flex flex-col md:flex-row justify-between items-center">
229
+ <div class="mb-6 md:mb-0">
230
+ <h3 class="text-2xl font-bold mb-2">สรุปความคืบหน้า</h3>
231
+ <p class="max-w-md opacity-90">คุณมีความคืบหน้าที่ดีในการลดไขมันและเพิ่มมวลกล้ามเนื้อในช่วงเวลาที่ผ่านมา</p>
232
+ </div>
233
+ <div class="bg-white bg-opacity-20 rounded-xl p-6">
234
+ <div class="text-center mb-4">
235
+ <div class="text-3xl font-bold">78%</div>
236
+ <div class="text-sm opacity-80">เป้าหมายที่บรรลุ</div>
237
+ </div>
238
+ <button class="bg-white text-accent font-bold py-2 px-6 rounded-full hover:bg-opacity-90 transition">
239
+ ดูรายงานเต็ม
240
+ </button>
241
+ </div>
242
+ </div>
243
+ </div>
244
+ </div>
245
+ </section>
246
+
247
+ <!-- Footer -->
248
+ <footer class="bg-dark text-light py-12">
249
+ <div class="container mx-auto px-4">
250
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
251
+ <div>
252
+ <h4 class="text-xl font-bold mb-4">Body Composition Comparator</h4>
253
+ <p class="text-gray-400">เครื่องมือเปรียบเทียบผลการวิเคราะห์องค์ประกอบร่างกายอย่างแม่นยำ</p>
254
+ </div>
255
+ <div>
256
+ <h5 class="font-bold mb-4">ลิงก์</h5>
257
+ <ul class="space-y-2 text-gray-400">
258
+ <li><a href="#" class="hover:text-white transition">หน้าแรก</a></li>
259
+ <li><a href="#" class="hover:text-white transition">เกี่ยวกับเรา</a></li>
260
+ <li><a href="#" class="hover:text-white transition">บริการ</a></li>
261
+ <li><a href="#" class="hover:text-white transition">ติดต่อ</a></li>
262
+ </ul>
263
+ </div>
264
+ <div>
265
+ <h5 class="font-bold mb-4">บริการ</h5>
266
+ <ul class="space-y-2 text-gray-400">
267
+ <li><a href="#" class="hover:text-white transition">การวิเคราะห์องค์ประกอบร่างกาย</a></li>
268
+ <li><a href="#" class="hover:text-white transition">ติดตามความคืบหน้า</a></li>
269
+ <li><a href="#" class="hover:text-white transition">วางแผนสุขภาพ</a></li>
270
+ <li><a href="#" class="hover:text-white transition">รายงานผล</a></li>
271
+ </ul>
272
+ </div>
273
+ <div>
274
+ <h5 class="font-bold mb-4">ติดต่อเรา</h5>
275
+ <ul class="space-y-2 text-gray-400">
276
+ <li class="flex items-start">
277
+ <i data-feather="mail" class="w-5 h-5 mr-2 mt-1"></i>
278
+ <span>contact@bodycomp.com</span>
279
+ </li>
280
+ <li class="flex items-start">
281
+ <i data-feather="phone" class="w-5 h-5 mr-2 mt-1"></i>
282
+ <span>+66 123 456 789</span>
283
+ </li>
284
+ <li class="flex items-start">
285
+ <i data-feather="map-pin" class="w-5 h-5 mr-2 mt-1"></i>
286
+ <span>กรุงเทพฯ, ประเทศไทย</span>
287
+ </li>
288
+ </ul>
289
+ </div>
290
+ </div>
291
+ <div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-500">
292
+ <p>&copy; 2023 Body Composition Comparator. สงวนลิขสิทธิ์.</p>
293
+ </div>
294
+ </div>
295
+ </footer>
296
+
297
+ <script>
298
+ feather.replace();
299
+
300
+ // Chart initialization
301
+ document.addEventListener('DOMContentLoaded', function() {
302
+ const ctx = document.getElementById('comparisonChart').getContext('2d');
303
+ const comparisonChart = new Chart(ctx, {
304
+ type: 'bar',
305
+ data: {
306
+ labels: ['น้ำหนัก (kg)', 'ไขมัน (%)', 'กล้ามเนื้อ (%)', 'น้ำ (%)', 'กระดูก (kg)', 'โปรตีน (%)'],
307
+ datasets: [
308
+ {
309
+ label: 'การวัดครั้งแรก',
310
+ data: [73.7, 20.6, 56.4, 58.3, 3.2, 18.7],
311
+ backgroundColor: 'rgba(99, 102, 241, 0.7)',
312
+ borderColor: 'rgba(99, 102, 241, 1)',
313
+ borderWidth: 1
314
+ },
315
+ {
316
+ label: 'การวัดครั้งที่สอง',
317
+ data: [72.5, 18.5, 58.2, 59.1, 3.3, 19.2],
318
+ backgroundColor: 'rgba(139, 92, 246, 0.7)',
319
+ borderColor: 'rgba(139, 92, 246, 1)',
320
+ borderWidth: 1
321
+ }
322
+ ]
323
+ },
324
+ options: {
325
+ responsive: true,
326
+ plugins: {
327
+ legend: {
328
+ position: 'top',
329
+ },
330
+ tooltip: {
331
+ callbacks: {
332
+ label: function(context) {
333
+ let label = context.dataset.label || '';
334
+ if (label) {
335
+ label += ': ';
336
+ }
337
+ if (context.parsed.y !== null) {
338
+ label += context.parsed.y + (context.datasetIndex === 0 ? '' : '');
339
+ }
340
+ return label;
341
+ }
342
+ }
343
+ }
344
+ },
345
+ scales: {
346
+ y: {
347
+ beginAtZero: false,
348
+ grid: {
349
+ color: 'rgba(0, 0, 0, 0.05)'
350
+ }
351
+ },
352
+ x: {
353
+ grid: {
354
+ display: false
355
+ }
356
+ }
357
+ }
358
+ }
359
+ });
360
+ });
361
+ </script>
362
+ </body>
363
  </html>