LuminaWebsite/index.php
Maaxxs fa05cf3ef0 Add profile pictures: Discord avatar or a letter placeholder
Adds a discord_avatar column (captured from Discord's OAuth /users/@me
response and stored alongside discord_id/discord_username) and a new
avatar_html() helper: it renders the linked Discord avatar when one is
set, otherwise a circular placeholder with the display name's first
letter on a color picked deterministically per user from a palette
tuned for the dark/gold Lumina theme. Shown on the Startseite hero for
logged-in members and next to "Angemeldet als" in the sidebar footer.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 07:12:45 +02:00

20 lines
861 B
PHP

<?php
require_once __DIR__ . '/includes/bootstrap.php';
$user = current_user();
$pageTitle = 'Startseite';
include __DIR__ . '/includes/header.php';
?>
<div class="hero">
<?php if ($user): ?>
<?= avatar_html($user, 88) ?>
<h1>Willkommen zurück, <?= e($user['display_name'] !== '' ? $user['display_name'] : $user['username']) ?>!</h1>
<p class="text-muted">Die Homepage folgt in Kürze. Bis dahin geht's hier zu deinem Mitgliederbereich.</p>
<p><a class="button" href="/dashboard.php">Zum Dashboard</a></p>
<?php else: ?>
<h1>Aion2 Gilde</h1>
<p class="text-muted">Die Homepage folgt in Kürze. Mitglieder gelangen über den Login in den Mitgliederbereich.</p>
<p><a class="button" href="/login.php">Zum Login</a></p>
<?php endif; ?>
</div>
<?php include __DIR__ . '/includes/footer.php'; ?>