Reposition pet and tighten consumable layout

This commit is contained in:
chris 2025-11-22 20:13:51 -05:00
parent 2d97937499
commit 4f47f057c4
2 changed files with 37 additions and 21 deletions

View File

@ -73,9 +73,10 @@
<button class="help-btn" onclick="openIntro()" title="Letter">?</button> <button class="help-btn" onclick="openIntro()" title="Letter">?</button>
</div> </div>
<div class="header-info" style="justify-content: center; position: relative;"> <div class="header-info level-row">
<div id="pet-perch"></div>
<span id="level-name" style="font-size: 1rem; padding: 10px;">Year 1</span> <span id="level-name" style="font-size: 1rem; padding: 10px;">Year 1</span>
<div style="font-size: 0.8rem; text-align: right; color: #555; position: absolute; right: 0;"> <div class="xp-wrap" style="font-size: 0.8rem; text-align: right; color: #555;">
<span id="xp-text">0 / 150 XP</span> <span id="xp-text">0 / 150 XP</span>
</div> </div>
</div> </div>
@ -113,7 +114,6 @@
<div class="feedback" id="feedback-msg"></div> <div class="feedback" id="feedback-msg"></div>
<div id="quick-consumables" class="quick-consumables"></div> <div id="quick-consumables" class="quick-consumables"></div>
<div id="pet-perch"></div>
</div> </div>
<script src="app.js"></script> <script src="app.js"></script>

View File

@ -261,6 +261,16 @@
0 0 calc(4px + 10px * var(--ui-glow)) rgba(255,255,240,calc(0.25 + 0.35 * var(--ui-glow))), 0 0 calc(4px + 10px * var(--ui-glow)) rgba(255,255,240,calc(0.25 + 0.35 * var(--ui-glow))),
0 0 calc(6px + 12px * var(--ui-glow)) rgba(0,0,0,0.35); 0 0 calc(6px + 12px * var(--ui-glow)) rgba(0,0,0,0.35);
} }
.level-row {
display: grid;
grid-template-columns: minmax(32px, max-content) 1fr minmax(90px, max-content);
align-items: center;
column-gap: 4px;
position: relative;
}
.level-row #level-name { justify-self: center; text-align: center; margin: 0 auto; }
.level-row .xp-wrap { justify-self: end; }
.level-row #pet-perch { justify-self: start; }
.currency-badge { .currency-badge {
background: var(--burgundy); color: var(--gold); padding: 5px 10px; background: var(--burgundy); color: var(--gold); padding: 5px 10px;
@ -361,12 +371,11 @@
} }
.quick-consumables { .quick-consumables {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
gap: 8px; gap: 6px;
margin: 8px 0; margin: 8px 0;
max-height: 180px; max-height: none;
overflow-y: auto; overflow: visible;
padding-right: 4px;
} }
.consumable-icon { .consumable-icon {
display: flex; display: flex;
@ -375,13 +384,13 @@
gap: 5px; gap: 5px;
} }
.consumable-icon-btn { .consumable-icon-btn {
width: 64px; width: 52px;
height: 64px; height: 52px;
border-radius: 14px; border-radius: 12px;
border: 2px solid var(--gold); border: 2px solid var(--gold);
background: rgba(0, 0, 0, 0.35); background: rgba(0, 0, 0, 0.35);
color: #fffdf2; color: #fffdf2;
font-size: 2rem; font-size: 1.7rem;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -403,19 +412,19 @@
.consumable-emoji { filter: drop-shadow(0 0 6px rgba(0,0,0,0.25)); } .consumable-emoji { filter: drop-shadow(0 0 6px rgba(0,0,0,0.25)); }
.consumable-qty { .consumable-qty {
position: absolute; position: absolute;
top: -6px; top: -5px;
right: -6px; right: -5px;
background: var(--burgundy); background: var(--burgundy);
color: var(--gold); color: var(--gold);
font-size: 0.75rem; font-size: 0.7rem;
border: 2px solid var(--gold); border: 2px solid var(--gold);
border-radius: 999px; border-radius: 999px;
padding: 2px 6px; padding: 2px 5px;
box-shadow: 0 0 6px rgba(0,0,0,0.4); box-shadow: 0 0 6px rgba(0,0,0,0.4);
} }
.consumable-name { .consumable-name {
text-align: center; text-align: center;
font-size: 0.78rem; font-size: 0.74rem;
color: #fcefd6; color: #fcefd6;
line-height: 1.1; line-height: 1.1;
min-height: 34px; min-height: 34px;
@ -425,15 +434,17 @@
padding: 0 4px; padding: 0 4px;
} }
#pet-perch { #pet-perch {
height: 48px;
display: flex; justify-content: center; align-items: center; display: flex; justify-content: center; align-items: center;
margin-top: 6px; margin: 0;
pointer-events: none;
min-width: 32px;
} }
.pet-icon { .pet-icon {
font-size: 1.8rem; font-size: 1.6rem;
filter: drop-shadow(0 0 6px rgba(0,0,0,0.3)); filter: drop-shadow(0 0 6px rgba(0,0,0,0.3));
animation: petFloat 3s ease-in-out infinite; animation: petFloat 3s ease-in-out infinite;
transition: transform 0.2s ease; transition: transform 0.2s ease;
pointer-events: auto;
} }
.pet-icon.pet-owl { text-shadow: 0 0 6px rgba(255,255,255,0.5); } .pet-icon.pet-owl { text-shadow: 0 0 6px rgba(255,255,255,0.5); }
.pet-icon.pet-cat { text-shadow: 0 0 6px rgba(255,182,193,0.5); } .pet-icon.pet-cat { text-shadow: 0 0 6px rgba(255,182,193,0.5); }
@ -655,7 +666,10 @@
.key-btn.key-cast { padding-bottom: 18px; } .key-btn.key-cast { padding-bottom: 18px; }
#hint-grid { max-width: 240px; max-height: 120px; } #hint-grid { max-width: 240px; max-height: 120px; }
.quick-consumables { max-height: 150px; } .quick-consumables { max-height: 150px; }
#pet-perch { height: 42px; margin-top: 4px; } .consumable-icon-btn { width: 48px; height: 48px; font-size: 1.5rem; }
.consumable-name { font-size: 0.7rem; }
#pet-perch { margin-bottom: 0; }
.level-row { column-gap: 6px; grid-template-columns: minmax(32px, max-content) 1fr minmax(84px, max-content); }
} }
@media (max-width: 420px) { @media (max-width: 420px) {
@ -664,4 +678,6 @@
.shop-btn, .help-btn { width: 36px; height: 36px; font-size: 1.25rem; } .shop-btn, .help-btn { width: 36px; height: 36px; font-size: 1.25rem; }
#xp-text { font-size: 0.75rem; padding: 3px 7px; } #xp-text { font-size: 0.75rem; padding: 3px 7px; }
.currency-badge { font-size: 0.8rem; } .currency-badge { font-size: 0.8rem; }
.pet-icon { font-size: 1.4rem; }
.level-row { grid-template-columns: minmax(30px, max-content) 1fr minmax(78px, max-content); }
} }