Reposition pet and tighten consumable layout
This commit is contained in:
parent
2d97937499
commit
4f47f057c4
@ -73,9 +73,10 @@
|
||||
<button class="help-btn" onclick="openIntro()" title="Letter">?</button>
|
||||
</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>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@ -113,7 +114,6 @@
|
||||
|
||||
<div class="feedback" id="feedback-msg"></div>
|
||||
<div id="quick-consumables" class="quick-consumables"></div>
|
||||
<div id="pet-perch"></div>
|
||||
</div>
|
||||
|
||||
<script src="app.js"></script>
|
||||
|
||||
52
style.css
52
style.css
@ -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(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 {
|
||||
background: var(--burgundy); color: var(--gold); padding: 5px 10px;
|
||||
@ -361,12 +371,11 @@
|
||||
}
|
||||
.quick-consumables {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
|
||||
gap: 8px;
|
||||
grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
|
||||
gap: 6px;
|
||||
margin: 8px 0;
|
||||
max-height: 180px;
|
||||
overflow-y: auto;
|
||||
padding-right: 4px;
|
||||
max-height: none;
|
||||
overflow: visible;
|
||||
}
|
||||
.consumable-icon {
|
||||
display: flex;
|
||||
@ -375,13 +384,13 @@
|
||||
gap: 5px;
|
||||
}
|
||||
.consumable-icon-btn {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
border-radius: 14px;
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
border-radius: 12px;
|
||||
border: 2px solid var(--gold);
|
||||
background: rgba(0, 0, 0, 0.35);
|
||||
color: #fffdf2;
|
||||
font-size: 2rem;
|
||||
font-size: 1.7rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@ -403,19 +412,19 @@
|
||||
.consumable-emoji { filter: drop-shadow(0 0 6px rgba(0,0,0,0.25)); }
|
||||
.consumable-qty {
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
right: -6px;
|
||||
top: -5px;
|
||||
right: -5px;
|
||||
background: var(--burgundy);
|
||||
color: var(--gold);
|
||||
font-size: 0.75rem;
|
||||
font-size: 0.7rem;
|
||||
border: 2px solid var(--gold);
|
||||
border-radius: 999px;
|
||||
padding: 2px 6px;
|
||||
padding: 2px 5px;
|
||||
box-shadow: 0 0 6px rgba(0,0,0,0.4);
|
||||
}
|
||||
.consumable-name {
|
||||
text-align: center;
|
||||
font-size: 0.78rem;
|
||||
font-size: 0.74rem;
|
||||
color: #fcefd6;
|
||||
line-height: 1.1;
|
||||
min-height: 34px;
|
||||
@ -425,15 +434,17 @@
|
||||
padding: 0 4px;
|
||||
}
|
||||
#pet-perch {
|
||||
height: 48px;
|
||||
display: flex; justify-content: center; align-items: center;
|
||||
margin-top: 6px;
|
||||
margin: 0;
|
||||
pointer-events: none;
|
||||
min-width: 32px;
|
||||
}
|
||||
.pet-icon {
|
||||
font-size: 1.8rem;
|
||||
font-size: 1.6rem;
|
||||
filter: drop-shadow(0 0 6px rgba(0,0,0,0.3));
|
||||
animation: petFloat 3s ease-in-out infinite;
|
||||
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-cat { text-shadow: 0 0 6px rgba(255,182,193,0.5); }
|
||||
@ -655,7 +666,10 @@
|
||||
.key-btn.key-cast { padding-bottom: 18px; }
|
||||
#hint-grid { max-width: 240px; max-height: 120px; }
|
||||
.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) {
|
||||
@ -664,4 +678,6 @@
|
||||
.shop-btn, .help-btn { width: 36px; height: 36px; font-size: 1.25rem; }
|
||||
#xp-text { font-size: 0.75rem; padding: 3px 7px; }
|
||||
.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); }
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user