Consistent buttons site-wide, stat totals next to gear sets on the profile page
- Buttons: icon and text centered, <button> inherits the page font, invisible border so gold and dark buttons have the same height, icons scale with the button size - Two sizes only: normal for page/set header actions and form submits, small for actions in rows, cards and toolbars (header actions in gear planner, profile, members, calendar switched to normal) - Profile page: gear set cards list the stat totals next to the equipment column Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
489518647c
commit
e9b6a820a8
7 changed files with 56 additions and 35 deletions
|
|
@ -572,6 +572,7 @@ tr:hover td { background: var(--bg-panel-alt); }
|
|||
|
||||
.report-evidence .icon { width: 14px; height: 14px; flex-shrink: 0; }
|
||||
|
||||
.report-add-btn { margin-top: 1rem; }
|
||||
.report-evidence a { color: var(--gold); }
|
||||
.report-evidence a:hover { color: var(--gold-hover); }
|
||||
|
||||
|
|
@ -613,6 +614,8 @@ form { display: flex; flex-direction: column; gap: 1rem; }
|
|||
|
||||
label { font-weight: 600; font-size: 0.9rem; }
|
||||
|
||||
input, select, textarea { font-family: inherit; }
|
||||
|
||||
input[type="text"],
|
||||
input[type="email"],
|
||||
input[type="password"],
|
||||
|
|
@ -668,19 +671,29 @@ input[type="datetime-local"]::-webkit-calendar-picker-indicator {
|
|||
.checkbox-grid input { width: auto; }
|
||||
|
||||
.button, button {
|
||||
display: inline-block;
|
||||
/* Symbol und Text immer gemeinsam mittig; gleiche Hoehe fuer <a> und <button> */
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.45rem;
|
||||
background: var(--gold);
|
||||
color: #1a1a1a;
|
||||
border: none;
|
||||
/* Unsichtbarer Rand, damit goldene Buttons genauso hoch sind wie dunkle mit Rand */
|
||||
border: 1px solid transparent;
|
||||
border-radius: 6px;
|
||||
padding: 0.6rem 1.25rem;
|
||||
font-family: inherit; /* <button> erbt die Schrift sonst nicht */
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
line-height: 1.25;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
width: fit-content;
|
||||
transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
|
||||
}
|
||||
/* Symbole in Buttons wachsen mit der Schrift (im kleinen Button kleiner) */
|
||||
:where(.button, .button-small, .button-secondary, .button-success, .button-danger) > .icon { width: 1.15em; height: 1.15em; }
|
||||
|
||||
.button:hover, button:hover { background: var(--gold-hover); color: #1a1a1a; text-decoration: none; }
|
||||
/* Rand beim Drueberfahren (als Innenschatten, damit nichts verrutscht): goldene Buttons mit
|
||||
|
|
@ -2091,7 +2104,7 @@ input.role-weight-input {
|
|||
|
||||
.row-pending td { background: rgba(201, 162, 39, 0.08); }
|
||||
|
||||
.button-small { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
|
||||
.button-small { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
|
||||
|
||||
.discord-inline {
|
||||
display: inline-flex;
|
||||
|
|
@ -2803,15 +2816,7 @@ a.button-small:hover { text-decoration: none; }
|
|||
.shop-reserved { font-size: 0.75rem; margin-top: 0.1rem; }
|
||||
.shop-hero-actions { display: flex; flex-direction: column; gap: 0.4rem; }
|
||||
/* Beide Buttons ("Antraege", "Shop verwalten") gleich breit und hoch */
|
||||
.shop-hero-actions .button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 11.5rem;
|
||||
max-width: 100%;
|
||||
min-height: 2.75rem;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
.shop-hero-actions .button { width: 11.5rem; max-width: 100%; }
|
||||
.shop-hero-actions .button-secondary { border-color: var(--border); }
|
||||
|
||||
.shop-count {
|
||||
|
|
@ -3426,17 +3431,7 @@ input.shop-approve-quantity { width: 72px; padding: 0.3rem 0.45rem; font-size: 0
|
|||
.tour-restart > div { flex: 1; }
|
||||
.tour-restart-panel .tour-restart { min-height: 4.5rem; }
|
||||
/* Beide Buttons (Link und Formular-Knopf) gleich gross */
|
||||
.tour-restart-button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 15rem;
|
||||
max-width: 100%;
|
||||
min-height: 2.75rem;
|
||||
padding: 0.6rem 1rem;
|
||||
font-size: 1rem;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.tour-restart-button { width: 15rem; max-width: 100%; }
|
||||
.tour-restart h2 { margin: 0 0 0.2rem; }
|
||||
.tour-restart p { margin: 0; }
|
||||
|
||||
|
|
@ -5526,7 +5521,7 @@ strong.grade-common, strong.grade-rare, strong.grade-epic, strong.grade-unique,
|
|||
.gear-set-title p { margin: 0.5rem 0 0; }
|
||||
.gear-set-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
|
||||
.gear-set-actions form { margin: 0; }
|
||||
.gear-compare-with select { width: auto; padding: 0.35rem 0.6rem; font-size: 0.85rem; }
|
||||
.gear-compare-with select { width: auto; }
|
||||
.gear-layout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 1.5rem; align-items: start; }
|
||||
@media (max-width: 800px) { .gear-layout { grid-template-columns: 1fr; } }
|
||||
|
||||
|
|
@ -5584,6 +5579,20 @@ strong.grade-common, strong.grade-rare, strong.grade-epic, strong.grade-unique,
|
|||
.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 .gear-set-card-info { flex: 1; }
|
||||
/* Werte-Summe neben der Saeule: Name links, Zahl rechtsbuendig */
|
||||
.gear-set-card-stats {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 0.5rem;
|
||||
padding-top: 0.5rem;
|
||||
border-top: 1px solid var(--border);
|
||||
font-size: 0.8rem;
|
||||
line-height: 1.55;
|
||||
}
|
||||
.gear-set-card-stat { display: flex; justify-content: space-between; gap: 0.75rem; }
|
||||
.gear-set-card-stat-name { color: var(--text-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.gear-set-card-stat-value { flex-shrink: 0; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
|
||||
.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; }
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ include __DIR__ . '/includes/header.php';
|
|||
|
||||
<?php if ($canCreate): ?>
|
||||
<details class="calendar-new">
|
||||
<summary class="button button-small"><?= icon('calendar') ?> + Termin eintragen</summary>
|
||||
<summary class="button"><?= icon('calendar') ?> + Termin eintragen</summary>
|
||||
<form method="post" action="/calendar_action.php" class="calendar-form">
|
||||
<?= csrf_field() ?>
|
||||
<input type="hidden" name="action" value="create">
|
||||
|
|
|
|||
8
gear.php
8
gear.php
|
|
@ -87,10 +87,10 @@ include __DIR__ . '/includes/header.php';
|
|||
</div>
|
||||
<div class="gear-head-actions">
|
||||
<?php if ($set || $compare): ?>
|
||||
<a class="button button-secondary button-small" href="/gear.php">Meine Sets</a>
|
||||
<a class="button button-secondary" href="/gear.php">Meine Sets</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($canManage): ?>
|
||||
<a class="button button-secondary button-small" href="/admin/gear_items.php"><?= icon('list') ?> Gegenstände verwalten</a>
|
||||
<a class="button button-secondary" href="/admin/gear_items.php"><?= icon('list') ?> Gegenstände verwalten</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -200,12 +200,12 @@ include __DIR__ . '/includes/header.php';
|
|||
</div>
|
||||
<div class="gear-set-actions">
|
||||
<?php if ($isOwn): ?>
|
||||
<button type="button" class="button button-secondary button-small" data-modal-open="gear-set-edit"><?= icon('edit') ?> Bearbeiten</button>
|
||||
<button type="button" class="button button-secondary" data-modal-open="gear-set-edit"><?= icon('edit') ?> Bearbeiten</button>
|
||||
<form method="post" action="/gear_action.php">
|
||||
<?= csrf_field() ?>
|
||||
<input type="hidden" name="action" value="duplicate">
|
||||
<input type="hidden" name="set_id" value="<?= (int) $set['id'] ?>">
|
||||
<button type="submit" class="button button-secondary button-small">Kopieren</button>
|
||||
<button type="submit" class="button button-secondary">Kopieren</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<?php $compareWith = array_values(array_filter($mySets, static fn (array $s): bool => (int) $s['id'] !== (int) $set['id'])); ?>
|
||||
|
|
|
|||
16
member.php
16
member.php
|
|
@ -69,9 +69,9 @@ include __DIR__ . '/includes/header.php';
|
|||
</div>
|
||||
<div class="member-profile-actions">
|
||||
<?php if ($canEdit): ?>
|
||||
<a class="button button-small" href="/member_edit.php?id=<?= $id ?>"><?= icon('edit') ?> <?= $isOwn ? 'Profilseite bearbeiten' : 'Bearbeiten (Leitung)' ?></a>
|
||||
<a class="button" href="/member_edit.php?id=<?= $id ?>"><?= icon('edit') ?> <?= $isOwn ? 'Profilseite bearbeiten' : 'Bearbeiten (Leitung)' ?></a>
|
||||
<?php endif; ?>
|
||||
<a class="button button-secondary button-small" href="/members.php">Alle Mitglieder</a>
|
||||
<a class="button button-secondary" href="/members.php">Alle Mitglieder</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -136,6 +136,18 @@ include __DIR__ . '/includes/header.php';
|
|||
<?php if ($gear['item_level'] !== null): ?><br>Ø Stufe <?= e(number_format($gear['item_level'], 1, ',', '.')) ?><?php endif; ?>
|
||||
</span>
|
||||
<?php if (!empty($gear['set']['note'])): ?><span class="gear-set-card-note"><?= e($gear['set']['note']) ?></span><?php endif; ?>
|
||||
<?php $gearTotals = gear_set_totals($gear['slots']); ?>
|
||||
<?php if ($gearTotals): ?>
|
||||
<?php // Werte-Summe wie im Gear-Planer (die wichtigsten zuerst, siehe GEAR_STAT_ORDER) ?>
|
||||
<span class="gear-set-card-stats">
|
||||
<?php foreach ($gearTotals as $total): ?>
|
||||
<span class="gear-set-card-stat">
|
||||
<span class="gear-set-card-stat-name" title="<?= e($total['name']) ?>"><?= e($total['name']) ?></span>
|
||||
<span class="gear-set-card-stat-value"><?= $total['estimated'] ? '<span class="gear-estimated" title="enthält hochgerechnete Zwischenstufen">≈</span>' : '' ?><?= e(gear_format_value($total['total'], $total['unit'])) ?></span>
|
||||
</span>
|
||||
<?php endforeach; ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<span class="gear-set-card-more">Details ansehen →</span>
|
||||
</span>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ include __DIR__ . '/includes/header.php';
|
|||
<div class="panel">
|
||||
<div class="raid-header">
|
||||
<h1><?= $isOwn ? 'Meine Profilseite' : 'Profilseite von ' . e($name) ?></h1>
|
||||
<a class="button button-secondary button-small" href="/member.php?id=<?= $id ?>">Ansehen</a>
|
||||
<a class="button button-secondary" href="/member.php?id=<?= $id ?>">Ansehen</a>
|
||||
</div>
|
||||
<p class="text-muted">Alles hier sehen die anderen Mitglieder der Legion auf deiner Profilseite.</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ include __DIR__ . '/includes/header.php';
|
|||
<div class="panel members-head">
|
||||
<div class="raid-header">
|
||||
<h1>Mitglieder</h1>
|
||||
<a class="button button-secondary button-small" href="/member_edit.php"><?= icon('edit') ?> Meine Profilseite</a>
|
||||
<a class="button button-secondary" href="/member_edit.php"><?= icon('edit') ?> Meine Profilseite</a>
|
||||
</div>
|
||||
<p class="text-muted">Übersicht über alle Legionsmitglieder. Ein Klick auf ein Mitglied öffnet seine Profilseite.</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ include __DIR__ . '/includes/header.php';
|
|||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($unconfiguredRoles)): ?>
|
||||
<button type="button" class="button-success" id="report-add-role-btn" style="margin-top:1rem;">+ Rolle hinzufügen</button>
|
||||
<button type="button" class="button-success report-add-btn" id="report-add-role-btn">+ Rolle hinzufügen</button>
|
||||
|
||||
<div id="report-add-role-modal" class="modal-overlay" hidden>
|
||||
<div class="modal">
|
||||
|
|
@ -350,7 +350,7 @@ include __DIR__ . '/includes/header.php';
|
|||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($includableRoles)): ?>
|
||||
<button type="button" class="button-success" id="report-add-exclusion-btn" style="margin-top:1rem;">+ Rolle ausschließen</button>
|
||||
<button type="button" class="button-success report-add-btn" id="report-add-exclusion-btn">+ Rolle ausschließen</button>
|
||||
|
||||
<div id="report-add-exclusion-modal" class="modal-overlay" hidden>
|
||||
<div class="modal">
|
||||
|
|
|
|||
Loading…
Reference in a new issue