diff --git a/static/style.css b/static/style.css index 1a6f21b..196168a 100644 --- a/static/style.css +++ b/static/style.css @@ -431,6 +431,40 @@ td a:hover { text-decoration: underline; } margin-bottom: 12px; } +.inv-grid-compact { + grid-template-columns: repeat(5, 1fr); + gap: 4px; +} + +.inv-grid-compact .inv-grid-slot { + min-height: 56px; + border-width: 1px; +} + +.inv-grid-compact .inv-slot-icon { + font-size: 16px; +} + +.inv-grid-compact .inv-slot-name { + font-size: 7px; +} + +.inv-grid-compact .inv-slot-stack { + font-size: 8px; + bottom: 1px; + right: 2px; +} + +.inv-grid-compact .inv-slot-ammo { + font-size: 8px; + top: 1px; + right: 2px; +} + +.inv-grid-compact .inv-slot-durability-bar { + height: 2px; +} + .inv-grid-slot { aspect-ratio: 1; border: 2px dashed var(--border); @@ -537,87 +571,176 @@ td a:hover { text-decoration: underline; } } /* Equipped Items Grid */ -.inv-equipped-grid { +.inv-equipped-compact { display: grid; grid-template-columns: repeat(5, 1fr); - gap: 8px; - margin-bottom: 12px; -} - -.inv-equipped-slot { - border: 2px solid var(--border); - border-radius: 8px; - padding: 8px; - text-align: center; - cursor: pointer; - position: relative; - transition: all 0.15s; - background: var(--card-bg); - min-height: 80px; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; -} - -.inv-equipped-slot:hover { - border-color: var(--primary); - background: var(--hover); -} - -.inv-equipped-slot.has-item { - border-style: solid; -} - -.inv-equipped-label { - font-size: 10px; - text-transform: uppercase; - letter-spacing: 0.5px; - color: var(--text-muted); - margin-bottom: 4px; - font-weight: 600; -} - -.inv-equipped-slot .inv-slot-icon { - font-size: 22px; -} - -.inv-equipped-slot .inv-slot-name { - font-size: 9px; -} - -/* Key Items List */ -.inv-key-items { - display: flex; - flex-direction: column; gap: 4px; margin-bottom: 12px; } -.inv-key-item { +.inv-equipped-compact .inv-grid-slot { + min-height: 56px; + border-width: 1px; + padding: 4px; +} + +.inv-equipped-compact .inv-slot-icon { + font-size: 16px; +} + +.inv-equipped-compact .inv-slot-name { + font-size: 7px; +} + +.inv-equipped-badge { + font-size: 7px; + text-transform: uppercase; + letter-spacing: 0.3px; + color: var(--text-muted); + font-weight: 600; + line-height: 1; + margin-bottom: 2px; +} + +/* Hotbar */ +.inv-hotbar { + display: grid; + grid-template-columns: repeat(10, 1fr); + gap: 4px; + margin-bottom: 12px; +} + +.inv-hotbar-slot { + aspect-ratio: 1; + border: 1px solid var(--border); + border-radius: 6px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + cursor: pointer; + position: relative; + transition: all 0.15s; + background: var(--card-bg); + min-height: 52px; + overflow: hidden; +} + +.inv-hotbar-slot:hover { + border-color: var(--primary); + background: var(--hover); +} + +.inv-hotbar-slot.has-item { + border-color: var(--border); + border-style: solid; +} + +.inv-hotbar-slot .inv-slot-icon { + font-size: 18px; + line-height: 1; + margin-bottom: 1px; + color: var(--text-light); +} + +.inv-hotbar-slot .inv-slot-name { + font-size: 7px; + color: var(--text-muted); + text-align: center; + line-height: 1.1; + max-width: 95%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.inv-hotbar-slot .inv-slot-stack { + position: absolute; + bottom: 1px; + right: 3px; + font-size: 8px; + font-weight: 700; + color: var(--text); + background: rgba(255,255,255,0.8); + padding: 0 2px; + border-radius: 2px; +} + +.inv-hotbar-slot .inv-slot-empty-icon { + color: var(--text-muted); + opacity: 0.3; + font-size: 16px; +} + +/* Experimental Warning Banner */ +.experimental-banner { + background: rgba(220, 38, 38, 0.12); + border: 1px solid rgba(220, 38, 38, 0.5); + border-left: 4px solid #dc2626; + border-radius: 6px; + padding: 10px 14px; + display: flex; + align-items: flex-start; + gap: 10px; + font-size: 13px; + line-height: 1.5; + color: var(--text); + margin: 0 16px 12px; +} +.experimental-banner .banner-icon { + font-size: 18px; + flex-shrink: 0; +} +.experimental-banner strong { + color: #ef4444; +} + +/* Key Items Grid */ +.inv-key-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); + gap: 4px; + margin-bottom: 12px; +} + +.inv-key-grid-slot { display: flex; align-items: center; - gap: 8px; - padding: 6px 10px; + gap: 6px; + padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; transition: all 0.15s; background: var(--card-bg); + min-height: 32px; + overflow: hidden; } -.inv-key-item:hover { +.inv-key-grid-slot:hover { border-color: var(--primary); background: var(--hover); } -.inv-key-item .inv-slot-icon { - font-size: 16px; +.inv-key-grid-slot .inv-slot-icon { + font-size: 14px; + flex-shrink: 0; + color: var(--text-light); } -.inv-key-item .inv-slot-name { - font-size: 12px; +.inv-key-grid-slot .inv-slot-name { + font-size: 11px; flex: 1; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.inv-key-stack { + font-size: 10px; + color: var(--text-muted); + flex-shrink: 0; + font-weight: 600; } /* Unknown Section */ diff --git a/templates/player_detail.html b/templates/player_detail.html index 20b816e..0070627 100644 --- a/templates/player_detail.html +++ b/templates/player_detail.html @@ -291,6 +291,10 @@ {% if is_online %}
Player is online — editing disabled. Log out first.
{% endif %} +
+ + +
{% for inv in primary_inventories %} @@ -301,34 +305,35 @@ {% endif %}
-
- {% for item in inv.item_list %} -
+ {% set max_main_slots = inv.max_item_count or 35 %} +
+ {% for i in range(max_main_slots) %} + {% set slot_item = inv.item_list | selectattr('position_index', 'equalto', i) | first %} + {% if slot_item %} +
📦
-
{{ item.template_id | truncate(20) }}
- {% if item.stack_size and item.stack_size > 1 %} -
{{ item.stack_size }}
+
{{ slot_item.template_id | truncate(20) }}
+ {% if slot_item.stack_size and slot_item.stack_size > 1 %} +
{{ slot_item.stack_size }}
{% endif %} - {% if item.ammo %} -
🔥{{ item.ammo }}
+ {% if slot_item.ammo %} +
🔥{{ slot_item.ammo }}
{% endif %} - {% if item.durability and item.max_durability and item.max_durability > 0 %} - {% set dur_pct = (item.durability / item.max_durability * 100) | int %} + {% if slot_item.durability and slot_item.max_durability and slot_item.max_durability > 0 %} + {% set dur_pct = (slot_item.durability / slot_item.max_durability * 100) | int %} {% set dur_class = 'low' if dur_pct < 30 else ('medium' if dur_pct < 70 else '') %}
{% endif %} - {% if item.quality_level and item.quality_level > 0 %} - {% set tier_color = quality_tiers[item.quality_level].color if item.quality_level in quality_tiers else '#9a8a7a' %} + {% if slot_item.quality_level and slot_item.quality_level > 0 %} + {% set tier_color = quality_tiers[slot_item.quality_level].color if slot_item.quality_level in quality_tiers else '#9a8a7a' %}
{% endif %}
- {% endfor %} - {% set item_count = inv.item_list | length %} - {% set max_slots = inv.max_item_count or 35 %} - {% for i in range(item_count, max_slots) %} + {% else %}
+
+ {% endif %} {% endfor %}
@@ -339,13 +344,13 @@ {% endif %}
-
+
{% for slot_idx in range(10) %} {% set slot_label = equipped_slot_labels[slot_idx] if slot_idx in equipped_slot_labels else 'Slot ' ~ slot_idx %} {% set slot_item = inv.item_list | selectattr('position_index', 'equalto', slot_idx) | first %} {% if slot_item %} -
-
{{ slot_label }}
+
+
{{ slot_label }}
📦
{{ slot_item.template_id | truncate(15) }}
{% if slot_item.stack_size and slot_item.stack_size > 1 %} @@ -365,9 +370,36 @@ {% endif %}
{% else %} -
-
{{ slot_label }}
-
+
+
+
{{ slot_label }}
+
+
+
+ {% endif %} + {% endfor %} +
+ + {% elif inv.inventory_type == 5 %} +
+ {{ inv.inventory_type | inv_label }}(ID: {{ inv.id }}) + {% if not is_online %} + + {% endif %} +
+ {% set hotbar_max = inv.max_item_count or 10 %} +
+ {% for i in range(hotbar_max) %} + {% set slot_item = inv.item_list | selectattr('position_index', 'equalto', i) | first %} + {% if slot_item %} +
+
📦
+
{{ slot_item.template_id | truncate(12) }}
+ {% if slot_item.stack_size and slot_item.stack_size > 1 %} +
{{ slot_item.stack_size }}
+ {% endif %} +
+ {% else %} +
+
+
{% endif %} {% endfor %} @@ -381,13 +413,13 @@ {% endif %}
{% if inv.item_list %} -
+
{% for item in inv.item_list %} -
+
📦
-
{{ item.template_id }}
+
{{ item.template_id | truncate(25) }}
{% if item.stack_size and item.stack_size > 1 %} - x{{ item.stack_size }} + x{{ item.stack_size }} {% endif %}
{% endfor %}