Turn Archivieren/Wiederherstellen/Endgültig löschen into icon buttons
Replaces the three raid action text-buttons with icon-only buttons (archive box, restore arrow, trash can) using the existing icon-button style; the label now only shows as a native tooltip on hover via the title attribute. The delete button gets a new icon-button-danger modifier so it still reads as destructive (red on hover) instead of the default gold. Also fixes a pre-existing bug this surfaced: .icon-button:hover only set color/border-color, so the global button:hover rule's gold background bled through on hover for every icon-button on the site (edit toggle, modal close, etc.), not just the new ones. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
26c94647e0
commit
70f050dc19
3 changed files with 12 additions and 4 deletions
|
|
@ -652,7 +652,12 @@ input:focus, select:focus, textarea:focus {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.icon-button:hover { color: var(--gold); border-color: var(--gold); }
|
||||
/* background explizit wiederholen: sonst gewinnt die globale "button:hover"-Regel
|
||||
(Gold-Flaeche) fuer die Hover-Hintergrundfarbe, da .icon-button sie nur im
|
||||
Ruhezustand setzt. */
|
||||
.icon-button:hover { color: var(--gold); border-color: var(--gold); background: var(--bg-panel-alt); }
|
||||
|
||||
.icon-button-danger:hover { color: var(--danger); border-color: var(--danger); }
|
||||
|
||||
.raid-card.editing .raid-edit-toggle { color: var(--gold); border-color: var(--gold); }
|
||||
|
||||
|
|
|
|||
|
|
@ -115,6 +115,9 @@ function icon(string $name): string
|
|||
'edit' => '<path d="M12 20h9"/><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"/>',
|
||||
'x' => '<line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/>',
|
||||
'move' => '<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" y1="12" x2="22" y2="12"/><line x1="12" y1="2" x2="12" y2="22"/>',
|
||||
'archive' => '<polyline points="21 8 21 21 3 21 3 8"/><rect x="1" y="3" width="22" height="5"/><line x1="10" y1="12" x2="14" y2="12"/>',
|
||||
'restore' => '<polyline points="1 4 1 10 7 10"/><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"/>',
|
||||
'trash' => '<polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/>',
|
||||
];
|
||||
|
||||
$path = $paths[$name] ?? '';
|
||||
|
|
|
|||
|
|
@ -171,20 +171,20 @@ include __DIR__ . '/includes/header.php';
|
|||
<?= csrf_field() ?>
|
||||
<input type="hidden" name="raid_id" value="<?= $raidId ?>">
|
||||
<input type="hidden" name="status" value="<?= e($status) ?>">
|
||||
<button type="submit" class="text-button">Wiederherstellen</button>
|
||||
<button type="submit" class="icon-button" title="Wiederherstellen"><?= icon('restore') ?></button>
|
||||
</form>
|
||||
<form method="post" action="/raid_delete_action.php" class="inline-form" onsubmit="return confirm('Diesen Raid wirklich ENDGÜLTIG löschen? Das kann nicht rückgängig gemacht werden.');">
|
||||
<?= csrf_field() ?>
|
||||
<input type="hidden" name="raid_id" value="<?= $raidId ?>">
|
||||
<input type="hidden" name="status" value="<?= e($status) ?>">
|
||||
<button type="submit" class="text-button">Endgültig löschen</button>
|
||||
<button type="submit" class="icon-button icon-button-danger" title="Endgültig löschen"><?= icon('trash') ?></button>
|
||||
</form>
|
||||
<?php else: ?>
|
||||
<form method="post" action="/raid_archive.php" class="inline-form" onsubmit="return confirm('Diesen Raid wirklich archivieren?');">
|
||||
<?= csrf_field() ?>
|
||||
<input type="hidden" name="raid_id" value="<?= $raidId ?>">
|
||||
<input type="hidden" name="status" value="<?= e($status) ?>">
|
||||
<button type="submit" class="text-button">Archivieren</button>
|
||||
<button type="submit" class="icon-button" title="Archivieren"><?= icon('archive') ?></button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
|
|
|||
Loading…
Reference in a new issue