joung commited on
Commit
5178f5a
ยท
verified ยท
1 Parent(s): 3467c33

Add 2 files

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +454 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Joung Nag
3
- emoji: ๐Ÿ†
4
- colorFrom: green
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: joung-nag
3
+ emoji: ๐Ÿณ
4
+ colorFrom: yellow
5
+ colorTo: gray
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,454 @@
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="ko">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>HealthTrack - BMI ๊ณ„์‚ฐ๊ธฐ</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');
11
+
12
+ body {
13
+ font-family: 'Noto Sans KR', sans-serif;
14
+ background-color: #f8fafc;
15
+ }
16
+
17
+ .gradient-bg {
18
+ background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
19
+ }
20
+
21
+ .bmi-scale {
22
+ height: 8px;
23
+ background: linear-gradient(90deg, #10b981 0%, #f59e0b 50%, #ef4444 100%);
24
+ border-radius: 4px;
25
+ }
26
+
27
+ .marker {
28
+ position: absolute;
29
+ top: -10px;
30
+ width: 0;
31
+ height: 0;
32
+ border-left: 10px solid transparent;
33
+ border-right: 10px solid transparent;
34
+ border-top: 10px solid #3b82f6;
35
+ transform: translateX(-10px);
36
+ transition: left 0.5s ease;
37
+ }
38
+
39
+ .result-card {
40
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
41
+ transition: all 0.3s ease;
42
+ }
43
+
44
+ .result-card:hover {
45
+ transform: translateY(-5px);
46
+ box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.15);
47
+ }
48
+
49
+ input[type="range"]::-webkit-slider-thumb {
50
+ -webkit-appearance: none;
51
+ width: 20px;
52
+ height: 20px;
53
+ border-radius: 50%;
54
+ background: #3b82f6;
55
+ cursor: pointer;
56
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
57
+ }
58
+
59
+ input[type="range"]::-moz-range-thumb {
60
+ width: 20px;
61
+ height: 20px;
62
+ border-radius: 50%;
63
+ background: #3b82f6;
64
+ cursor: pointer;
65
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
66
+ }
67
+ </style>
68
+ </head>
69
+ <body class="min-h-screen flex flex-col">
70
+ <!-- ํ—ค๋” ์„น์…˜ -->
71
+ <header class="gradient-bg text-white py-6">
72
+ <div class="container mx-auto px-4">
73
+ <div class="flex items-center justify-between">
74
+ <div class="flex items-center space-x-3">
75
+ <div class="bg-white rounded-full p-2">
76
+ <i class="fas fa-heartbeat text-2xl text-blue-500"></i>
77
+ </div>
78
+ <h1 class="text-2xl font-bold">HealthTrack</h1>
79
+ </div>
80
+ <div class="hidden md:block">
81
+ <span class="text-blue-100">๋‹น์‹ ์˜ ๊ฑด๊ฐ•์„ ์œ„ํ•œ ์ฒซ ๊ฑธ์Œ</span>
82
+ </div>
83
+ </div>
84
+ </div>
85
+ </header>
86
+
87
+ <!-- ๋ฉ”์ธ ์ฝ˜ํ…์ธ  -->
88
+ <main class="flex-grow container mx-auto px-4 py-8">
89
+ <div class="max-w-3xl mx-auto">
90
+ <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
91
+ <div class="p-6 md:p-8">
92
+ <h2 class="text-2xl font-bold text-gray-800 mb-6">์ฒด์งˆ๋Ÿ‰ ์ง€์ˆ˜(BMI) ๊ณ„์‚ฐ๊ธฐ</h2>
93
+
94
+ <div class="grid md:grid-cols-2 gap-6">
95
+ <!-- ํ‚ค ์ž…๋ ฅ ์„น์…˜ -->
96
+ <div class="space-y-4">
97
+ <div>
98
+ <label for="height" class="block text-sm font-medium text-gray-700 mb-1">ํ‚ค (cm)</label>
99
+ <div class="relative">
100
+ <input type="number" id="height" min="100" max="250" step="0.1"
101
+ class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
102
+ placeholder="์˜ˆ: 175">
103
+ <div class="absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none">
104
+ <span class="text-gray-500">cm</span>
105
+ </div>
106
+ </div>
107
+ <div class="mt-2">
108
+ <input type="range" id="height-slider" min="100" max="250" value="170"
109
+ class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer">
110
+ </div>
111
+ </div>
112
+
113
+ <!-- ์ฒด์ค‘ ์ž…๋ ฅ ์„น์…˜ -->
114
+ <div>
115
+ <label for="weight" class="block text-sm font-medium text-gray-700 mb-1">์ฒด์ค‘ (kg)</label>
116
+ <div class="relative">
117
+ <input type="number" id="weight" min="30" max="200" step="0.1"
118
+ class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
119
+ placeholder="์˜ˆ: 70">
120
+ <div class="absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none">
121
+ <span class="text-gray-500">kg</span>
122
+ </div>
123
+ </div>
124
+ <div class="mt-2">
125
+ <input type="range" id="weight-slider" min="30" max="200" value="65"
126
+ class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer">
127
+ </div>
128
+ </div>
129
+
130
+ <button id="calculate-btn"
131
+ class="w-full gradient-bg text-white py-3 px-4 rounded-lg font-medium hover:opacity-90 transition duration-300 flex items-center justify-center space-x-2">
132
+ <i class="fas fa-calculator"></i>
133
+ <span>BMI ๊ณ„์‚ฐํ•˜๊ธฐ</span>
134
+ </button>
135
+ </div>
136
+
137
+ <!-- BMI ์Šค์ผ€์ผ ์‹œ๊ฐํ™” -->
138
+ <div class="flex flex-col justify-center">
139
+ <div class="bg-gray-50 p-4 rounded-lg border border-gray-200">
140
+ <h3 class="text-lg font-medium text-gray-800 mb-3">BMI ๋ฒ”์œ„</h3>
141
+ <div class="relative mb-8">
142
+ <div class="bmi-scale"></div>
143
+ <div class="marker" id="bmi-marker"></div>
144
+ </div>
145
+ <div class="grid grid-cols-5 gap-1 text-xs text-center">
146
+ <div class="text-green-600">์ €์ฒด์ค‘<br>(18.5 ๋ฏธ๋งŒ)</div>
147
+ <div class="text-green-700">์ •์ƒ<br>(18.5-23)</div>
148
+ <div class="text-yellow-600">๊ณผ์ฒด์ค‘<br>(23-25)</div>
149
+ <div class="text-orange-600">๋น„๋งŒ<br>(25-30)</div>
150
+ <div class="text-red-600">๊ณ ๋„๋น„๋งŒ<br>(30 ์ด์ƒ)</div>
151
+ </div>
152
+ </div>
153
+ </div>
154
+ </div>
155
+ </div>
156
+ </div>
157
+
158
+ <!-- ๊ฒฐ๊ณผ ์„น์…˜ (์ฒ˜์Œ์—๋Š” ์ˆจ๊ฒจ์ง) -->
159
+ <div id="result-section" class="hidden">
160
+ <div class="result-card bg-white rounded-xl shadow-md overflow-hidden mb-8">
161
+ <div class="p-6 md:p-8">
162
+ <h2 class="text-2xl font-bold text-gray-800 mb-4">๋‹น์‹ ์˜ BMI ๊ฒฐ๊ณผ</h2>
163
+
164
+ <div class="grid md:grid-cols-3 gap-6 mb-6">
165
+ <!-- BMI ์ˆ˜์น˜ ์นด๋“œ -->
166
+ <div class="bg-blue-50 rounded-lg p-4 border border-blue-100">
167
+ <div class="flex items-center justify-between">
168
+ <h3 class="text-lg font-medium text-blue-800">BMI ์ง€์ˆ˜</h3>
169
+ <i class="fas fa-chart-line text-blue-400 text-xl"></i>
170
+ </div>
171
+ <div class="mt-2">
172
+ <span id="bmi-value" class="text-3xl font-bold text-blue-600">0.00</span>
173
+ </div>
174
+ </div>
175
+
176
+ <!-- ๋ถ„๋ฅ˜ ์นด๋“œ -->
177
+ <div class="bg-green-50 rounded-lg p-4 border border-green-100">
178
+ <div class="flex items-center justify-between">
179
+ <h3 class="text-lg font-medium text-green-800">์ฒด์งˆ๋Ÿ‰ ๋ถ„๋ฅ˜</h3>
180
+ <i class="fas fa-tag text-green-400 text-xl"></i>
181
+ </div>
182
+ <div class="mt-2">
183
+ <span id="bmi-category" class="text-2xl font-bold text-green-600">-</span>
184
+ </div>
185
+ </div>
186
+
187
+ <!-- ์ด์ƒ์  ์ฒด์ค‘ ์นด๋“œ -->
188
+ <div class="bg-purple-50 rounded-lg p-4 border border-purple-100">
189
+ <div class="flex items-center justify-between">
190
+ <h3 class="text-lg font-medium text-purple-800">์ด์ƒ์  ์ฒด์ค‘ ๋ฒ”์œ„</h3>
191
+ <i class="fas fa-weight text-purple-400 text-xl"></i>
192
+ </div>
193
+ <div class="mt-2">
194
+ <span id="ideal-weight" class="text-xl font-bold text-purple-600">- kg</span>
195
+ </div>
196
+ </div>
197
+ </div>
198
+
199
+ <!-- ๊ฑด๊ฐ• ํŒ ์„น์…˜ -->
200
+ <div id="health-tips" class="space-y-4">
201
+ <h3 class="text-xl font-semibold text-gray-800 border-b pb-2">๊ฑด๊ฐ• ๊ด€๋ฆฌ ํŒ</h3>
202
+ <div id="underweight-tips" class="hidden">
203
+ <div class="flex items-start space-x-3">
204
+ <div class="bg-yellow-100 p-2 rounded-full">
205
+ <i class="fas fa-utensils text-yellow-600"></i>
206
+ </div>
207
+ <div>
208
+ <h4 class="font-medium text-gray-800">์ €์ฒด์ค‘์„ ์œ„ํ•œ ์˜์–‘ ์ „๋žต</h4>
209
+ <p class="text-gray-600 text-sm mt-1">๊ณ ์นผ๋กœ๋ฆฌ์ด๋ฉด์„œ ์˜์–‘๊ฐ€ ์žˆ๋Š” ์Œ์‹์„ ์„ญ์ทจํ•˜์„ธ์š”. ๊ฒฌ๊ณผ๋ฅ˜, ์•„๋ณด์นด๋„, ์˜ฌ๋ฆฌ๋ธŒ ์˜ค์ผ๊ณผ ๊ฐ™์€ ๊ฑด๊ฐ•ํ•œ ์ง€๋ฐฉ์„ ์ถ”๊ฐ€ํ•˜๊ณ , ๋‹จ๋ฐฑ์งˆ ์„ญ์ทจ๋ฅผ ๋Š˜๋ฆฌ๋ฉฐ, ์†Œ๋Ÿ‰์˜ ์‹์‚ฌ๋ฅผ ์ž์ฃผ ๋“œ์„ธ์š”.</p>
210
+ </div>
211
+ </div>
212
+ <div class="flex items-start space-x-3 mt-3">
213
+ <div class="bg-blue-100 p-2 rounded-full">
214
+ <i class="fas fa-dumbbell text-blue-600"></i>
215
+ </div>
216
+ <div>
217
+ <h4 class="font-medium text-gray-800">๊ทผ๋ ฅ ์šด๋™ ์ถ”์ฒœ</h4>
218
+ <p class="text-gray-600 text-sm mt-1">๊ทผ์œก๋Ÿ‰์„ ์ฆ๊ฐ€์‹œํ‚ค๊ธฐ ์œ„ํ•ด ์ €ํ•ญ ์šด๋™์„ ๊พธ์ค€ํžˆ ํ•˜์„ธ์š”. ์Šค์ฟผํŠธ, ๋ฐ๋“œ๋ฆฌํ”„ํŠธ, ๋ฒค์น˜ํ”„๋ ˆ์Šค์™€ ๊ฐ™์€ ๋ณตํ•ฉ ์šด๋™์ด ํšจ๊ณผ์ ์ด๋ฉฐ, ์ฃผ 2-3ํšŒ ๊ทผ๋ ฅ ํ›ˆ๋ จ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.</p>
219
+ </div>
220
+ </div>
221
+ </div>
222
+
223
+ <div id="normal-tips" class="hidden">
224
+ <div class="flex items-start space-x-3">
225
+ <div class="bg-green-100 p-2 rounded-full">
226
+ <i class="fas fa-check-circle text-green-600"></i>
227
+ </div>
228
+ <div>
229
+ <h4 class="font-medium text-gray-800">ํ˜„ ์ƒํƒœ ์œ ์ง€๋ฅผ ์œ„ํ•œ ์กฐ์–ธ</h4>
230
+ <p class="text-gray-600 text-sm mt-1">๊ท ํ˜• ์žกํžŒ ์‹๋‹จ๊ณผ ๊ทœ์น™์ ์ธ ์šด๋™์„ ์œ ์ง€ํ•˜์„ธ์š”. ๋‹ค์–‘ํ•œ ์ƒ‰๊น”์˜ ์ฑ„์†Œ์™€ ๊ณผ์ผ์„ ์ถฉ๋ถ„ํžˆ ์„ญ์ทจํ•˜๊ณ , ์ •์ œ๋œ ํƒ„์ˆ˜ํ™”๋ฌผ ๋Œ€์‹  ์ „๊ณก์„ ์„ ํƒํ•˜๋ฉฐ, ๊ฐ€๊ณต ์‹ํ’ˆ์„ ์ค„์ด์„ธ์š”.</p>
231
+ </div>
232
+ </div>
233
+ <div class="flex items-start space-x-3 mt-3">
234
+ <div class="bg-blue-100 p-2 rounded-full">
235
+ <i class="fas fa-running text-blue-600"></i>
236
+ </div>
237
+ <div>
238
+ <h4 class="font-medium text-gray-800">์ข…ํ•ฉ์ ์ธ ์šด๋™ ๊ณ„ํš</h4>
239
+ <p class="text-gray-600 text-sm mt-1">์ฃผ 150๋ถ„์˜ ์ค‘๋“ฑ๋„ ์œ ์‚ฐ์†Œ ์šด๋™ ๋˜๋Š” 75๋ถ„์˜ ๊ณ ๊ฐ•๋„ ์œ ์‚ฐ์†Œ ์šด๋™๊ณผ ์ฃผ 2ํšŒ์˜ ๊ทผ๋ ฅ ์šด๋™์„ ์กฐํ•ฉํ•˜์„ธ์š”. ์š”๊ฐ€๋‚˜ ํ•„๋ผํ…Œ์Šค๋กœ ์œ ์—ฐ์„ฑ๋„ ๊ด€๋ฆฌํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.</p>
240
+ </div>
241
+ </div>
242
+ </div>
243
+
244
+ <div id="overweight-tips" class="hidden">
245
+ <div class="flex items-start space-x-3">
246
+ <div class="bg-orange-100 p-2 rounded-full">
247
+ <i class="fas fa-carrot text-orange-600"></i>
248
+ </div>
249
+ <div>
250
+ <h4 class="font-medium text-gray-800">์ฒด์ค‘ ๊ฐ๋Ÿ‰์„ ์œ„ํ•œ ์‹๋‹จ</h4>
251
+ <p class="text-gray-600 text-sm mt-1">ํ•˜๋ฃจ ์„ญ์ทจ ์นผ๋กœ๋ฆฌ๋ฅผ 300-500kcal ์ค„์ด๋˜ ์˜์–‘์†Œ๋Š” ์ถฉ๋ถ„ํžˆ ์„ญ์ทจํ•˜์„ธ์š”. ๋‹จ๋ฐฑ์งˆ ์„ญ์ทจ๋ฅผ ๋Š˜๋ ค ํฌ๋งŒ๊ฐ์„ ์œ ์ง€ํ•˜๊ณ , ์„คํƒ•๊ณผ ์ •์ œ ํƒ„์ˆ˜ํ™”๋ฌผ์„ ์ค„์ด๋ฉฐ, ๋ฌผ์„ ์ถฉ๋ถ„ํžˆ ๋งˆ์‹œ์„ธ์š”.</p>
252
+ </div>
253
+ </div>
254
+ <div class="flex items-start space-x-3 mt-3">
255
+ <div class="bg-blue-100 p-2 rounded-full">
256
+ <i class="fas fa-heartbeat text-blue-600"></i>
257
+ </div>
258
+ <div>
259
+ <h4 class="font-medium text-gray-800">ํšจ๊ณผ์ ์ธ ์šด๋™ ๋ฐฉ๋ฒ•</h4>
260
+ <p class="text-gray-600 text-sm mt-1">์ฃผ 5์ผ, ํ•˜๋ฃจ 30๋ถ„ ์ด์ƒ์˜ ์œ ์‚ฐ์†Œ ์šด๋™(๋น ๋ฅธ ๊ฑท๊ธฐ, ์ˆ˜์˜, ์‚ฌ์ดํด๋ง)๊ณผ ์ฃผ 2-3ํšŒ์˜ ๊ทผ๋ ฅ ์šด๋™์„ ๋ณ‘ํ–‰ํ•˜์„ธ์š”. ์ผ์ƒ ์ƒํ™œ์—์„œ ํ™œ๋™๋Ÿ‰์„ ๋Š˜๋ฆฌ๋Š” ๊ฒƒ๋„ ์ค‘์š”ํ•ฉ๋‹ˆ๋‹ค.</p>
261
+ </div>
262
+ </div>
263
+ </div>
264
+
265
+ <div id="obese-tips" class="hidden">
266
+ <div class="flex items-start space-x-3">
267
+ <div class="bg-red-100 p-2 rounded-full">
268
+ <i class="fas fa-notes-medical text-red-600"></i>
269
+ </div>
270
+ <div>
271
+ <h4 class="font-medium text-gray-800">์˜๋ฃŒ ์ „๋ฌธ๊ฐ€์™€์˜ ์ƒ๋‹ด</h4>
272
+ <p class="text-gray-600 text-sm mt-1">๊ณ ๋„ ๋น„๋งŒ์˜ ๊ฒฝ์šฐ ์ „๋ฌธ์˜์™€ ์ƒ๋‹ดํ•˜์—ฌ ์ฒด๊ณ„์ ์ธ ๊ด€๋ฆฌ ๊ณ„ํš์„ ์ˆ˜๋ฆฝํ•˜์„ธ์š”. ๊ฐœ์ธ ๋งž์ถคํ˜• ์‹๋‹จ๊ณผ ์šด๋™ ํ”„๋กœ๊ทธ๋žจ์ด ํ•„์š”ํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, ๊ธฐ์ € ์งˆํ™˜ ํ™•์ธ์ด ์ค‘์š”ํ•ฉ๋‹ˆ๋‹ค.</p>
273
+ </div>
274
+ </div>
275
+ <div class="flex items-start space-x-3 mt-3">
276
+ <div class="bg-blue-100 p-2 rounded-full">
277
+ <i class="fas fa-walking text-blue-600"></i>
278
+ </div>
279
+ <div>
280
+ <h4 class="font-medium text-gray-800">์•ˆ์ „ํ•œ ์šด๋™ ์ ‘๊ทผ๋ฒ•</h4>
281
+ <p class="text-gray-600 text-sm mt-1">๊ด€์ ˆ์— ๋ฌด๋ฆฌ๊ฐ€ ๊ฐ€์ง€ ์•Š๋Š” ์šด๋™(์ˆ˜์ค‘ ์šด๋™, ์ž์ „๊ฑฐ ํƒ€๊ธฐ)๋ถ€ํ„ฐ ์‹œ์ž‘ํ•˜์„ธ์š”. ์ ์ง„์ ์œผ๋กœ ์šด๋™ ๊ฐ•๋„๋ฅผ ๋†’์ด๊ณ , ์ „๋ฌธ ํŠธ๋ ˆ์ด๋„ˆ์˜ ์ง€๋„๋ฅผ ๋ฐ›๋Š” ๊ฒƒ์ด ์•ˆ์ „ํ•ฉ๋‹ˆ๋‹ค.</p>
282
+ </div>
283
+ </div>
284
+ </div>
285
+ </div>
286
+ </div>
287
+ </div>
288
+ </div>
289
+ </div>
290
+ </main>
291
+
292
+ <!-- ํ‘ธํ„ฐ ์„น์…˜ -->
293
+ <footer class="bg-gray-800 text-white py-6">
294
+ <div class="container mx-auto px-4">
295
+ <div class="flex flex-col md:flex-row justify-between items-center">
296
+ <div class="mb-4 md:mb-0">
297
+ <div class="flex items-center space-x-2">
298
+ <i class="fas fa-heartbeat text-xl text-blue-400"></i>
299
+ <span class="font-medium">HealthTrack</span>
300
+ </div>
301
+ <p class="text-gray-400 text-sm mt-1">๋‹น์‹ ์˜ ๊ฑด๊ฐ•์„ ์ฑ…์ž„์ง€๋Š” ํŒŒํŠธ๋„ˆ</p>
302
+ </div>
303
+ <div class="text-sm text-gray-400 text-center md:text-right">
304
+ <p>ยฉ 2023 HealthTrack. All rights reserved.</p>
305
+ <p class="mt-1">์ด ๊ฒฐ๊ณผ๋Š” ์ฐธ๊ณ ์šฉ์ด๋ฉฐ, ์ „๋ฌธ ์˜๋ฃŒ ์ƒ๋‹ด์„ ๋Œ€์ฒดํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.</p>
306
+ </div>
307
+ </div>
308
+ </div>
309
+ </footer>
310
+
311
+ <script>
312
+ document.addEventListener('DOMContentLoaded', function() {
313
+ // DOM ์š”์†Œ ์„ ํƒ
314
+ const heightInput = document.getElementById('height');
315
+ const weightInput = document.getElementById('weight');
316
+ const heightSlider = document.getElementById('height-slider');
317
+ const weightSlider = document.getElementById('weight-slider');
318
+ const calculateBtn = document.getElementById('calculate-btn');
319
+ const resultSection = document.getElementById('result-section');
320
+ const bmiValue = document.getElementById('bmi-value');
321
+ const bmiCategory = document.getElementById('bmi-category');
322
+ const idealWeight = document.getElementById('ideal-weight');
323
+ const bmiMarker = document.getElementById('bmi-marker');
324
+
325
+ // ์ž…๋ ฅ ํ•„๋“œ์™€ ์Šฌ๋ผ์ด๋” ๋™๊ธฐํ™”
326
+ heightInput.addEventListener('input', function() {
327
+ heightSlider.value = this.value;
328
+ });
329
+
330
+ heightSlider.addEventListener('input', function() {
331
+ heightInput.value = this.value;
332
+ });
333
+
334
+ weightInput.addEventListener('input', function() {
335
+ weightSlider.value = this.value;
336
+ });
337
+
338
+ weightSlider.addEventListener('input', function() {
339
+ weightInput.value = this.value;
340
+ });
341
+
342
+ // BMI ๊ณ„์‚ฐ ํ•จ์ˆ˜
343
+ function calculateBMI(height, weight) {
344
+ // cm๋ฅผ m๋กœ ๋ณ€ํ™˜
345
+ const heightInMeters = height / 100;
346
+ // BMI ๊ณ„์‚ฐ: ์ฒด์ค‘(kg) / (ํ‚ค(m))^2
347
+ return weight / (heightInMeters * heightInMeters);
348
+ }
349
+
350
+ // BMI ๋ถ„๋ฅ˜ ๊ฒฐ์ • ํ•จ์ˆ˜ (ํ•œ๊ตญ ๊ธฐ์ค€)
351
+ function getBMICategory(bmi) {
352
+ if (bmi < 18.5) return '์ €์ฒด์ค‘';
353
+ if (bmi < 23) return '์ •์ƒ ์ฒด์ค‘';
354
+ if (bmi < 25) return '๊ณผ์ฒด์ค‘';
355
+ if (bmi < 30) return '๋น„๋งŒ';
356
+ return '๊ณ ๋„ ๋น„๋งŒ';
357
+ }
358
+
359
+ // BMI์— ๋”ฐ๋ฅธ ์ƒ‰์ƒ ๋ฐ˜ํ™˜
360
+ function getBMIColor(bmi) {
361
+ if (bmi < 18.5) return 'text-yellow-500';
362
+ if (bmi < 23) return 'text-green-600';
363
+ if (bmi < 25) return 'text-yellow-600';
364
+ if (bmi < 30) return 'text-orange-600';
365
+ return 'text-red-600';
366
+ }
367
+
368
+ // ์ด์ƒ์  ์ฒด์ค‘ ๋ฒ”์œ„ ๊ณ„์‚ฐ
369
+ function getIdealWeightRange(height) {
370
+ const heightInMeters = height / 100;
371
+ const lower = 18.5 * (heightInMeters * heightInMeters);
372
+ const upper = 23 * (heightInMeters * heightInMeters);
373
+ return `${lower.toFixed(1)} - ${upper.toFixed(1)}`;
374
+ }
375
+
376
+ // BMI ๋งˆ์ปค ์œ„์น˜ ์—…๋ฐ์ดํŠธ
377
+ function updateBMIMarker(bmi) {
378
+ // BMI ๋ฒ”์œ„: 15 ~ 40 (์‹œ๊ฐํ™”๋ฅผ ์œ„ํ•œ ๋ฒ”์œ„)
379
+ const minBMI = 15;
380
+ const maxBMI = 40;
381
+
382
+ // ์‹ค์ œ BMI๊ฐ€ ์‹œ๊ฐํ™” ๋ฒ”์œ„๋ฅผ ๋ฒ—์–ด๋‚˜๋Š” ๊ฒฝ์šฐ ์กฐ์ •
383
+ let displayBMI = Math.max(minBMI, Math.min(maxBMI, bmi));
384
+
385
+ // ๋งˆ์ปค ์œ„์น˜ ๊ณ„์‚ฐ (0% ~ 100%)
386
+ const percentage = ((displayBMI - minBMI) / (maxBMI - minBMI)) * 100;
387
+ bmiMarker.style.left = `${percentage}%`;
388
+
389
+ // ๋งˆ์ปค ์ƒ‰์ƒ ์—…๋ฐ์ดํŠธ
390
+ bmiMarker.style.borderTopColor = getBMIColor(bmi).replace('text', 'bg').split('-')[1];
391
+ }
392
+
393
+ // ๊ฑด๊ฐ• ํŒ ํ‘œ์‹œ
394
+ function showHealthTips(bmi) {
395
+ // ๋ชจ๋“  ํŒ ์ˆจ๊ธฐ๊ธฐ
396
+ document.querySelectorAll('#health-tips > div').forEach(el => {
397
+ el.classList.add('hidden');
398
+ });
399
+
400
+ // BMI ๋ฒ”์œ„์— ๋”ฐ๋ผ ํ•ด๋‹น ํŒ ํ‘œ์‹œ
401
+ if (bmi < 18.5) {
402
+ document.getElementById('underweight-tips').classList.remove('hidden');
403
+ } else if (bmi < 23) {
404
+ document.getElementById('normal-tips').classList.remove('hidden');
405
+ } else if (bmi < 25) {
406
+ document.getElementById('overweight-tips').classList.remove('hidden');
407
+ } else {
408
+ document.getElementById('obese-tips').classList.remove('hidden');
409
+ }
410
+ }
411
+
412
+ // ๊ณ„์‚ฐ ๋ฒ„ํŠผ ํด๋ฆญ ์ด๋ฒคํŠธ
413
+ calculateBtn.addEventListener('click', function() {
414
+ const height = parseFloat(heightInput.value);
415
+ const weight = parseFloat(weightInput.value);
416
+
417
+ // ์ž…๋ ฅ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ
418
+ if (isNaN(height) || isNaN(weight) || height <= 0 || weight <= 0) {
419
+ alert('์˜ฌ๋ฐ”๋ฅธ ํ‚ค์™€ ์ฒด์ค‘์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.');
420
+ return;
421
+ }
422
+
423
+ // BMI ๊ณ„์‚ฐ
424
+ const bmi = calculateBMI(height, weight);
425
+ const roundedBMI = bmi.toFixed(2);
426
+ const category = getBMICategory(bmi);
427
+ const idealRange = getIdealWeightRange(height);
428
+
429
+ // ๊ฒฐ๊ณผ ์—…๋ฐ์ดํŠธ
430
+ bmiValue.textContent = roundedBMI;
431
+ bmiValue.className = `text-3xl font-bold ${getBMIColor(bmi)}`;
432
+ bmiCategory.textContent = category;
433
+ bmiCategory.className = `text-2xl font-bold ${getBMIColor(bmi)}`;
434
+ idealWeight.textContent = `${idealRange} kg`;
435
+
436
+ // BMI ๋งˆ์ปค ์—…๋ฐ์ดํŠธ
437
+ updateBMIMarker(bmi);
438
+
439
+ // ๊ฑด๊ฐ• ํŒ ํ‘œ์‹œ
440
+ showHealthTips(bmi);
441
+
442
+ // ๊ฒฐ๊ณผ ์„น์…˜ ํ‘œ์‹œ
443
+ resultSection.classList.remove('hidden');
444
+
445
+ // ๊ฒฐ๊ณผ ์„น์…˜์œผ๋กœ ์Šคํฌ๋กค
446
+ resultSection.scrollIntoView({ behavior: 'smooth' });
447
+ });
448
+
449
+ // ์ดˆ๊ธฐ ๋งˆ์ปค ์œ„์น˜ ์„ค์ • (์ค‘๊ฐ„ ๊ฐ’)
450
+ updateBMIMarker(22);
451
+ });
452
+ </script>
453
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - ๐Ÿงฌ <a href="https://enzostvs-deepsite.hf.space?remix=joung/joung-nag" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
454
+ </html>