Add 2 files
Browse files- README.md +7 -5
- index.html +454 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 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 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>
|