Premades: bigger class icons, distinct class-action design

Member class icons were too small to read - bumped from 14px to 20px.
The own-class action tile no longer reuses the angled member-card shape
(clip-path border trick); it is now a plain rounded button with a gold
dashed outline so it reads as an action, not another roster slot.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Maaxxs 2026-09-20 01:25:29 +02:00
parent 742a3c72c7
commit 8d82065220
3 changed files with 34 additions and 26 deletions

View file

@ -841,21 +841,31 @@ input:focus, select:focus, textarea:focus {
.premade-slot-invite-btn:hover { color: var(--gold); } .premade-slot-invite-btn:hover { color: var(--gold); }
/* Eigene Klassen-Aktion: sitzt als zusaetzliche Kachel im (bei 5 Slots stets /* Eigene Klassen-Aktion: sitzt als zusaetzliche Kachel im (bei 5 Slots stets
freien) 6. Grid-Feld neben der Mitgliederliste statt in einer der Karten. */ freien) 6. Grid-Feld neben der Mitgliederliste, bewusst mit gestricheltem
.premade-slot-class-action:hover { background: var(--gold); } Rahmen statt der angeschraegten Karten-Optik, damit sie klar als Aktion
und nicht als weiterer Mitglieder-Slot erkennbar ist. */
.premade-class-action-btn { .premade-class-action {
display: flex;
align-items: center;
gap: 0.75rem;
width: 100%; width: 100%;
height: 100%; height: 100%;
border: none; min-height: 64px;
border-radius: 0; padding: 0.7rem 1rem;
background: rgba(201, 162, 39, 0.05);
border: 1.5px dashed rgba(201, 162, 39, 0.4);
border-radius: 10px;
color: inherit; color: inherit;
text-align: left; text-align: left;
font: inherit; font: inherit;
cursor: pointer; cursor: pointer;
transition: border-color 0.15s ease, background 0.15s ease;
} }
.premade-class-action-btn:hover { background: var(--bg-panel-alt); } .premade-class-action:hover {
border-color: var(--gold);
background: rgba(201, 162, 39, 0.1);
}
.premade-class-action-icon { color: var(--text-muted); } .premade-class-action-icon { color: var(--text-muted); }
@ -909,8 +919,8 @@ input:focus, select:focus, textarea:focus {
} }
.premade-slot-class-icon { .premade-slot-class-icon {
width: 14px; width: 20px;
height: 14px; height: 20px;
object-fit: contain; object-fit: contain;
flex-shrink: 0; flex-shrink: 0;
} }

View file

@ -50,7 +50,7 @@
wireModal(classModal); wireModal(classModal);
document.querySelectorAll('.premade-class-action-btn').forEach(function (btn) { document.querySelectorAll('.premade-class-action').forEach(function (btn) {
btn.addEventListener('click', function () { btn.addEventListener('click', function () {
classPremadeIdField.value = btn.getAttribute('data-premade-id') || ''; classPremadeIdField.value = btn.getAttribute('data-premade-id') || '';
var currentClass = btn.getAttribute('data-current-class') || ''; var currentClass = btn.getAttribute('data-current-class') || '';

View file

@ -255,22 +255,20 @@ include __DIR__ . '/includes/header.php';
<?php if ($isMemberHere): ?> <?php if ($isMemberHere): ?>
<?php $myClassIcon = !empty($myClass) ? class_icon_url($myClass) : null; ?> <?php $myClassIcon = !empty($myClass) ? class_icon_url($myClass) : null; ?>
<div class="premade-slot premade-slot-class-action"> <button type="button" class="premade-class-action" data-premade-id="<?= $premadeId ?>" data-current-class="<?= e((string) ($myClass ?? '')) ?>">
<button type="button" class="premade-slot-inner premade-class-action-btn" data-premade-id="<?= $premadeId ?>" data-current-class="<?= e((string) ($myClass ?? '')) ?>"> <span class="class-icon-frame premade-class-action-icon">
<span class="class-icon-frame premade-class-action-icon"> <?php if ($myClassIcon): ?>
<?php if ($myClassIcon): ?> <img src="<?= e($myClassIcon) ?>" alt="">
<img src="<?= e($myClassIcon) ?>" alt=""> <?php else: ?>
<?php else: ?> <?= icon('edit') ?>
<?= icon('edit') ?> <?php endif; ?>
<?php endif; ?> </span>
</span> <span class="premade-slot-name">
<span class="premade-slot-name"> <strong>Deine Klasse</strong>
<strong>Deine Klasse</strong> <span class="text-muted"><?= $myClass ? e($myClass) : 'Nicht festgelegt' ?></span>
<span class="text-muted"><?= $myClass ? e($myClass) : 'Nicht festgelegt' ?></span> </span>
</span> <span class="premade-class-action-label"><?= $myClass ? 'Ändern' : 'Festlegen' ?></span>
<span class="premade-class-action-label"><?= $myClass ? 'Ändern' : 'Festlegen' ?></span> </button>
</button>
</div>
<?php endif; ?> <?php endif; ?>
</div> </div>