Calendar: expandable participant list, Discord previews with the bot color
- Member entries: avatar row with "+X" and "N attending", a click expands the list with avatar, name, profile link, "Host" and "You" - Discord previews (events, activity check) have the bot color #206694 on the left instead of gold (CSS variable --bot-color) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
3c9574c430
commit
80d471edd8
2 changed files with 105 additions and 11 deletions
|
|
@ -7,6 +7,8 @@
|
||||||
--text-muted: #a0a0a0;
|
--text-muted: #a0a0a0;
|
||||||
--gold: #c9a227;
|
--gold: #c9a227;
|
||||||
--gold-hover: #e0b930;
|
--gold-hover: #e0b930;
|
||||||
|
/* Farbe des Discord-Bots (Rand seiner Nachrichten) - auch in den Vorschauen auf der Website */
|
||||||
|
--bot-color: #206694;
|
||||||
--danger: #d9534f;
|
--danger: #d9534f;
|
||||||
--success: #4caf50;
|
--success: #4caf50;
|
||||||
--discord: #5865f2;
|
--discord: #5865f2;
|
||||||
|
|
@ -1888,7 +1890,7 @@ input.role-weight-input {
|
||||||
}
|
}
|
||||||
|
|
||||||
.event-preview-embed {
|
.event-preview-embed {
|
||||||
border-left: 4px solid var(--gold);
|
border-left: 4px solid var(--bot-color);
|
||||||
border-radius: 0 6px 6px 0;
|
border-radius: 0 6px 6px 0;
|
||||||
background: var(--bg-panel);
|
background: var(--bg-panel);
|
||||||
padding: 0.7rem 0.9rem;
|
padding: 0.7rem 0.9rem;
|
||||||
|
|
@ -5437,9 +5439,76 @@ a.calendar-agenda-entry:hover { text-decoration: none; filter: brightness(1.2);
|
||||||
.calendar-member-author { display: inline-flex; align-items: center; gap: 0.35rem; margin-left: auto; font-size: 0.85rem; }
|
.calendar-member-author { display: inline-flex; align-items: center; gap: 0.35rem; margin-left: auto; font-size: 0.85rem; }
|
||||||
.calendar-member-description { margin: 0; font-size: 0.9rem; overflow-wrap: anywhere; }
|
.calendar-member-description { margin: 0; font-size: 0.9rem; overflow-wrap: anywhere; }
|
||||||
.calendar-member-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
|
.calendar-member-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
|
||||||
.calendar-participants { display: flex; align-items: center; }
|
/* Teilnehmer eines Mitglieder-Termins: Avatar-Reihe, aufklappbar zur Liste mit Namen */
|
||||||
.calendar-participants .avatar, .calendar-participants .avatar-wrap { margin-right: -6px; border: 2px solid #232323; border-radius: 50%; }
|
.calendar-member-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
|
||||||
.calendar-participants .text-muted { margin-left: 0.8rem; font-size: 0.82rem; }
|
.calendar-people > summary {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.6rem;
|
||||||
|
padding: 0.25rem 0.6rem 0.25rem 0.3rem;
|
||||||
|
border-radius: 999px;
|
||||||
|
list-style: none;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.15s ease;
|
||||||
|
}
|
||||||
|
.calendar-people > summary::-webkit-details-marker { display: none; }
|
||||||
|
.calendar-people > summary:hover { background: rgba(255, 255, 255, 0.06); }
|
||||||
|
.calendar-people[data-empty] > summary { cursor: default; background: none; }
|
||||||
|
.calendar-people-stack { display: inline-flex; align-items: center; }
|
||||||
|
.calendar-people-stack .avatar, .calendar-people-stack .avatar-wrap { margin-right: -8px; border: 2px solid #1f2a1f; border-radius: 50%; }
|
||||||
|
.calendar-people-more {
|
||||||
|
display: inline-grid;
|
||||||
|
place-items: center;
|
||||||
|
min-width: 26px;
|
||||||
|
height: 26px;
|
||||||
|
padding: 0 0.3rem;
|
||||||
|
border-radius: 999px;
|
||||||
|
border: 2px solid #1f2a1f;
|
||||||
|
background: #2f3b2f;
|
||||||
|
color: #cfe8d3;
|
||||||
|
font-size: 0.72rem;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.calendar-people-label { margin-left: 0.5rem; font-size: 0.85rem; font-weight: 600; color: #bfe3c6; }
|
||||||
|
.calendar-people-toggle { font-size: 0.75rem; color: var(--text-muted); transition: transform 0.2s ease; }
|
||||||
|
.calendar-people[open] .calendar-people-toggle { transform: rotate(180deg); }
|
||||||
|
|
||||||
|
.calendar-people-list {
|
||||||
|
list-style: none;
|
||||||
|
margin: 0.6rem 0 0.2rem;
|
||||||
|
padding: 0;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
|
||||||
|
gap: 0.4rem;
|
||||||
|
animation: item-picker-in 0.15s ease-out;
|
||||||
|
}
|
||||||
|
.calendar-people-list a {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
padding: 0.35rem 0.55rem 0.35rem 0.35rem;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: rgba(0, 0, 0, 0.22);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.07);
|
||||||
|
color: var(--text);
|
||||||
|
font-size: 0.88rem;
|
||||||
|
}
|
||||||
|
.calendar-people-list a:hover { text-decoration: none; background: rgba(0, 0, 0, 0.32); border-color: rgba(59, 165, 93, 0.5); color: var(--text); }
|
||||||
|
.calendar-people-list .is-host a { border-color: rgba(201, 162, 39, 0.5); }
|
||||||
|
.calendar-people-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
|
||||||
|
.calendar-people-badge {
|
||||||
|
flex-shrink: 0;
|
||||||
|
padding: 0.05rem 0.45rem;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: rgba(201, 162, 39, 0.18);
|
||||||
|
color: var(--gold);
|
||||||
|
font-size: 0.68rem;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.calendar-people-badge.is-me { background: rgba(59, 165, 93, 0.2); color: #7fd694; }
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
.calendar-member-foot { grid-template-columns: minmax(0, 1fr); }
|
||||||
|
}
|
||||||
.calendar-member-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
|
.calendar-member-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
|
||||||
.calendar-edit { position: relative; }
|
.calendar-edit { position: relative; }
|
||||||
.calendar-edit > summary { list-style: none; cursor: pointer; }
|
.calendar-edit > summary { list-style: none; cursor: pointer; }
|
||||||
|
|
@ -5570,7 +5639,7 @@ a.calendar-agenda-entry:hover { text-decoration: none; filter: brightness(1.2);
|
||||||
.discord-preview { margin-top: 0.4rem; padding: 1rem; border-radius: 10px; background: #313338; color: #dbdee1; font-size: 0.92rem; }
|
.discord-preview { margin-top: 0.4rem; padding: 1rem; border-radius: 10px; background: #313338; color: #dbdee1; font-size: 0.92rem; }
|
||||||
.discord-ping { display: inline-block; margin-bottom: 0.4rem; padding: 0 0.2rem; border-radius: 3px; background: rgba(88, 101, 242, 0.3); color: #c9cdfb; font-weight: 600; }
|
.discord-ping { display: inline-block; margin-bottom: 0.4rem; padding: 0 0.2rem; border-radius: 3px; background: rgba(88, 101, 242, 0.3); color: #c9cdfb; font-weight: 600; }
|
||||||
.discord-ping[hidden] { display: none; }
|
.discord-ping[hidden] { display: none; }
|
||||||
.discord-embed { border-left: 4px solid #206694; border-radius: 4px; background: #2b2d31; padding: 0.7rem 0.9rem; display: flex; flex-direction: column; gap: 0.5rem; max-width: 520px; }
|
.discord-embed { border-left: 4px solid var(--bot-color); border-radius: 4px; background: #2b2d31; padding: 0.7rem 0.9rem; display: flex; flex-direction: column; gap: 0.5rem; max-width: 520px; }
|
||||||
.discord-embed-title { color: #fff; font-size: 1rem; }
|
.discord-embed-title { color: #fff; font-size: 1rem; }
|
||||||
.discord-embed-text { line-height: 1.45; overflow-wrap: anywhere; }
|
.discord-embed-text { line-height: 1.45; overflow-wrap: anywhere; }
|
||||||
.discord-embed-field { display: flex; flex-direction: column; font-size: 0.85rem; }
|
.discord-embed-field { display: flex; flex-direction: column; font-size: 0.85rem; }
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,37 @@ $actionForm = static function (string $action, string $label, string $class, str
|
||||||
<p class="calendar-member-description"><?= gallery_comment_html((string) $row['description']) ?></p>
|
<p class="calendar-member-description"><?= gallery_comment_html((string) $row['description']) ?></p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div class="calendar-member-foot">
|
<div class="calendar-member-foot">
|
||||||
<div class="calendar-participants" title="<?= e(implode(', ', array_map(static fn ($p) => $p['display_name'] !== '' ? $p['display_name'] : $p['username'], $entry['people']))) ?>">
|
<?php $peopleCount = count($entry['people']); ?>
|
||||||
<?php foreach (array_slice($entry['people'], 0, 8) as $person): ?>
|
<?php // Teilnehmer: Avatar-Reihe, ein Klick klappt die ganze Liste mit Namen auf ?>
|
||||||
<?= avatar_html($person, 24) ?>
|
<details class="calendar-people"<?= $peopleCount === 0 ? ' data-empty' : '' ?>>
|
||||||
|
<summary title="Wer ist dabei? Klicken zum Aufklappen">
|
||||||
|
<span class="calendar-people-stack">
|
||||||
|
<?php foreach (array_slice($entry['people'], 0, 6) as $person): ?>
|
||||||
|
<?= avatar_html($person, 26) ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<span class="text-muted"><?= count($entry['people']) ?> dabei</span>
|
<?php if ($peopleCount > 6): ?><span class="calendar-people-more">+<?= $peopleCount - 6 ?></span><?php endif; ?>
|
||||||
</div>
|
</span>
|
||||||
|
<span class="calendar-people-label"><?= $peopleCount ?> dabei</span>
|
||||||
|
<?php if ($peopleCount > 0): ?><span class="calendar-people-toggle" aria-hidden="true">▾</span><?php endif; ?>
|
||||||
|
</summary>
|
||||||
|
<?php if ($peopleCount > 0): ?>
|
||||||
|
<ul class="calendar-people-list">
|
||||||
|
<?php foreach ($entry['people'] as $person): ?>
|
||||||
|
<?php
|
||||||
|
$personName = $person['display_name'] !== '' ? $person['display_name'] : $person['username'];
|
||||||
|
$isHost = (int) $person['id'] === (int) $row['user_id'];
|
||||||
|
?>
|
||||||
|
<li class="<?= $isHost ? 'is-host' : '' ?><?= (int) $person['id'] === $myId ? ' is-me' : '' ?>">
|
||||||
|
<a href="/member.php?id=<?= (int) $person['id'] ?>">
|
||||||
|
<?= avatar_html($person, 30) ?>
|
||||||
|
<span class="calendar-people-name"><?= e($personName) ?></span>
|
||||||
|
<?php if ($isHost): ?><span class="calendar-people-badge">Veranstalter</span><?php elseif ((int) $person['id'] === $myId): ?><span class="calendar-people-badge is-me">Du</span><?php endif; ?>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
<?php endif; ?>
|
||||||
|
</details>
|
||||||
<div class="calendar-member-actions">
|
<div class="calendar-member-actions">
|
||||||
<?php if (!$entry['past']): ?>
|
<?php if (!$entry['past']): ?>
|
||||||
<?= $entry['joined']
|
<?= $entry['joined']
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue