File size: 18,354 Bytes
a7aaec4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76f6988
a7aaec4
76f6988
a7aaec4
76f6988
a7aaec4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8424246
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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<!DOCTYPE html>
<html lang="th">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Body Composition Comparator</title>
    <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>">
    <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=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#6366f1',
                        secondary: '#8b5cf6',
                        accent: '#ec4899',
                        dark: '#1e293b',
                        light: '#f8fafc'
                    }
                }
            }
        }
    </script>
    <style>
        body {
            font-family: 'Inter', sans-serif;
            background: linear-gradient(135deg, #f0f4ff 0%, #fdf2f8 100%);
        }
        .comparison-card {
            transition: all 0.3s ease;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
        }
        .comparison-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
        }
        .progress-bar {
            height: 12px;
            border-radius: 10px;
        }
        .metric-value {
            font-weight: 700;
            font-size: 1.5rem;
        }
        .change-indicator {
            display: inline-flex;
            align-items: center;
            padding: 0.25rem 0.5rem;
            border-radius: 9999px;
            font-size: 0.875rem;
            font-weight: 600;
        }
        .positive {
            background-color: #dcfce7;
            color: #16a34a;
        }
        .negative {
            background-color: #fee2e2;
            color: #dc2626;
        }
        .neutral {
            background-color: #e5e7eb;
            color: #4b5563;
        }
    </style>
</head>
<body class="min-h-screen">
    <!-- Header -->
    <header class="bg-white shadow-sm">
        <div class="container mx-auto px-4 py-6 flex justify-between items-center">
            <div class="flex items-center space-x-2">
                <div class="bg-primary p-2 rounded-lg">
                    <i data-feather="bar-chart-2" class="text-white"></i>
                </div>
                <h1 class="text-2xl font-bold text-dark">Body Composition Comparator</h1>
            </div>
            <nav class="hidden md:flex space-x-6">
                <a href="#" class="font-medium text-primary hover:text-secondary">Home</a>
                <a href="#" class="font-medium text-gray-500 hover:text-gray-700">Analysis</a>
                <a href="#" class="font-medium text-gray-500 hover:text-gray-700">Reports</a>
                <a href="#" class="font-medium text-gray-500 hover:text-gray-700">About</a>
            </nav>
        </div>
    </header>

    <!-- Hero Section -->
    <section class="py-12 bg-gradient-to-r from-primary to-secondary">
        <div class="container mx-auto px-4 text-center">
            <h2 class="text-4xl font-bold text-white mb-4">เปรียบเทียบผลการวิเคราะห์องค์ประกอบร่างกาย</h2>
            <p class="text-xl text-indigo-100 max-w-3xl mx-auto">
                เปรียบเทียบผลการวัดองค์ประกอบร่างกายระหว่าง 2 ครั้งเพื่อติดตามพัฒนาการและสุขภาพของคุณ
            </p>
        </div>
    </section>

    <!-- Comparison Section -->
    <section class="py-16">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-12">
                <!-- First Measurement Card -->
                <div class="comparison-card bg-white rounded-2xl p-6">
                    <div class="flex items-center justify-between mb-6">
                        <h3 class="text-xl font-bold text-dark">การวัดครั้งแรก</h3>
                        <span class="bg-blue-100 text-blue-800 text-sm font-medium px-3 py-1 rounded-full">ID: 32943</span>
                    </div>
                    <div class="mb-6">
                        <img src="http://static.photos/body/640x360/1" alt="Body Scan" class="w-full h-48 object-cover rounded-lg">
                    </div>
                    <div class="space-y-4">
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="font-medium text-gray-700">วันที่วัด</span>
                                <span class="font-semibold">15 มีนาคม 2023</span>
                            </div>
                        </div>
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="font-medium text-gray-700">อายุ</span>
                                <span class="font-semibold">32 ปี</span>
                            </div>
                        </div>
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="font-medium text-gray-700">เพศ</span>
                                <span class="font-semibold">ชาย</span>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Second Measurement Card -->
                <div class="comparison-card bg-white rounded-2xl p-6">
                    <div class="flex items-center justify-between mb-6">
                        <h3 class="text-xl font-bold text-dark">การวัดครั้งที่สอง</h3>
                        <span class="bg-purple-100 text-purple-800 text-sm font-medium px-3 py-1 rounded-full">ID: 36259</span>
                    </div>
                    <div class="mb-6">
                        <img src="http://static.photos/body/640x360/2" alt="Body Scan" class="w-full h-48 object-cover rounded-lg">
                    </div>
                    <div class="space-y-4">
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="font-medium text-gray-700">วันที่วัด</span>
                                <span class="font-semibold">20 พฤษภาคม 2023</span>
                            </div>
                        </div>
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="font-medium text-gray-700">อายุ</span>
                                <span class="font-semibold">32 ปี</span>
                            </div>
                        </div>
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="font-medium text-gray-700">เพศ</span>
                                <span class="font-semibold">ชาย</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Key Metrics Comparison -->
            <div class="bg-white rounded-2xl shadow-lg p-6 mb-12">
                <h3 class="text-2xl font-bold text-dark mb-6">การเปรียบเทียบค่าหลัก</h3>
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
                    <!-- Weight -->
                    <div class="border border-gray-200 rounded-xl p-5 text-center">
                        <div class="text-gray-500 mb-2">น้ำหนัก</div>
                        <div class="flex justify-center items-baseline space-x-2 mb-3">
                            <span class="metric-value text-dark">72.5</span>
                            <span class="text-gray-500">kg</span>
                        </div>
                        <div class="change-indicator negative">
                            <i data-feather="arrow-down" class="w-4 h-4 mr-1"></i>
                            1.2 kg
                        </div>
                    </div>

                    <!-- Body Fat -->
                    <div class="border border-gray-200 rounded-xl p-5 text-center">
                        <div class="text-gray-500 mb-2">ไขมันในร่างกาย</div>
                        <div class="flex justify-center items-baseline space-x-2 mb-3">
                            <span class="metric-value text-dark">18.5%</span>
                        </div>
                        <div class="change-indicator positive">
                            <i data-feather="arrow-down" class="w-4 h-4 mr-1"></i>
                            2.1%
                        </div>
                    </div>

                    <!-- Muscle Mass -->
                    <div class="border border-gray-200 rounded-xl p-5 text-center">
                        <div class="text-gray-500 mb-2">มวลกล้ามเนื้อ</div>
                        <div class="flex justify-center items-baseline space-x-2 mb-3">
                            <span class="metric-value text-dark">58.2%</span>
                        </div>
                        <div class="change-indicator positive">
                            <i data-feather="arrow-up" class="w-4 h-4 mr-1"></i>
                            1.8%
                        </div>
                    </div>

                    <!-- BMI -->
                    <div class="border border-gray-200 rounded-xl p-5 text-center">
                        <div class="text-gray-500 mb-2">ดัชนีมวลกาย (BMI)</div>
                        <div class="flex justify-center items-baseline space-x-2 mb-3">
                            <span class="metric-value text-dark">24.1</span>
                        </div>
                        <div class="change-indicator neutral">
                            0.0
                        </div>
                    </div>
                </div>
            </div>

            <!-- Detailed Comparison Chart -->
            <div class="bg-white rounded-2xl shadow-lg p-6 mb-12">
                <h3 class="text-2xl font-bold text-dark mb-6">การเปรียบเทียบรายละเอียด</h3>
                <canvas id="comparisonChart" height="100"></canvas>
            </div>

            <!-- Progress Summary -->
            <div class="bg-gradient-to-r from-accent to-secondary rounded-2xl shadow-lg p-8 text-white">
                <div class="flex flex-col md:flex-row justify-between items-center">
                    <div class="mb-6 md:mb-0">
                        <h3 class="text-2xl font-bold mb-2">สรุปความคืบหน้า</h3>
                        <p class="max-w-md opacity-90">คุณมีความคืบหน้าที่ดีในการลดไขมันและเพิ่มมวลกล้ามเนื้อในช่วงเวลาที่ผ่านมา</p>
                    </div>
                    <div class="bg-white bg-opacity-20 rounded-xl p-6">
                        <div class="text-center mb-4">
                            <div class="text-3xl font-bold">78%</div>
                            <div class="text-sm opacity-80">เป้าหมายที่บรรลุ</div>
                        </div>
                        <a href="full-report.html" class="bg-white text-accent font-bold py-2 px-6 rounded-full hover:bg-opacity-90 transition inline-block">
                            ดูรายงานเต็ม
                        </a>
                    </div>
</div>
            </div>
        </div>
    </section>

    <!-- Footer -->
    <footer class="bg-dark text-light py-12">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
                <div>
                    <h4 class="text-xl font-bold mb-4">Body Composition Comparator</h4>
                    <p class="text-gray-400">เครื่องมือเปรียบเทียบผลการวิเคราะห์องค์ประกอบร่างกายอย่างแม่นยำ</p>
                </div>
                <div>
                    <h5 class="font-bold mb-4">ลิงก์</h5>
                    <ul class="space-y-2 text-gray-400">
                        <li><a href="#" class="hover:text-white transition">หน้าแรก</a></li>
                        <li><a href="#" class="hover:text-white transition">เกี่ยวกับเรา</a></li>
                        <li><a href="#" class="hover:text-white transition">บริการ</a></li>
                        <li><a href="#" class="hover:text-white transition">ติดต่อ</a></li>
                    </ul>
                </div>
                <div>
                    <h5 class="font-bold mb-4">บริการ</h5>
                    <ul class="space-y-2 text-gray-400">
                        <li><a href="#" class="hover:text-white transition">การวิเคราะห์องค์ประกอบร่างกาย</a></li>
                        <li><a href="#" class="hover:text-white transition">ติดตามความคืบหน้า</a></li>
                        <li><a href="#" class="hover:text-white transition">วางแผนสุขภาพ</a></li>
                        <li><a href="#" class="hover:text-white transition">รายงานผล</a></li>
                    </ul>
                </div>
                <div>
                    <h5 class="font-bold mb-4">ติดต่อเรา</h5>
                    <ul class="space-y-2 text-gray-400">
                        <li class="flex items-start">
                            <i data-feather="mail" class="w-5 h-5 mr-2 mt-1"></i>
                            <span>contact@bodycomp.com</span>
                        </li>
                        <li class="flex items-start">
                            <i data-feather="phone" class="w-5 h-5 mr-2 mt-1"></i>
                            <span>+66 123 456 789</span>
                        </li>
                        <li class="flex items-start">
                            <i data-feather="map-pin" class="w-5 h-5 mr-2 mt-1"></i>
                            <span>กรุงเทพฯ, ประเทศไทย</span>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-500">
                <p>&copy; 2023 Body Composition Comparator. สงวนลิขสิทธิ์.</p>
            </div>
        </div>
    </footer>

    <script>
        feather.replace();
        
        // Chart initialization
        document.addEventListener('DOMContentLoaded', function() {
            const ctx = document.getElementById('comparisonChart').getContext('2d');
            const comparisonChart = new Chart(ctx, {
                type: 'bar',
                data: {
                    labels: ['น้ำหนัก (kg)', 'ไขมัน (%)', 'กล้ามเนื้อ (%)', 'น้ำ (%)', 'กระดูก (kg)', 'โปรตีน (%)'],
                    datasets: [
                        {
                            label: 'การวัดครั้งแรก',
                            data: [73.7, 20.6, 56.4, 58.3, 3.2, 18.7],
                            backgroundColor: 'rgba(99, 102, 241, 0.7)',
                            borderColor: 'rgba(99, 102, 241, 1)',
                            borderWidth: 1
                        },
                        {
                            label: 'การวัดครั้งที่สอง',
                            data: [72.5, 18.5, 58.2, 59.1, 3.3, 19.2],
                            backgroundColor: 'rgba(139, 92, 246, 0.7)',
                            borderColor: 'rgba(139, 92, 246, 1)',
                            borderWidth: 1
                        }
                    ]
                },
                options: {
                    responsive: true,
                    plugins: {
                        legend: {
                            position: 'top',
                        },
                        tooltip: {
                            callbacks: {
                                label: function(context) {
                                    let label = context.dataset.label || '';
                                    if (label) {
                                        label += ': ';
                                    }
                                    if (context.parsed.y !== null) {
                                        label += context.parsed.y + (context.datasetIndex === 0 ? '' : '');
                                    }
                                    return label;
                                }
                            }
                        }
                    },
                    scales: {
                        y: {
                            beginAtZero: false,
                            grid: {
                                color: 'rgba(0, 0, 0, 0.05)'
                            }
                        },
                        x: {
                            grid: {
                                display: false
                            }
                        }
                    }
                }
            });
        });
    </script>
</body>
</html>