Spaces:
Sleeping
Sleeping
Update index.html
Browse files- index.html +539 -538
index.html
CHANGED
|
@@ -1,538 +1,539 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="id">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8" />
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
-
<title>Deteksi Tumor Otak</title>
|
| 7 |
-
<style>
|
| 8 |
-
/* === GLOBAL === */
|
| 9 |
-
* {
|
| 10 |
-
margin: 0;
|
| 11 |
-
padding: 0;
|
| 12 |
-
box-sizing: border-box;
|
| 13 |
-
font-family: 'Poppins', sans-serif;
|
| 14 |
-
}
|
| 15 |
-
|
| 16 |
-
body {
|
| 17 |
-
background-color: #0b1120;
|
| 18 |
-
color: white;
|
| 19 |
-
overflow-x: hidden;
|
| 20 |
-
}
|
| 21 |
-
|
| 22 |
-
h1, h2, h3 {
|
| 23 |
-
color: #00ffff;
|
| 24 |
-
}
|
| 25 |
-
|
| 26 |
-
button {
|
| 27 |
-
background-color: transparent;
|
| 28 |
-
border: 2px solid #00ffff;
|
| 29 |
-
color: #00ffff;
|
| 30 |
-
padding: 12px 24px;
|
| 31 |
-
font-size: 1rem;
|
| 32 |
-
border-radius: 10px;
|
| 33 |
-
cursor: pointer;
|
| 34 |
-
transition: 0.3s;
|
| 35 |
-
}
|
| 36 |
-
|
| 37 |
-
button:hover {
|
| 38 |
-
background-color: #00ffff;
|
| 39 |
-
color: #0b1120;
|
| 40 |
-
transform: scale(1.05);
|
| 41 |
-
}
|
| 42 |
-
|
| 43 |
-
section {
|
| 44 |
-
display: none;
|
| 45 |
-
min-height: 100vh;
|
| 46 |
-
padding: 40px;
|
| 47 |
-
text-align: center;
|
| 48 |
-
justify-content: center;
|
| 49 |
-
align-items: center;
|
| 50 |
-
flex-direction: column;
|
| 51 |
-
}
|
| 52 |
-
|
| 53 |
-
section.active {
|
| 54 |
-
display: flex;
|
| 55 |
-
}
|
| 56 |
-
|
| 57 |
-
.neon-text {
|
| 58 |
-
text-shadow: 0 0 5px rgb(255, 255, 255), 0 0 10px rgb(0, 255, 255);
|
| 59 |
-
color: #000000;
|
| 60 |
-
}
|
| 61 |
-
|
| 62 |
-
.btn-group {
|
| 63 |
-
display: flex;
|
| 64 |
-
gap: 20px;
|
| 65 |
-
margin-top: 30px;
|
| 66 |
-
justify-content: center;
|
| 67 |
-
flex-wrap: wrap;
|
| 68 |
-
}
|
| 69 |
-
|
| 70 |
-
/* === HALAMAN UTAMA === */
|
| 71 |
-
#home h1 {
|
| 72 |
-
font-size: 3rem;
|
| 73 |
-
margin-bottom: 10px;
|
| 74 |
-
}
|
| 75 |
-
|
| 76 |
-
#home img {
|
| 77 |
-
width: 340px;
|
| 78 |
-
margin-top: 30px;
|
| 79 |
-
filter: drop-shadow(0 0 8px rgba(28, 131, 131, 0.3));
|
| 80 |
-
opacity: 0.9;
|
| 81 |
-
}
|
| 82 |
-
|
| 83 |
-
/* === HALAMAN INFO === */
|
| 84 |
-
.info-container {
|
| 85 |
-
max-width: 800px;
|
| 86 |
-
margin: 30px auto;
|
| 87 |
-
background: rgba(0, 255, 255, 0.05);
|
| 88 |
-
border: 1px solid rgba(0, 255, 255, 0.2);
|
| 89 |
-
border-radius: 15px;
|
| 90 |
-
padding: 30px 40px;
|
| 91 |
-
text-align: left;
|
| 92 |
-
box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
|
| 93 |
-
backdrop-filter: blur(6px);
|
| 94 |
-
}
|
| 95 |
-
|
| 96 |
-
.info-paragraph {
|
| 97 |
-
font-size: 1.05rem;
|
| 98 |
-
line-height: 1.8;
|
| 99 |
-
color: #e0faff;
|
| 100 |
-
margin-bottom: 20px;
|
| 101 |
-
text-align: justify;
|
| 102 |
-
text-shadow: 0 0 5px rgba(0, 255, 255, 0.2);
|
| 103 |
-
}
|
| 104 |
-
|
| 105 |
-
.info-list {
|
| 106 |
-
list-style: none;
|
| 107 |
-
margin-top: 10px;
|
| 108 |
-
margin-bottom: 25px;
|
| 109 |
-
padding-left: 0;
|
| 110 |
-
}
|
| 111 |
-
|
| 112 |
-
.info-list li {
|
| 113 |
-
background: rgba(0, 255, 255, 0.08);
|
| 114 |
-
border-left: 3px solid #00ffff;
|
| 115 |
-
margin-bottom: 12px;
|
| 116 |
-
padding: 12px 18px;
|
| 117 |
-
border-radius: 10px;
|
| 118 |
-
color: #ccf9ff;
|
| 119 |
-
font-size: 1rem;
|
| 120 |
-
transition: all 0.3s ease;
|
| 121 |
-
}
|
| 122 |
-
|
| 123 |
-
/* === HALAMAN SCAN === */
|
| 124 |
-
#scan .scan-frame {
|
| 125 |
-
width: 400px;
|
| 126 |
-
height: 300px;
|
| 127 |
-
border: 3px dashed #00ffff;
|
| 128 |
-
border-radius: 20px;
|
| 129 |
-
margin: 30px auto;
|
| 130 |
-
display: flex;
|
| 131 |
-
justify-content: center;
|
| 132 |
-
align-items: center;
|
| 133 |
-
color: #00ffff;
|
| 134 |
-
font-size: 1.1rem;
|
| 135 |
-
text-align: center;
|
| 136 |
-
overflow: hidden;
|
| 137 |
-
}
|
| 138 |
-
|
| 139 |
-
#scan img {
|
| 140 |
-
width: 100%;
|
| 141 |
-
height: 100%;
|
| 142 |
-
object-fit: cover;
|
| 143 |
-
}
|
| 144 |
-
|
| 145 |
-
.alert {
|
| 146 |
-
color: #ff6666;
|
| 147 |
-
margin-top: 10px;
|
| 148 |
-
font-size: 0.95rem;
|
| 149 |
-
}
|
| 150 |
-
|
| 151 |
-
/* === HASIL SCAN === */
|
| 152 |
-
#result .result-box {
|
| 153 |
-
border: 2px solid #00ffff;
|
| 154 |
-
border-radius: 20px;
|
| 155 |
-
padding: 20px;
|
| 156 |
-
width: 400px;
|
| 157 |
-
margin-top: 20px;
|
| 158 |
-
background-color: rgba(0, 255, 255, 0.1);
|
| 159 |
-
}
|
| 160 |
-
|
| 161 |
-
.spinner {
|
| 162 |
-
border: 4px solid rgba(0, 255, 255, 0.2);
|
| 163 |
-
border-top: 4px solid #00ffff;
|
| 164 |
-
border-radius: 50%;
|
| 165 |
-
width: 60px;
|
| 166 |
-
height: 60px;
|
| 167 |
-
animation: spin 1s linear infinite;
|
| 168 |
-
margin: 20px auto;
|
| 169 |
-
}
|
| 170 |
-
|
| 171 |
-
@keyframes spin {
|
| 172 |
-
from { transform: rotate(0deg); }
|
| 173 |
-
to { transform: rotate(360deg); }
|
| 174 |
-
}
|
| 175 |
-
|
| 176 |
-
/* === HISTORY === */
|
| 177 |
-
#history table {
|
| 178 |
-
width: 85%;
|
| 179 |
-
margin: 0 auto;
|
| 180 |
-
border-collapse: collapse;
|
| 181 |
-
color: white;
|
| 182 |
-
}
|
| 183 |
-
|
| 184 |
-
#history th, #history td {
|
| 185 |
-
border: 1px solid #00ffff;
|
| 186 |
-
padding: 12px;
|
| 187 |
-
text-align: center;
|
| 188 |
-
}
|
| 189 |
-
|
| 190 |
-
#history th {
|
| 191 |
-
background-color: rgba(0, 255, 255, 0.2);
|
| 192 |
-
}
|
| 193 |
-
|
| 194 |
-
/* Thumbnail */
|
| 195 |
-
.thumb {
|
| 196 |
-
width: 70px;
|
| 197 |
-
height: 70px;
|
| 198 |
-
object-fit: cover;
|
| 199 |
-
border-radius: 10px;
|
| 200 |
-
border: 1px solid rgba(0, 255, 255, 0.4);
|
| 201 |
-
transition: 0.3s ease;
|
| 202 |
-
}
|
| 203 |
-
|
| 204 |
-
.thumb:hover {
|
| 205 |
-
transform: scale(1.8);
|
| 206 |
-
border-color: #00ffff;
|
| 207 |
-
z-index: 5;
|
| 208 |
-
}
|
| 209 |
-
|
| 210 |
-
#clearHistory {
|
| 211 |
-
border: 2px solid #ff4444;
|
| 212 |
-
color: #ff4444;
|
| 213 |
-
}
|
| 214 |
-
|
| 215 |
-
#clearHistory:hover {
|
| 216 |
-
background-color: #ff4444;
|
| 217 |
-
color: white;
|
| 218 |
-
}
|
| 219 |
-
|
| 220 |
-
#footer {
|
| 221 |
-
position: fixed;
|
| 222 |
-
bottom: 10px;
|
| 223 |
-
width: 100%;
|
| 224 |
-
text-align: center;
|
| 225 |
-
font-size: 0.9rem;
|
| 226 |
-
color: #00ffff;
|
| 227 |
-
opacity: 0.6;
|
| 228 |
-
}
|
| 229 |
-
/*=== Responsive untuk tablet dan HP ===*/
|
| 230 |
-
@media (max-width: 1024px) {
|
| 231 |
-
section {
|
| 232 |
-
padding: 60px 30px;
|
| 233 |
-
}
|
| 234 |
-
|
| 235 |
-
#home img {
|
| 236 |
-
width: 280px;
|
| 237 |
-
}
|
| 238 |
-
|
| 239 |
-
h1 {
|
| 240 |
-
font-size: 2rem;
|
| 241 |
-
}
|
| 242 |
-
|
| 243 |
-
p, li {
|
| 244 |
-
font-size: 1rem;
|
| 245 |
-
}
|
| 246 |
-
|
| 247 |
-
button {
|
| 248 |
-
font-size: 0.9rem;
|
| 249 |
-
padding: 10px 20px;
|
| 250 |
-
}
|
| 251 |
-
|
| 252 |
-
table {
|
| 253 |
-
font-size: 0.9rem;
|
| 254 |
-
}
|
| 255 |
-
}
|
| 256 |
-
|
| 257 |
-
/*=== Responsive untuk HP kecil ===*/
|
| 258 |
-
@media (max-width: 600px) {
|
| 259 |
-
body {
|
| 260 |
-
font-size: 16px;
|
| 261 |
-
overflow-x: hidden;
|
| 262 |
-
}
|
| 263 |
-
|
| 264 |
-
nav {
|
| 265 |
-
flex-direction: column;
|
| 266 |
-
text-align: center;
|
| 267 |
-
padding: 15px;
|
| 268 |
-
}
|
| 269 |
-
|
| 270 |
-
nav a {
|
| 271 |
-
margin: 8px 0;
|
| 272 |
-
font-size: 1rem;
|
| 273 |
-
}
|
| 274 |
-
|
| 275 |
-
#home {
|
| 276 |
-
text-align: center;
|
| 277 |
-
}
|
| 278 |
-
|
| 279 |
-
#home img {
|
| 280 |
-
width: 200px;
|
| 281 |
-
margin: 20px auto;
|
| 282 |
-
}
|
| 283 |
-
|
| 284 |
-
section {
|
| 285 |
-
padding: 40px 20px;
|
| 286 |
-
}
|
| 287 |
-
|
| 288 |
-
h1 {
|
| 289 |
-
font-size: 1.6rem;
|
| 290 |
-
}
|
| 291 |
-
|
| 292 |
-
p, li {
|
| 293 |
-
font-size: 0.95rem;
|
| 294 |
-
text-align: justify;
|
| 295 |
-
}
|
| 296 |
-
|
| 297 |
-
button {
|
| 298 |
-
width: 100%;
|
| 299 |
-
font-size: 1rem;
|
| 300 |
-
}
|
| 301 |
-
|
| 302 |
-
#scanFrame img {
|
| 303 |
-
width: 100%;
|
| 304 |
-
max-width: 300px;
|
| 305 |
-
height: auto;
|
| 306 |
-
}
|
| 307 |
-
|
| 308 |
-
table {
|
| 309 |
-
width: 100%;
|
| 310 |
-
font-size: 0.8rem;
|
| 311 |
-
border-collapse: collapse;
|
| 312 |
-
}
|
| 313 |
-
|
| 314 |
-
th, td {
|
| 315 |
-
padding: 8px 6px;
|
| 316 |
-
}
|
| 317 |
-
|
| 318 |
-
.thumb {
|
| 319 |
-
width: 45px;
|
| 320 |
-
height: 45px;
|
| 321 |
-
}
|
| 322 |
-
/* Responsive Tabel */
|
| 323 |
-
.table-container {
|
| 324 |
-
overflow-x: auto;
|
| 325 |
-
width: 100%;
|
| 326 |
-
}
|
| 327 |
-
|
| 328 |
-
#history table {
|
| 329 |
-
display: block;
|
| 330 |
-
overflow-x: auto;
|
| 331 |
-
white-space: nowrap;
|
| 332 |
-
}
|
| 333 |
-
}
|
| 334 |
-
</style>
|
| 335 |
-
</head>
|
| 336 |
-
<body>
|
| 337 |
-
|
| 338 |
-
<!-- HOME -->
|
| 339 |
-
<section id="home" class="active">
|
| 340 |
-
<div>
|
| 341 |
-
<h1 class="neon-text">Brain Tumor Detection</h1>
|
| 342 |
-
<p>Simulasi pendeteksian tumor otak</p>
|
| 343 |
-
<img src="download.jpg" alt="Brain Image" />
|
| 344 |
-
<div class="btn-group">
|
| 345 |
-
<button onclick="showPage('scan')">Mulai Scan</button>
|
| 346 |
-
<button onclick="showPage('history')">History</button>
|
| 347 |
-
<button onclick="showPage('info')">Tentang</button>
|
| 348 |
-
</div>
|
| 349 |
-
</div>
|
| 350 |
-
</section>
|
| 351 |
-
|
| 352 |
-
<!-- INFO -->
|
| 353 |
-
<section id="info">
|
| 354 |
-
<h2 class="neon-text">Tentang Aplikasi</h2>
|
| 355 |
-
<div class="info-container">
|
| 356 |
-
<p class="info-paragraph">
|
| 357 |
-
<strong>Brain Tumor Detection</strong> adalah aplikasi berbasis kecerdasan buatan (AI)
|
| 358 |
-
yang dirancang untuk membantu mendeteksi adanya tumor pada otak manusia secara cepat dan akurat.
|
| 359 |
-
Aplikasi ini bekerja dengan cara menganalisis gambar hasil pemindaian otak
|
| 360 |
-
(seperti hasil <b>USG</b>, <b>MRI</b>, atau <b>CT Scan</b>) yang diunggah oleh pengguna.
|
| 361 |
-
</p>
|
| 362 |
-
|
| 363 |
-
<p class="info-paragraph">
|
| 364 |
-
Melalui proses analisis citra digital dan model machine learning, aplikasi ini dapat:
|
| 365 |
-
</p>
|
| 366 |
-
|
| 367 |
-
<ul class="info-list">
|
| 368 |
-
<li>🧠 Mengidentifikasi ada atau tidaknya tumor otak dalam gambar.</li>
|
| 369 |
-
<li>🔬 Menentukan jenis tumor (jinak atau ganas).</li>
|
| 370 |
-
<li>📍 Menunjukkan lokasi atau posisi tumor pada area otak.</li>
|
| 371 |
-
<li>📏 Mengestimasi ukuran atau luas area tumor.</li>
|
| 372 |
-
</ul>
|
| 373 |
-
|
| 374 |
-
<p class="info-paragraph">
|
| 375 |
-
Tujuan utama dari aplikasi ini adalah membantu tenaga medis maupun pasien dalam
|
| 376 |
-
<b>deteksi dini tumor otak</b>, sehingga proses diagnosis dan penanganan dapat dilakukan
|
| 377 |
-
dengan lebih cepat dan tepat.
|
| 378 |
-
</p>
|
| 379 |
-
|
| 380 |
-
<button onclick="showPage('home')">Kembali ke Menu</button>
|
| 381 |
-
</div>
|
| 382 |
-
</section>
|
| 383 |
-
|
| 384 |
-
<!-- SCAN -->
|
| 385 |
-
<section id="scan">
|
| 386 |
-
<h2 class="neon-text">Proses Pemindaian</h2>
|
| 387 |
-
<div class="scan-frame" id="scanFrame">Upload Gambar MRI di Sini</div>
|
| 388 |
-
<input type="file" id="fileInput" accept="image/*" style="display:none" />
|
| 389 |
-
<button onclick="document.getElementById('fileInput').click()">Upload Gambar</button>
|
| 390 |
-
<button onclick="simulateScan()">Mulai Deteksi</button>
|
| 391 |
-
<button onclick="showPage('home')">Kembali</button>
|
| 392 |
-
<div class="alert" id="alertMsg"></div>
|
| 393 |
-
</section>
|
| 394 |
-
|
| 395 |
-
<!-- RESULT -->
|
| 396 |
-
<section id="result">
|
| 397 |
-
<h2 class="neon-text">Hasil Pemindaian</h2>
|
| 398 |
-
<div class="spinner" id="loadingSpinner" style="display:none"></div>
|
| 399 |
-
<div class="result-box" id="resultBox" style="display:none;">
|
| 400 |
-
<p><strong>Hasil:</strong> <span id="resultText">Menganalisis...</span></p>
|
| 401 |
-
<p><strong>Jenis Tumor:</strong> <span id="tumorType">-</span></p>
|
| 402 |
-
<p><strong>Tingkat Kepercayaan:</strong> <span id="confidence">-</span></p>
|
| 403 |
-
<p><strong>Tanggal Deteksi:</strong> <span id="date"></span></p>
|
| 404 |
-
</div>
|
| 405 |
-
<div class="btn-group">
|
| 406 |
-
<button onclick="showPage('home')">Kembali ke Menu</button>
|
| 407 |
-
</div>
|
| 408 |
-
</section>
|
| 409 |
-
|
| 410 |
-
<!-- HISTORY -->
|
| 411 |
-
<section id="history">
|
| 412 |
-
<h2 class="neon-text">History</h2>
|
| 413 |
-
<table>
|
| 414 |
-
<thead>
|
| 415 |
-
<tr>
|
| 416 |
-
<th>No</th>
|
| 417 |
-
<th>Gambar</th>
|
| 418 |
-
<th>Hasil</th>
|
| 419 |
-
<th>Jenis Tumor</th>
|
| 420 |
-
<th>Persentase(%)</th>
|
| 421 |
-
<th>Tanggal</th>
|
| 422 |
-
</tr>
|
| 423 |
-
</thead>
|
| 424 |
-
<tbody id="historyTable"></tbody>
|
| 425 |
-
</table>
|
| 426 |
-
<div class="btn-group" style="margin-top:20px">
|
| 427 |
-
<button id="clearHistory" onclick="clearHistory()">Hapus History</button>
|
| 428 |
-
<button onclick="showPage('home')">Kembali</button>
|
| 429 |
-
</div>
|
| 430 |
-
</section>
|
| 431 |
-
|
| 432 |
-
<div id="footer">© 2025 Brain Tumor Detection By Team-FTI</div>
|
| 433 |
-
|
| 434 |
-
<script>
|
| 435 |
-
|
| 436 |
-
let
|
| 437 |
-
let
|
| 438 |
-
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
document.
|
| 442 |
-
document.getElementById(
|
| 443 |
-
|
| 444 |
-
|
| 445 |
-
|
| 446 |
-
|
| 447 |
-
const
|
| 448 |
-
|
| 449 |
-
|
| 450 |
-
reader
|
| 451 |
-
|
| 452 |
-
|
| 453 |
-
|
| 454 |
-
|
| 455 |
-
|
| 456 |
-
|
| 457 |
-
|
| 458 |
-
|
| 459 |
-
|
| 460 |
-
|
| 461 |
-
|
| 462 |
-
|
| 463 |
-
|
| 464 |
-
|
| 465 |
-
|
| 466 |
-
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
|
| 471 |
-
|
| 472 |
-
const
|
| 473 |
-
|
| 474 |
-
|
| 475 |
-
|
| 476 |
-
|
| 477 |
-
|
| 478 |
-
|
| 479 |
-
|
| 480 |
-
|
| 481 |
-
const
|
| 482 |
-
const
|
| 483 |
-
|
| 484 |
-
|
| 485 |
-
|
| 486 |
-
|
| 487 |
-
|
| 488 |
-
|
| 489 |
-
|
| 490 |
-
|
| 491 |
-
|
| 492 |
-
|
| 493 |
-
document.getElementById('
|
| 494 |
-
document.getElementById('
|
| 495 |
-
document.getElementById('
|
| 496 |
-
|
| 497 |
-
|
| 498 |
-
|
| 499 |
-
|
| 500 |
-
|
| 501 |
-
const
|
| 502 |
-
|
| 503 |
-
|
| 504 |
-
|
| 505 |
-
|
| 506 |
-
|
| 507 |
-
|
| 508 |
-
|
| 509 |
-
|
| 510 |
-
|
| 511 |
-
|
| 512 |
-
|
| 513 |
-
|
| 514 |
-
|
| 515 |
-
|
| 516 |
-
tbody
|
| 517 |
-
|
| 518 |
-
|
| 519 |
-
|
| 520 |
-
|
| 521 |
-
<td>${
|
| 522 |
-
<td>${item.
|
| 523 |
-
<td>${item.
|
| 524 |
-
<td>${item.
|
| 525 |
-
|
| 526 |
-
|
| 527 |
-
|
| 528 |
-
}
|
| 529 |
-
|
| 530 |
-
|
| 531 |
-
|
| 532 |
-
|
| 533 |
-
|
| 534 |
-
|
| 535 |
-
|
| 536 |
-
|
| 537 |
-
</
|
| 538 |
-
</
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="id">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
+
<title>Deteksi Tumor Otak</title>
|
| 7 |
+
<style>
|
| 8 |
+
/* === GLOBAL === */
|
| 9 |
+
* {
|
| 10 |
+
margin: 0;
|
| 11 |
+
padding: 0;
|
| 12 |
+
box-sizing: border-box;
|
| 13 |
+
font-family: 'Poppins', sans-serif;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
body {
|
| 17 |
+
background-color: #0b1120;
|
| 18 |
+
color: white;
|
| 19 |
+
overflow-x: hidden;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
h1, h2, h3 {
|
| 23 |
+
color: #00ffff;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
button {
|
| 27 |
+
background-color: transparent;
|
| 28 |
+
border: 2px solid #00ffff;
|
| 29 |
+
color: #00ffff;
|
| 30 |
+
padding: 12px 24px;
|
| 31 |
+
font-size: 1rem;
|
| 32 |
+
border-radius: 10px;
|
| 33 |
+
cursor: pointer;
|
| 34 |
+
transition: 0.3s;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
button:hover {
|
| 38 |
+
background-color: #00ffff;
|
| 39 |
+
color: #0b1120;
|
| 40 |
+
transform: scale(1.05);
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
section {
|
| 44 |
+
display: none;
|
| 45 |
+
min-height: 100vh;
|
| 46 |
+
padding: 40px;
|
| 47 |
+
text-align: center;
|
| 48 |
+
justify-content: center;
|
| 49 |
+
align-items: center;
|
| 50 |
+
flex-direction: column;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
section.active {
|
| 54 |
+
display: flex;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
.neon-text {
|
| 58 |
+
text-shadow: 0 0 5px rgb(255, 255, 255), 0 0 10px rgb(0, 255, 255);
|
| 59 |
+
color: #000000;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
.btn-group {
|
| 63 |
+
display: flex;
|
| 64 |
+
gap: 20px;
|
| 65 |
+
margin-top: 30px;
|
| 66 |
+
justify-content: center;
|
| 67 |
+
flex-wrap: wrap;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
/* === HALAMAN UTAMA === */
|
| 71 |
+
#home h1 {
|
| 72 |
+
font-size: 3rem;
|
| 73 |
+
margin-bottom: 10px;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
#home img {
|
| 77 |
+
width: 340px;
|
| 78 |
+
margin-top: 30px;
|
| 79 |
+
filter: drop-shadow(0 0 8px rgba(28, 131, 131, 0.3));
|
| 80 |
+
opacity: 0.9;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
/* === HALAMAN INFO === */
|
| 84 |
+
.info-container {
|
| 85 |
+
max-width: 800px;
|
| 86 |
+
margin: 30px auto;
|
| 87 |
+
background: rgba(0, 255, 255, 0.05);
|
| 88 |
+
border: 1px solid rgba(0, 255, 255, 0.2);
|
| 89 |
+
border-radius: 15px;
|
| 90 |
+
padding: 30px 40px;
|
| 91 |
+
text-align: left;
|
| 92 |
+
box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
|
| 93 |
+
backdrop-filter: blur(6px);
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
.info-paragraph {
|
| 97 |
+
font-size: 1.05rem;
|
| 98 |
+
line-height: 1.8;
|
| 99 |
+
color: #e0faff;
|
| 100 |
+
margin-bottom: 20px;
|
| 101 |
+
text-align: justify;
|
| 102 |
+
text-shadow: 0 0 5px rgba(0, 255, 255, 0.2);
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
.info-list {
|
| 106 |
+
list-style: none;
|
| 107 |
+
margin-top: 10px;
|
| 108 |
+
margin-bottom: 25px;
|
| 109 |
+
padding-left: 0;
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
.info-list li {
|
| 113 |
+
background: rgba(0, 255, 255, 0.08);
|
| 114 |
+
border-left: 3px solid #00ffff;
|
| 115 |
+
margin-bottom: 12px;
|
| 116 |
+
padding: 12px 18px;
|
| 117 |
+
border-radius: 10px;
|
| 118 |
+
color: #ccf9ff;
|
| 119 |
+
font-size: 1rem;
|
| 120 |
+
transition: all 0.3s ease;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
/* === HALAMAN SCAN === */
|
| 124 |
+
#scan .scan-frame {
|
| 125 |
+
width: 400px;
|
| 126 |
+
height: 300px;
|
| 127 |
+
border: 3px dashed #00ffff;
|
| 128 |
+
border-radius: 20px;
|
| 129 |
+
margin: 30px auto;
|
| 130 |
+
display: flex;
|
| 131 |
+
justify-content: center;
|
| 132 |
+
align-items: center;
|
| 133 |
+
color: #00ffff;
|
| 134 |
+
font-size: 1.1rem;
|
| 135 |
+
text-align: center;
|
| 136 |
+
overflow: hidden;
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
#scan img {
|
| 140 |
+
width: 100%;
|
| 141 |
+
height: 100%;
|
| 142 |
+
object-fit: cover;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
.alert {
|
| 146 |
+
color: #ff6666;
|
| 147 |
+
margin-top: 10px;
|
| 148 |
+
font-size: 0.95rem;
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
/* === HASIL SCAN === */
|
| 152 |
+
#result .result-box {
|
| 153 |
+
border: 2px solid #00ffff;
|
| 154 |
+
border-radius: 20px;
|
| 155 |
+
padding: 20px;
|
| 156 |
+
width: 400px;
|
| 157 |
+
margin-top: 20px;
|
| 158 |
+
background-color: rgba(0, 255, 255, 0.1);
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
.spinner {
|
| 162 |
+
border: 4px solid rgba(0, 255, 255, 0.2);
|
| 163 |
+
border-top: 4px solid #00ffff;
|
| 164 |
+
border-radius: 50%;
|
| 165 |
+
width: 60px;
|
| 166 |
+
height: 60px;
|
| 167 |
+
animation: spin 1s linear infinite;
|
| 168 |
+
margin: 20px auto;
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
@keyframes spin {
|
| 172 |
+
from { transform: rotate(0deg); }
|
| 173 |
+
to { transform: rotate(360deg); }
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
/* === HISTORY === */
|
| 177 |
+
#history table {
|
| 178 |
+
width: 85%;
|
| 179 |
+
margin: 0 auto;
|
| 180 |
+
border-collapse: collapse;
|
| 181 |
+
color: white;
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
#history th, #history td {
|
| 185 |
+
border: 1px solid #00ffff;
|
| 186 |
+
padding: 12px;
|
| 187 |
+
text-align: center;
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
#history th {
|
| 191 |
+
background-color: rgba(0, 255, 255, 0.2);
|
| 192 |
+
}
|
| 193 |
+
|
| 194 |
+
/* Thumbnail */
|
| 195 |
+
.thumb {
|
| 196 |
+
width: 70px;
|
| 197 |
+
height: 70px;
|
| 198 |
+
object-fit: cover;
|
| 199 |
+
border-radius: 10px;
|
| 200 |
+
border: 1px solid rgba(0, 255, 255, 0.4);
|
| 201 |
+
transition: 0.3s ease;
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
.thumb:hover {
|
| 205 |
+
transform: scale(1.8);
|
| 206 |
+
border-color: #00ffff;
|
| 207 |
+
z-index: 5;
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
#clearHistory {
|
| 211 |
+
border: 2px solid #ff4444;
|
| 212 |
+
color: #ff4444;
|
| 213 |
+
}
|
| 214 |
+
|
| 215 |
+
#clearHistory:hover {
|
| 216 |
+
background-color: #ff4444;
|
| 217 |
+
color: white;
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
#footer {
|
| 221 |
+
position: fixed;
|
| 222 |
+
bottom: 10px;
|
| 223 |
+
width: 100%;
|
| 224 |
+
text-align: center;
|
| 225 |
+
font-size: 0.9rem;
|
| 226 |
+
color: #00ffff;
|
| 227 |
+
opacity: 0.6;
|
| 228 |
+
}
|
| 229 |
+
/*=== Responsive untuk tablet dan HP ===*/
|
| 230 |
+
@media (max-width: 1024px) {
|
| 231 |
+
section {
|
| 232 |
+
padding: 60px 30px;
|
| 233 |
+
}
|
| 234 |
+
|
| 235 |
+
#home img {
|
| 236 |
+
width: 280px;
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
h1 {
|
| 240 |
+
font-size: 2rem;
|
| 241 |
+
}
|
| 242 |
+
|
| 243 |
+
p, li {
|
| 244 |
+
font-size: 1rem;
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
button {
|
| 248 |
+
font-size: 0.9rem;
|
| 249 |
+
padding: 10px 20px;
|
| 250 |
+
}
|
| 251 |
+
|
| 252 |
+
table {
|
| 253 |
+
font-size: 0.9rem;
|
| 254 |
+
}
|
| 255 |
+
}
|
| 256 |
+
|
| 257 |
+
/*=== Responsive untuk HP kecil ===*/
|
| 258 |
+
@media (max-width: 600px) {
|
| 259 |
+
body {
|
| 260 |
+
font-size: 16px;
|
| 261 |
+
overflow-x: hidden;
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
+
nav {
|
| 265 |
+
flex-direction: column;
|
| 266 |
+
text-align: center;
|
| 267 |
+
padding: 15px;
|
| 268 |
+
}
|
| 269 |
+
|
| 270 |
+
nav a {
|
| 271 |
+
margin: 8px 0;
|
| 272 |
+
font-size: 1rem;
|
| 273 |
+
}
|
| 274 |
+
|
| 275 |
+
#home {
|
| 276 |
+
text-align: center;
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
+
#home img {
|
| 280 |
+
width: 200px;
|
| 281 |
+
margin: 20px auto;
|
| 282 |
+
}
|
| 283 |
+
|
| 284 |
+
section {
|
| 285 |
+
padding: 40px 20px;
|
| 286 |
+
}
|
| 287 |
+
|
| 288 |
+
h1 {
|
| 289 |
+
font-size: 1.6rem;
|
| 290 |
+
}
|
| 291 |
+
|
| 292 |
+
p, li {
|
| 293 |
+
font-size: 0.95rem;
|
| 294 |
+
text-align: justify;
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
button {
|
| 298 |
+
width: 100%;
|
| 299 |
+
font-size: 1rem;
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
#scanFrame img {
|
| 303 |
+
width: 100%;
|
| 304 |
+
max-width: 300px;
|
| 305 |
+
height: auto;
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
table {
|
| 309 |
+
width: 100%;
|
| 310 |
+
font-size: 0.8rem;
|
| 311 |
+
border-collapse: collapse;
|
| 312 |
+
}
|
| 313 |
+
|
| 314 |
+
th, td {
|
| 315 |
+
padding: 8px 6px;
|
| 316 |
+
}
|
| 317 |
+
|
| 318 |
+
.thumb {
|
| 319 |
+
width: 45px;
|
| 320 |
+
height: 45px;
|
| 321 |
+
}
|
| 322 |
+
/* Responsive Tabel */
|
| 323 |
+
.table-container {
|
| 324 |
+
overflow-x: auto;
|
| 325 |
+
width: 100%;
|
| 326 |
+
}
|
| 327 |
+
|
| 328 |
+
#history table {
|
| 329 |
+
display: block;
|
| 330 |
+
overflow-x: auto;
|
| 331 |
+
white-space: nowrap;
|
| 332 |
+
}
|
| 333 |
+
}
|
| 334 |
+
</style>
|
| 335 |
+
</head>
|
| 336 |
+
<body>
|
| 337 |
+
|
| 338 |
+
<!-- HOME -->
|
| 339 |
+
<section id="home" class="active">
|
| 340 |
+
<div>
|
| 341 |
+
<h1 class="neon-text">Brain Tumor Detection</h1>
|
| 342 |
+
<p>Simulasi pendeteksian tumor otak</p>
|
| 343 |
+
<img src="download.jpg" alt="Brain Image" />
|
| 344 |
+
<div class="btn-group">
|
| 345 |
+
<button onclick="showPage('scan')">Mulai Scan</button>
|
| 346 |
+
<button onclick="showPage('history')">History</button>
|
| 347 |
+
<button onclick="showPage('info')">Tentang</button>
|
| 348 |
+
</div>
|
| 349 |
+
</div>
|
| 350 |
+
</section>
|
| 351 |
+
|
| 352 |
+
<!-- INFO -->
|
| 353 |
+
<section id="info">
|
| 354 |
+
<h2 class="neon-text">Tentang Aplikasi</h2>
|
| 355 |
+
<div class="info-container">
|
| 356 |
+
<p class="info-paragraph">
|
| 357 |
+
<strong>Brain Tumor Detection</strong> adalah aplikasi berbasis kecerdasan buatan (AI)
|
| 358 |
+
yang dirancang untuk membantu mendeteksi adanya tumor pada otak manusia secara cepat dan akurat.
|
| 359 |
+
Aplikasi ini bekerja dengan cara menganalisis gambar hasil pemindaian otak
|
| 360 |
+
(seperti hasil <b>USG</b>, <b>MRI</b>, atau <b>CT Scan</b>) yang diunggah oleh pengguna.
|
| 361 |
+
</p>
|
| 362 |
+
|
| 363 |
+
<p class="info-paragraph">
|
| 364 |
+
Melalui proses analisis citra digital dan model machine learning, aplikasi ini dapat:
|
| 365 |
+
</p>
|
| 366 |
+
|
| 367 |
+
<ul class="info-list">
|
| 368 |
+
<li>🧠 Mengidentifikasi ada atau tidaknya tumor otak dalam gambar.</li>
|
| 369 |
+
<li>🔬 Menentukan jenis tumor (jinak atau ganas).</li>
|
| 370 |
+
<li>📍 Menunjukkan lokasi atau posisi tumor pada area otak.</li>
|
| 371 |
+
<li>📏 Mengestimasi ukuran atau luas area tumor.</li>
|
| 372 |
+
</ul>
|
| 373 |
+
|
| 374 |
+
<p class="info-paragraph">
|
| 375 |
+
Tujuan utama dari aplikasi ini adalah membantu tenaga medis maupun pasien dalam
|
| 376 |
+
<b>deteksi dini tumor otak</b>, sehingga proses diagnosis dan penanganan dapat dilakukan
|
| 377 |
+
dengan lebih cepat dan tepat.
|
| 378 |
+
</p>
|
| 379 |
+
|
| 380 |
+
<button onclick="showPage('home')">Kembali ke Menu</button>
|
| 381 |
+
</div>
|
| 382 |
+
</section>
|
| 383 |
+
|
| 384 |
+
<!-- SCAN -->
|
| 385 |
+
<section id="scan">
|
| 386 |
+
<h2 class="neon-text">Proses Pemindaian</h2>
|
| 387 |
+
<div class="scan-frame" id="scanFrame">Upload Gambar MRI di Sini</div>
|
| 388 |
+
<input type="file" id="fileInput" accept="image/*" style="display:none" />
|
| 389 |
+
<button onclick="document.getElementById('fileInput').click()">Upload Gambar</button>
|
| 390 |
+
<button onclick="simulateScan()">Mulai Deteksi</button>
|
| 391 |
+
<button onclick="showPage('home')">Kembali</button>
|
| 392 |
+
<div class="alert" id="alertMsg"></div>
|
| 393 |
+
</section>
|
| 394 |
+
|
| 395 |
+
<!-- RESULT -->
|
| 396 |
+
<section id="result">
|
| 397 |
+
<h2 class="neon-text">Hasil Pemindaian</h2>
|
| 398 |
+
<div class="spinner" id="loadingSpinner" style="display:none"></div>
|
| 399 |
+
<div class="result-box" id="resultBox" style="display:none;">
|
| 400 |
+
<p><strong>Hasil:</strong> <span id="resultText">Menganalisis...</span></p>
|
| 401 |
+
<p><strong>Jenis Tumor:</strong> <span id="tumorType">-</span></p>
|
| 402 |
+
<p><strong>Tingkat Kepercayaan:</strong> <span id="confidence">-</span></p>
|
| 403 |
+
<p><strong>Tanggal Deteksi:</strong> <span id="date"></span></p>
|
| 404 |
+
</div>
|
| 405 |
+
<div class="btn-group">
|
| 406 |
+
<button onclick="showPage('home')">Kembali ke Menu</button>
|
| 407 |
+
</div>
|
| 408 |
+
</section>
|
| 409 |
+
|
| 410 |
+
<!-- HISTORY -->
|
| 411 |
+
<section id="history">
|
| 412 |
+
<h2 class="neon-text">History</h2>
|
| 413 |
+
<table>
|
| 414 |
+
<thead>
|
| 415 |
+
<tr>
|
| 416 |
+
<th>No</th>
|
| 417 |
+
<th>Gambar</th>
|
| 418 |
+
<th>Hasil</th>
|
| 419 |
+
<th>Jenis Tumor</th>
|
| 420 |
+
<th>Persentase(%)</th>
|
| 421 |
+
<th>Tanggal</th>
|
| 422 |
+
</tr>
|
| 423 |
+
</thead>
|
| 424 |
+
<tbody id="historyTable"></tbody>
|
| 425 |
+
</table>
|
| 426 |
+
<div class="btn-group" style="margin-top:20px">
|
| 427 |
+
<button id="clearHistory" onclick="clearHistory()">Hapus History</button>
|
| 428 |
+
<button onclick="showPage('home')">Kembali</button>
|
| 429 |
+
</div>
|
| 430 |
+
</section>
|
| 431 |
+
|
| 432 |
+
<div id="footer">© 2025 Brain Tumor Detection By Team-FTI</div>
|
| 433 |
+
|
| 434 |
+
<script>
|
| 435 |
+
const apiUrl = 'https://vincentcps-aibraintumor.hf.space/predict';
|
| 436 |
+
let uploadedFile = null;
|
| 437 |
+
let uploadedImageSrc = '';
|
| 438 |
+
let historyData = [];
|
| 439 |
+
|
| 440 |
+
function showPage(pageId) {
|
| 441 |
+
document.querySelectorAll('section').forEach(sec => sec.classList.remove('active'));
|
| 442 |
+
document.getElementById(pageId).classList.add('active');
|
| 443 |
+
document.getElementById('alertMsg').textContent = '';
|
| 444 |
+
}
|
| 445 |
+
|
| 446 |
+
document.getElementById('fileInput').addEventListener('change', e => {
|
| 447 |
+
const file = e.target.files[0];
|
| 448 |
+
const frame = document.getElementById('scanFrame');
|
| 449 |
+
if (file) {
|
| 450 |
+
const reader = new FileReader();
|
| 451 |
+
reader.onload = evt => {
|
| 452 |
+
uploadedImageSrc = evt.target.result;
|
| 453 |
+
frame.innerHTML = `<img src="${evt.target.result}" alt="MRI Preview"/>`;
|
| 454 |
+
};
|
| 455 |
+
reader.readAsDataURL(file);
|
| 456 |
+
uploadedFile = file;
|
| 457 |
+
} else {
|
| 458 |
+
frame.textContent = 'Unggah Gambar MRI di Sini';
|
| 459 |
+
uploadedFile = null;
|
| 460 |
+
uploadedImageSrc = '';
|
| 461 |
+
}
|
| 462 |
+
});
|
| 463 |
+
|
| 464 |
+
function simulateScan() {
|
| 465 |
+
const alert = document.getElementById('alertMsg');
|
| 466 |
+
if (!uploadedFile) {
|
| 467 |
+
alert.textContent = '⚠️ Silakan unggah gambar MRI terlebih dahulu.';
|
| 468 |
+
return;
|
| 469 |
+
}
|
| 470 |
+
|
| 471 |
+
showPage('result');
|
| 472 |
+
const spinner = document.getElementById('loadingSpinner');
|
| 473 |
+
const resultBox = document.getElementById('resultBox');
|
| 474 |
+
spinner.style.display = 'block';
|
| 475 |
+
resultBox.style.display = 'none';
|
| 476 |
+
|
| 477 |
+
setTimeout(() => {
|
| 478 |
+
spinner.style.display = 'none';
|
| 479 |
+
resultBox.style.display = 'block';
|
| 480 |
+
|
| 481 |
+
const result = Math.random() > 0.5 ? 'Tumor Terdeteksi' : 'Tidak Ada Tumor';
|
| 482 |
+
const confidence = (80 + Math.random() * 20).toFixed(2) + '%';
|
| 483 |
+
const date = new Date().toLocaleString('id-ID');
|
| 484 |
+
|
| 485 |
+
|
| 486 |
+
const tumorTypes = ['Glioma (Ganas)', 'Meningioma (Jinak)', 'Pituitary Tumor (Sedang)'];
|
| 487 |
+
let tumorType = '-';
|
| 488 |
+
if (result === 'Tumor Terdeteksi') {
|
| 489 |
+
tumorType = tumorTypes[Math.floor(Math.random() * tumorTypes.length)];
|
| 490 |
+
}
|
| 491 |
+
|
| 492 |
+
|
| 493 |
+
document.getElementById('resultText').textContent = result;
|
| 494 |
+
document.getElementById('tumorType').textContent = tumorType;
|
| 495 |
+
document.getElementById('confidence').textContent = confidence;
|
| 496 |
+
document.getElementById('date').textContent = date;
|
| 497 |
+
|
| 498 |
+
addToHistory(result, tumorType, confidence, date);
|
| 499 |
+
|
| 500 |
+
uploadedFile = null;
|
| 501 |
+
const fileInput = document.getElementById('fileInput');
|
| 502 |
+
const frame = document.getElementById('scanFrame');
|
| 503 |
+
fileInput.value = '';
|
| 504 |
+
frame.textContent = 'Unggah Gambar MRI di Sini';
|
| 505 |
+
}, 2500);
|
| 506 |
+
|
| 507 |
+
}
|
| 508 |
+
|
| 509 |
+
function addToHistory(result, tumorType, confidence, date) {
|
| 510 |
+
historyData.push({ result, tumorType, confidence, date });
|
| 511 |
+
renderHistory();
|
| 512 |
+
}
|
| 513 |
+
|
| 514 |
+
|
| 515 |
+
function renderHistory() {
|
| 516 |
+
const tbody = document.getElementById('historyTable');
|
| 517 |
+
tbody.innerHTML = '';
|
| 518 |
+
historyData.forEach((item, i) => {
|
| 519 |
+
tbody.innerHTML += `
|
| 520 |
+
<tr>
|
| 521 |
+
<td>${i + 1}</td>
|
| 522 |
+
<td>${item.result}</td>
|
| 523 |
+
<td>${item.tumorType}</td>
|
| 524 |
+
<td>${item.confidence}</td>
|
| 525 |
+
<td>${item.date}</td>
|
| 526 |
+
</tr>
|
| 527 |
+
`;
|
| 528 |
+
});
|
| 529 |
+
}
|
| 530 |
+
|
| 531 |
+
function clearHistory() {
|
| 532 |
+
if (confirm('Apakah Anda yakin ingin menghapus semua riwayat deteksi?')) {
|
| 533 |
+
historyData = [];
|
| 534 |
+
renderHistory();
|
| 535 |
+
}
|
| 536 |
+
}
|
| 537 |
+
</script>
|
| 538 |
+
</body>
|
| 539 |
+
</html>
|