btr det
Browse files
src/lib/components/Piclets/PicletDetail.svelte
CHANGED
|
@@ -131,7 +131,7 @@
|
|
| 131 |
</div>
|
| 132 |
</div>
|
| 133 |
|
| 134 |
-
<!-- Level and
|
| 135 |
<div class="level-xp-section">
|
| 136 |
<div class="level-info">
|
| 137 |
<span class="level-label">Level {updatedInstance.level}</span>
|
|
@@ -142,15 +142,36 @@
|
|
| 142 |
{/if}
|
| 143 |
</div>
|
| 144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
{#if updatedInstance.level < 100}
|
| 146 |
-
<div class="
|
| 147 |
-
<div class="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
</div>
|
| 149 |
{/if}
|
| 150 |
-
|
| 151 |
-
<div class="hp-info">
|
| 152 |
-
<span class="hp-label">HP: {updatedInstance.currentHp}/{updatedInstance.maxHp}</span>
|
| 153 |
-
</div>
|
| 154 |
</div>
|
| 155 |
|
| 156 |
<!-- Tab Bar -->
|
|
@@ -526,7 +547,7 @@
|
|
| 526 |
gap: 4px;
|
| 527 |
}
|
| 528 |
|
| 529 |
-
/* Level and
|
| 530 |
.level-xp-section {
|
| 531 |
background: white;
|
| 532 |
margin: 0 16px 16px;
|
|
@@ -539,7 +560,7 @@
|
|
| 539 |
display: flex;
|
| 540 |
justify-content: space-between;
|
| 541 |
align-items: center;
|
| 542 |
-
margin-bottom:
|
| 543 |
}
|
| 544 |
|
| 545 |
.level-label {
|
|
@@ -554,35 +575,78 @@
|
|
| 554 |
color: #8e8e93;
|
| 555 |
}
|
| 556 |
|
| 557 |
-
|
| 558 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 559 |
height: 8px;
|
| 560 |
-
background: #
|
| 561 |
border-radius: 4px;
|
| 562 |
overflow: hidden;
|
| 563 |
-
|
|
|
|
| 564 |
}
|
| 565 |
|
| 566 |
-
.
|
| 567 |
height: 100%;
|
| 568 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 569 |
border-radius: 4px;
|
| 570 |
-
|
|
|
|
|
|
|
| 571 |
}
|
| 572 |
|
| 573 |
-
.
|
| 574 |
-
|
| 575 |
-
|
|
|
|
| 576 |
}
|
| 577 |
|
| 578 |
-
.
|
| 579 |
-
font-size:
|
| 580 |
font-weight: 600;
|
| 581 |
-
color: #
|
| 582 |
-
|
| 583 |
-
|
| 584 |
-
|
| 585 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 586 |
}
|
| 587 |
|
| 588 |
@media (min-width: 768px) {
|
|
|
|
| 131 |
</div>
|
| 132 |
</div>
|
| 133 |
|
| 134 |
+
<!-- Level and Status Progress -->
|
| 135 |
<div class="level-xp-section">
|
| 136 |
<div class="level-info">
|
| 137 |
<span class="level-label">Level {updatedInstance.level}</span>
|
|
|
|
| 142 |
{/if}
|
| 143 |
</div>
|
| 144 |
|
| 145 |
+
<!-- HP Section -->
|
| 146 |
+
<div class="stat-row">
|
| 147 |
+
<div class="stat-label">HP</div>
|
| 148 |
+
<div class="hp-bar">
|
| 149 |
+
<div
|
| 150 |
+
class="hp-fill"
|
| 151 |
+
style="width: {(updatedInstance.currentHp / updatedInstance.maxHp) * 100}%; background-color: {getHpColor(updatedInstance.currentHp, updatedInstance.maxHp)}"
|
| 152 |
+
></div>
|
| 153 |
+
</div>
|
| 154 |
+
<div class="stat-value">{updatedInstance.currentHp}/{updatedInstance.maxHp}</div>
|
| 155 |
+
</div>
|
| 156 |
+
|
| 157 |
+
<!-- XP Section -->
|
| 158 |
{#if updatedInstance.level < 100}
|
| 159 |
+
<div class="stat-row">
|
| 160 |
+
<div class="stat-label">XP</div>
|
| 161 |
+
<div class="xp-bar">
|
| 162 |
+
<div
|
| 163 |
+
class="xp-fill"
|
| 164 |
+
style="width: {xpTowardsNext.percentage}%"
|
| 165 |
+
></div>
|
| 166 |
+
</div>
|
| 167 |
+
<div class="stat-value">{xpTowardsNext.current}/{xpTowardsNext.needed}</div>
|
| 168 |
+
</div>
|
| 169 |
+
{:else}
|
| 170 |
+
<div class="stat-row">
|
| 171 |
+
<div class="stat-label">XP</div>
|
| 172 |
+
<div class="max-level-indicator">MAX LEVEL</div>
|
| 173 |
</div>
|
| 174 |
{/if}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 175 |
</div>
|
| 176 |
|
| 177 |
<!-- Tab Bar -->
|
|
|
|
| 547 |
gap: 4px;
|
| 548 |
}
|
| 549 |
|
| 550 |
+
/* Level and Status Section */
|
| 551 |
.level-xp-section {
|
| 552 |
background: white;
|
| 553 |
margin: 0 16px 16px;
|
|
|
|
| 560 |
display: flex;
|
| 561 |
justify-content: space-between;
|
| 562 |
align-items: center;
|
| 563 |
+
margin-bottom: 16px;
|
| 564 |
}
|
| 565 |
|
| 566 |
.level-label {
|
|
|
|
| 575 |
color: #8e8e93;
|
| 576 |
}
|
| 577 |
|
| 578 |
+
/* Stat Rows (HP and XP bars) */
|
| 579 |
+
.stat-row {
|
| 580 |
+
display: flex;
|
| 581 |
+
align-items: center;
|
| 582 |
+
gap: 8px;
|
| 583 |
+
margin-bottom: 8px;
|
| 584 |
+
}
|
| 585 |
+
|
| 586 |
+
.stat-row:last-child {
|
| 587 |
+
margin-bottom: 0;
|
| 588 |
+
}
|
| 589 |
+
|
| 590 |
+
.stat-label {
|
| 591 |
+
font-size: 12px;
|
| 592 |
+
font-weight: 600;
|
| 593 |
+
color: #666;
|
| 594 |
+
text-transform: uppercase;
|
| 595 |
+
letter-spacing: 0.3px;
|
| 596 |
+
width: 24px;
|
| 597 |
+
flex-shrink: 0;
|
| 598 |
+
}
|
| 599 |
+
|
| 600 |
+
/* HP Bar */
|
| 601 |
+
.hp-bar {
|
| 602 |
height: 8px;
|
| 603 |
+
background: #e0e0e0;
|
| 604 |
border-radius: 4px;
|
| 605 |
overflow: hidden;
|
| 606 |
+
flex: 1;
|
| 607 |
+
min-width: 80px;
|
| 608 |
}
|
| 609 |
|
| 610 |
+
.hp-fill {
|
| 611 |
height: 100%;
|
| 612 |
+
transition: width 0.5s ease, background-color 0.3s ease;
|
| 613 |
+
}
|
| 614 |
+
|
| 615 |
+
/* XP Bar */
|
| 616 |
+
.xp-bar {
|
| 617 |
+
height: 8px;
|
| 618 |
+
background: #e0e0e0;
|
| 619 |
border-radius: 4px;
|
| 620 |
+
overflow: hidden;
|
| 621 |
+
flex: 1;
|
| 622 |
+
min-width: 80px;
|
| 623 |
}
|
| 624 |
|
| 625 |
+
.xp-fill {
|
| 626 |
+
height: 100%;
|
| 627 |
+
background: #2196f3;
|
| 628 |
+
transition: width 1.2s ease-out;
|
| 629 |
}
|
| 630 |
|
| 631 |
+
.stat-value {
|
| 632 |
+
font-size: 12px;
|
| 633 |
font-weight: 600;
|
| 634 |
+
color: #666;
|
| 635 |
+
min-width: 60px;
|
| 636 |
+
text-align: right;
|
| 637 |
+
flex-shrink: 0;
|
| 638 |
+
}
|
| 639 |
+
|
| 640 |
+
.max-level-indicator {
|
| 641 |
+
font-size: 12px;
|
| 642 |
+
font-weight: 600;
|
| 643 |
+
color: #ff6f00;
|
| 644 |
+
background: rgba(255, 111, 0, 0.1);
|
| 645 |
+
border: 1px solid #ff6f00;
|
| 646 |
+
border-radius: 4px;
|
| 647 |
+
padding: 2px 8px;
|
| 648 |
+
flex: 1;
|
| 649 |
+
text-align: center;
|
| 650 |
}
|
| 651 |
|
| 652 |
@media (min-width: 768px) {
|