Spaces:
Running
Running
Delete index.html
Browse files- index.html +0 -385
index.html
DELETED
|
@@ -1,385 +0,0 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="zh-TW">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8">
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>雞排怪挑戰遊戲</title>
|
| 7 |
-
<style>
|
| 8 |
-
body {
|
| 9 |
-
font-family: 'Microsoft JhengHei', '微軟正黑體', Arial, sans-serif;
|
| 10 |
-
background-color: #f0f0f0;
|
| 11 |
-
margin: 0;
|
| 12 |
-
padding: 20px;
|
| 13 |
-
color: #333;
|
| 14 |
-
}
|
| 15 |
-
.container {
|
| 16 |
-
max-width: 1000px;
|
| 17 |
-
margin: 0 auto;
|
| 18 |
-
background-color: #fff;
|
| 19 |
-
padding: 20px;
|
| 20 |
-
border-radius: 10px;
|
| 21 |
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
| 22 |
-
}
|
| 23 |
-
h1 {
|
| 24 |
-
text-align: center;
|
| 25 |
-
color: #e74c3c;
|
| 26 |
-
margin-bottom: 20px;
|
| 27 |
-
}
|
| 28 |
-
.section {
|
| 29 |
-
margin-bottom: 20px;
|
| 30 |
-
padding: 15px;
|
| 31 |
-
border-radius: 5px;
|
| 32 |
-
background-color: #f9f9f9;
|
| 33 |
-
}
|
| 34 |
-
.hidden {
|
| 35 |
-
display: none;
|
| 36 |
-
}
|
| 37 |
-
label {
|
| 38 |
-
display: block;
|
| 39 |
-
margin-bottom: 5px;
|
| 40 |
-
font-weight: bold;
|
| 41 |
-
}
|
| 42 |
-
input[type="text"], input[type="number"] {
|
| 43 |
-
width: 100%;
|
| 44 |
-
padding: 8px;
|
| 45 |
-
margin-bottom: 10px;
|
| 46 |
-
border: 1px solid #ddd;
|
| 47 |
-
border-radius: 4px;
|
| 48 |
-
box-sizing: border-box;
|
| 49 |
-
}
|
| 50 |
-
button {
|
| 51 |
-
background-color: #e74c3c;
|
| 52 |
-
color: white;
|
| 53 |
-
border: none;
|
| 54 |
-
padding: 10px 15px;
|
| 55 |
-
border-radius: 4px;
|
| 56 |
-
cursor: pointer;
|
| 57 |
-
font-size: 16px;
|
| 58 |
-
transition: background-color 0.3s;
|
| 59 |
-
}
|
| 60 |
-
button:hover {
|
| 61 |
-
background-color: #c0392b;
|
| 62 |
-
}
|
| 63 |
-
.student-info {
|
| 64 |
-
display: grid;
|
| 65 |
-
grid-template-columns: 1fr 1fr;
|
| 66 |
-
gap: 10px;
|
| 67 |
-
}
|
| 68 |
-
.battle-layout {
|
| 69 |
-
display: flex;
|
| 70 |
-
flex-direction: row;
|
| 71 |
-
gap: 20px;
|
| 72 |
-
align-items: flex-start;
|
| 73 |
-
}
|
| 74 |
-
.battle-left {
|
| 75 |
-
flex: 1;
|
| 76 |
-
display: flex;
|
| 77 |
-
flex-direction: column;
|
| 78 |
-
align-items: center;
|
| 79 |
-
}
|
| 80 |
-
.battle-right {
|
| 81 |
-
flex: 1;
|
| 82 |
-
display: flex;
|
| 83 |
-
flex-direction: column;
|
| 84 |
-
}
|
| 85 |
-
.battle-log {
|
| 86 |
-
height: 300px;
|
| 87 |
-
overflow-y: auto;
|
| 88 |
-
border: 1px solid #ddd;
|
| 89 |
-
padding: 10px;
|
| 90 |
-
margin-bottom: 15px;
|
| 91 |
-
background-color: #f5f5f5;
|
| 92 |
-
border-radius: 5px;
|
| 93 |
-
}
|
| 94 |
-
.progress-container {
|
| 95 |
-
width: 100%;
|
| 96 |
-
background-color: #ddd;
|
| 97 |
-
border-radius: 5px;
|
| 98 |
-
margin: 10px 0;
|
| 99 |
-
}
|
| 100 |
-
.progress-bar {
|
| 101 |
-
height: 20px;
|
| 102 |
-
background-color: #e74c3c;
|
| 103 |
-
border-radius: 5px;
|
| 104 |
-
transition: width 0.5s;
|
| 105 |
-
text-align: center;
|
| 106 |
-
color: white;
|
| 107 |
-
line-height: 20px;
|
| 108 |
-
}
|
| 109 |
-
.equipment {
|
| 110 |
-
margin-top: 10px;
|
| 111 |
-
padding: 10px;
|
| 112 |
-
background-color: #eaf7fd;
|
| 113 |
-
border-radius: 5px;
|
| 114 |
-
}
|
| 115 |
-
.success {
|
| 116 |
-
color: #27ae60;
|
| 117 |
-
font-weight: bold;
|
| 118 |
-
}
|
| 119 |
-
.failure {
|
| 120 |
-
color: #e74c3c;
|
| 121 |
-
font-weight: bold;
|
| 122 |
-
}
|
| 123 |
-
.subject-attack {
|
| 124 |
-
margin: 5px 0;
|
| 125 |
-
padding: 5px;
|
| 126 |
-
background-color: #f0f8ff;
|
| 127 |
-
border-radius: 3px;
|
| 128 |
-
}
|
| 129 |
-
.attack-description {
|
| 130 |
-
margin: 10px 0;
|
| 131 |
-
padding: 10px;
|
| 132 |
-
background-color: #fff8e1;
|
| 133 |
-
border-left: 4px solid #ffb300;
|
| 134 |
-
font-style: italic;
|
| 135 |
-
border-radius: 0 5px 5px 0;
|
| 136 |
-
}
|
| 137 |
-
.strong-attack {
|
| 138 |
-
border-left: 4px solid #e53935;
|
| 139 |
-
background-color: #ffebee;
|
| 140 |
-
}
|
| 141 |
-
.medium-attack {
|
| 142 |
-
border-left: 4px solid #fb8c00;
|
| 143 |
-
background-color: #fff3e0;
|
| 144 |
-
}
|
| 145 |
-
.weak-attack {
|
| 146 |
-
border-left: 4px solid #7cb342;
|
| 147 |
-
background-color: #f1f8e9;
|
| 148 |
-
}
|
| 149 |
-
.emoji-icon {
|
| 150 |
-
font-size: 1.2em;
|
| 151 |
-
margin-right: 5px;
|
| 152 |
-
}
|
| 153 |
-
.audio-credits {
|
| 154 |
-
text-align: center;
|
| 155 |
-
font-size: 12px;
|
| 156 |
-
color: #777;
|
| 157 |
-
margin-top: 20px;
|
| 158 |
-
padding: 10px;
|
| 159 |
-
border-top: 1px solid #eee;
|
| 160 |
-
}
|
| 161 |
-
.monster-image {
|
| 162 |
-
text-align: center;
|
| 163 |
-
margin: 15px 0;
|
| 164 |
-
}
|
| 165 |
-
.monster-image img {
|
| 166 |
-
max-width: 100%;
|
| 167 |
-
max-height: 300px;
|
| 168 |
-
border-radius: 8px;
|
| 169 |
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
| 170 |
-
transition: all 0.5s ease;
|
| 171 |
-
}
|
| 172 |
-
.hp-info {
|
| 173 |
-
text-align: center;
|
| 174 |
-
margin: 10px 0;
|
| 175 |
-
font-weight: bold;
|
| 176 |
-
}
|
| 177 |
-
.holy-item-layout {
|
| 178 |
-
display: flex;
|
| 179 |
-
flex-direction: row;
|
| 180 |
-
gap: 20px;
|
| 181 |
-
}
|
| 182 |
-
.holy-item-left {
|
| 183 |
-
flex: 1;
|
| 184 |
-
}
|
| 185 |
-
.holy-item-right {
|
| 186 |
-
flex: 1;
|
| 187 |
-
display: flex;
|
| 188 |
-
flex-direction: column;
|
| 189 |
-
justify-content: center;
|
| 190 |
-
}
|
| 191 |
-
.result-layout {
|
| 192 |
-
display: flex;
|
| 193 |
-
flex-direction: row;
|
| 194 |
-
gap: 20px;
|
| 195 |
-
}
|
| 196 |
-
.result-left {
|
| 197 |
-
flex: 1;
|
| 198 |
-
text-align: center;
|
| 199 |
-
}
|
| 200 |
-
.result-right {
|
| 201 |
-
flex: 1;
|
| 202 |
-
display: flex;
|
| 203 |
-
flex-direction: column;
|
| 204 |
-
justify-content: center;
|
| 205 |
-
}
|
| 206 |
-
.music-control {
|
| 207 |
-
position: fixed;
|
| 208 |
-
bottom: 20px;
|
| 209 |
-
right: 20px;
|
| 210 |
-
z-index: 1000;
|
| 211 |
-
}
|
| 212 |
-
.score-comparison {
|
| 213 |
-
margin: 15px 0;
|
| 214 |
-
padding: 10px;
|
| 215 |
-
background-color: #f1f8e9;
|
| 216 |
-
border-radius: 5px;
|
| 217 |
-
border-left: 4px solid #7cb342;
|
| 218 |
-
}
|
| 219 |
-
.score-improved {
|
| 220 |
-
color: #2e7d32;
|
| 221 |
-
}
|
| 222 |
-
.score-declined {
|
| 223 |
-
color: #c62828;
|
| 224 |
-
}
|
| 225 |
-
.score-same {
|
| 226 |
-
color: #0277bd;
|
| 227 |
-
}
|
| 228 |
-
.battle-options {
|
| 229 |
-
display: flex;
|
| 230 |
-
gap: 10px;
|
| 231 |
-
margin-top: 15px;
|
| 232 |
-
justify-content: center;
|
| 233 |
-
}
|
| 234 |
-
.battle-options button {
|
| 235 |
-
flex: 1;
|
| 236 |
-
}
|
| 237 |
-
|
| 238 |
-
/* 響應式設計增強 */
|
| 239 |
-
@media (max-width: 768px) {
|
| 240 |
-
.battle-layout, .holy-item-layout, .result-layout {
|
| 241 |
-
flex-direction: column;
|
| 242 |
-
}
|
| 243 |
-
.battle-log {
|
| 244 |
-
height: 200px;
|
| 245 |
-
}
|
| 246 |
-
.student-info {
|
| 247 |
-
grid-template-columns: 1fr;
|
| 248 |
-
}
|
| 249 |
-
.container {
|
| 250 |
-
padding: 15px;
|
| 251 |
-
margin: 0;
|
| 252 |
-
width: auto;
|
| 253 |
-
border-radius: 0;
|
| 254 |
-
}
|
| 255 |
-
body {
|
| 256 |
-
padding: 0;
|
| 257 |
-
margin: 0;
|
| 258 |
-
}
|
| 259 |
-
.battle-options {
|
| 260 |
-
flex-direction: column;
|
| 261 |
-
}
|
| 262 |
-
.monster-image img {
|
| 263 |
-
max-height: 200px;
|
| 264 |
-
}
|
| 265 |
-
}
|
| 266 |
-
|
| 267 |
-
@media (max-width: 480px) {
|
| 268 |
-
h1 {
|
| 269 |
-
font-size: 24px;
|
| 270 |
-
}
|
| 271 |
-
.section {
|
| 272 |
-
padding: 10px;
|
| 273 |
-
}
|
| 274 |
-
.battle-log {
|
| 275 |
-
height: 150px;
|
| 276 |
-
}
|
| 277 |
-
button {
|
| 278 |
-
width: 100%;
|
| 279 |
-
margin-bottom: 5px;
|
| 280 |
-
}
|
| 281 |
-
.monster-image img {
|
| 282 |
-
max-height: 150px;
|
| 283 |
-
}
|
| 284 |
-
.music-control {
|
| 285 |
-
bottom: 10px;
|
| 286 |
-
right: 10px;
|
| 287 |
-
}
|
| 288 |
-
.music-control button {
|
| 289 |
-
padding: 5px 10px;
|
| 290 |
-
font-size: 14px;
|
| 291 |
-
}
|
| 292 |
-
}
|
| 293 |
-
</style>
|
| 294 |
-
</head>
|
| 295 |
-
<body>
|
| 296 |
-
<div class="container">
|
| 297 |
-
<h1>雞排怪挑戰遊戲</h1>
|
| 298 |
-
|
| 299 |
-
<div id="login-section" class="section">
|
| 300 |
-
<h2>請輸入你的資料</h2>
|
| 301 |
-
<label for="password">出生年月日+座號 (例如: 100090601):</label>
|
| 302 |
-
<input type="text" id="password" placeholder="請輸入出生年月日+座號">
|
| 303 |
-
<button id="login-btn">開始挑戰</button>
|
| 304 |
-
</div>
|
| 305 |
-
|
| 306 |
-
<div id="student-info-section" class="section hidden">
|
| 307 |
-
<h2>挑戰者資料</h2>
|
| 308 |
-
<div class="student-info" id="student-data"></div>
|
| 309 |
-
<div class="equipment" id="equipment-info"></div>
|
| 310 |
-
<button id="start-battle-btn">開始戰鬥</button>
|
| 311 |
-
</div>
|
| 312 |
-
|
| 313 |
-
<div id="battle-section" class="section hidden">
|
| 314 |
-
<h2>雞排怪挑戰</h2>
|
| 315 |
-
<div class="battle-layout">
|
| 316 |
-
<div class="battle-left">
|
| 317 |
-
<div class="monster-image">
|
| 318 |
-
<img id="monster-image" src="assets/images/king.jpg" alt="雞排王">
|
| 319 |
-
</div>
|
| 320 |
-
<div class="hp-info">
|
| 321 |
-
<div class="progress-container">
|
| 322 |
-
<div id="monster-hp-bar" class="progress-bar" style="width: 100%;">100%</div>
|
| 323 |
-
</div>
|
| 324 |
-
<p>雞排怪血量: <span id="current-hp">0</span>/<span id="total-hp">0</span></p>
|
| 325 |
-
</div>
|
| 326 |
-
</div>
|
| 327 |
-
<div class="battle-right">
|
| 328 |
-
<div class="battle-log" id="battle-log"></div>
|
| 329 |
-
<div id="subject-input" class="section"></div>
|
| 330 |
-
</div>
|
| 331 |
-
</div>
|
| 332 |
-
</div>
|
| 333 |
-
|
| 334 |
-
<div id="holy-item-section" class="section hidden">
|
| 335 |
-
<h2>使用聖物補刀</h2>
|
| 336 |
-
<div class="holy-item-layout">
|
| 337 |
-
<div class="holy-item-left">
|
| 338 |
-
<div class="monster-image">
|
| 339 |
-
<img id="monster-image-holy" src="assets/images/king.jpg" alt="雞排王">
|
| 340 |
-
</div>
|
| 341 |
-
<div class="hp-info">
|
| 342 |
-
<p>雞排怪還剩下 <span id="remaining-hp">0</span> 點血量</p>
|
| 343 |
-
</div>
|
| 344 |
-
</div>
|
| 345 |
-
<div class="holy-item-right">
|
| 346 |
-
<p>需要使用聖物補刀!</p>
|
| 347 |
-
<label for="holy-items">請輸入聖物數量:</label>
|
| 348 |
-
<input type="number" id="holy-items" min="1" value="1">
|
| 349 |
-
<button id="use-holy-items-btn">使用聖物</button>
|
| 350 |
-
</div>
|
| 351 |
-
</div>
|
| 352 |
-
</div>
|
| 353 |
-
|
| 354 |
-
<div id="result-section" class="section hidden">
|
| 355 |
-
<h2 id="result-title">挑戰結果</h2>
|
| 356 |
-
<div class="result-layout">
|
| 357 |
-
<div class="result-left">
|
| 358 |
-
<div class="monster-image">
|
| 359 |
-
<img id="result-image" src="assets/images/king.jpg" alt="雞排王">
|
| 360 |
-
</div>
|
| 361 |
-
</div>
|
| 362 |
-
<div class="result-right">
|
| 363 |
-
<div id="result-message"></div>
|
| 364 |
-
<div id="score-comparison" class="score-comparison hidden"></div>
|
| 365 |
-
<button id="restart-btn">重新挑戰</button>
|
| 366 |
-
</div>
|
| 367 |
-
</div>
|
| 368 |
-
</div>
|
| 369 |
-
|
| 370 |
-
<div class="audio-credits">
|
| 371 |
-
<p>背景音樂: Cjbeards - Fire and Thunder</p>
|
| 372 |
-
<p>Music promoted by: J&B 無版權音樂庫</p>
|
| 373 |
-
</div>
|
| 374 |
-
</div>
|
| 375 |
-
|
| 376 |
-
<div class="music-control">
|
| 377 |
-
<button id="music-toggle-btn">🔊 音樂開/關</button>
|
| 378 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