From 489518647cc4e16d68b19142fe2a12a35957e3a6 Mon Sep 17 00:00:00 2001 From: Maaxxs <61059039+MaaxxsDev@users.noreply.github.com> Date: Tue, 22 Sep 2026 11:35:15 +0200 Subject: [PATCH] Gear sets on the profile page as an in-game style column, mini grid in 'Meine Sets' Co-Authored-By: Claude Opus 5 --- assets/css/style.css | 12 ++++++++++++ gear.php | 6 +----- includes/gear.php | 32 ++++++++++++++++++++++++++++++++ member.php | 25 +++++++++++-------------- 4 files changed, 56 insertions(+), 19 deletions(-) diff --git a/assets/css/style.css b/assets/css/style.css index fa250f4..2c4e5c1 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -5573,6 +5573,18 @@ strong.grade-common, strong.grade-rare, strong.grade-epic, strong.grade-unique, .gear-doll-stones i { width: 5px; height: 5px; border-radius: 50%; background: rgba(0, 0, 0, 0.55); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); } .gear-doll-stones i.is-set { background: var(--gold); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6); } .gear-doll-hint { margin: 0.75rem 0 0; font-size: 0.78rem; text-align: center; } +/* Kleine Variante fuer Set-Karten (Profilseite, "Meine Sets"): sechs Slots pro Reihe */ +.gear-doll.gear-doll-mini { grid-template-columns: repeat(6, minmax(0, 40px)); gap: 4px; justify-content: start; margin: 0.35rem 0 0.15rem; } +.gear-doll-mini .gear-doll-slot { border-radius: 4px; } +.gear-doll-mini .gear-doll-slot:hover { transform: none; } +.gear-doll-mini .gear-doll-enchant { right: 2px; bottom: 2px; font-size: 0.6rem; } +.gear-doll-mini .gear-doll-initial { font-size: 1rem; } +/* Saeule wie im Spiel: zwei Slots pro Reihe (Profilseite) */ +.gear-doll.gear-doll-mini.gear-doll-column { grid-template-columns: repeat(2, 46px); gap: 5px; margin: 0; } +.gear-set-card-profile .gear-set-card-link { flex-direction: row; align-items: flex-start; gap: 1rem; padding-right: 1rem; } +.gear-set-card-info { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; } +.gear-set-card-more { margin-top: 0.4rem; font-size: 0.82rem; color: var(--gold); } +.gear-set-card-profile:hover .gear-set-card-more { text-decoration: underline; } @media (max-width: 800px) { .gear-doll { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 520px; margin: 0 auto; } } diff --git a/gear.php b/gear.php index 78acec1..b55c34b 100644 --- a/gear.php +++ b/gear.php @@ -510,11 +510,7 @@ include __DIR__ . '/includes/header.php'; · Ø Stufe · auf dem Profil - - $unused): ?> - - - + diff --git a/includes/gear.php b/includes/gear.php index 6cff5ad..ee3149a 100644 --- a/includes/gear.php +++ b/includes/gear.php @@ -85,6 +85,38 @@ function gear_slot_silhouette(string $slotKey): string . (GEAR_SLOT_SILHOUETTES[$slotKey] ?? '') . ''; } +/** + * Kleines Ausruestungsraster fuer Set-Karten: alle Slots in der Reihenfolge des grossen Rasters, + * mit Seltenheitsfarbe, Aufwertung und Silhouetten fuer leere Slots. Standard sind sechs pro + * Reihe ("Meine Sets"); $column = zwei pro Reihe als Saeule wie im Spiel (Profilseite). + * + * @param array $slots Slots eines Sets (gear_slots_for_sets) + */ +function gear_doll_mini_html(array $slots, bool $column = false): string +{ + $html = ''; + foreach (GEAR_DOLL_ORDER as $slotKey) { + $row = $slots[$slotKey] ?? null; + $item = $row['item'] ?? null; + $label = GEAR_SLOTS[$slotKey][0]; + $tip = $label . ': ' . ($item ? $item['name'] . ((int) $row['enchant'] > 0 ? ' +' . (int) $row['enchant'] : '') : 'leer'); + $html .= ''; + $iconUrl = gear_icon_url($item); + if ($item && $iconUrl) { + $html .= ''; + } elseif ($item) { + $html .= '' . e(mb_substr((string) $item['name'], 0, 1)) . ''; + } else { + $html .= gear_slot_silhouette($slotKey); + } + if ($item && (int) $row['enchant'] > 0) { + $html .= '+' . (int) $row['enchant'] . ''; + } + $html .= ''; + } + return $html . ''; +} + // In der Nebenhand: Schilde & Co. (SubHand) und Einhandwaffen fuer zwei Waffen const GEAR_OFFHAND_WEAPON_TYPES = ['Sword', 'Dagger', 'Mace']; diff --git a/member.php b/member.php index 5cc677c..200e1be 100644 --- a/member.php +++ b/member.php @@ -125,22 +125,19 @@ include __DIR__ . '/includes/header.php';

Ausrüstung