adsad
All checks were successful
Deploy / deploy (push) Successful in 1m41s

This commit is contained in:
2026-07-27 02:08:28 +02:00
parent 75e3cab14b
commit da942a76aa
3 changed files with 26 additions and 75 deletions

View File

@@ -297,12 +297,16 @@ $sectionLinks = [
</div>
<form method="post" class="stack gap-12 avatar-builder" data-avatar-builder style="margin-top:12px;">
<input type="hidden" name="action" value="avatar_update">
<input type="hidden" name="avatar_preset" value="<?= htmlspecialchars((string)$profile['avatar_preset'], ENT_QUOTES) ?>" data-avatar-field="avatar_preset">
<div class="avatar-builder__layout">
<div class="avatar-builder__preview">
<div data-avatar-preview>
<?= \App\Avatar\Lorelei::render($profile, $profile['display_name'] ?: 'Papa', 'xxl') ?>
</div>
<p class="muted small">Wähle eine Lorelei-Variante oder lade dir direkt neue Vorschläge. Die Vorschau aktualisiert sich sofort.</p>
<p class="muted small">Wähle eine Komponente und passe dein neues Profilbild Schritt für Schritt an. Gespeichert wird erst nach Klick auf den Button unten.</p>
<div class="flex gap-12" style="flex-wrap:wrap; justify-content:center;">
<button class="btn ghost" type="button" data-avatar-reroll>Neue Grundvariante laden</button>
</div>
<div class="avatar-component-nav" role="tablist" aria-label="Avatar-Komponenten">
<?php foreach (\App\Avatar\Lorelei::componentDefinitions() as $field => $meta): ?>
<button
@@ -317,10 +321,10 @@ $sectionLinks = [
</div>
<div class="avatar-component-panels">
<?php foreach (\App\Avatar\Lorelei::componentDefinitions() as $field => $meta): ?>
<section class="avatar-component-panel <?= $field === 'avatar_lorelei_eyes_variant' ? 'is-active' : '' ?>" data-avatar-component-panel="<?= htmlspecialchars((string)$field, ENT_QUOTES) ?>">
<section class="avatar-component-panel avatar-component-panel--<?= htmlspecialchars(str_replace(['avatar_lorelei_', '_variant'], '', (string)$field), ENT_QUOTES) ?> <?= $field === 'avatar_lorelei_eyes_variant' ? 'is-active' : '' ?>" data-avatar-component-panel="<?= htmlspecialchars((string)$field, ENT_QUOTES) ?>">
<div class="avatar-component-panel__head">
<strong><?= htmlspecialchars((string)$meta['label'], ENT_QUOTES) ?></strong>
<span class="muted small">Direkt mit Vorschau auswählbar</span>
<span class="muted small">Nur die jeweilige Komponente in groß</span>
</div>
<div class="avatar-component-grid">
<?php foreach (\App\Avatar\Lorelei::previewChoices($profile, $field) as $choice): ?>
@@ -349,38 +353,6 @@ $sectionLinks = [
<?php endforeach; ?>
</div>
</div>
<div class="avatar-builder__controls">
<div class="flex gap-12" style="flex-wrap:wrap;">
<button class="btn ghost" type="button" data-avatar-reroll>Neue Varianten laden</button>
</div>
<div class="stack gap-6">
<span class="label">Variante wählen</span>
<div class="avatar-preset-grid" data-avatar-grid>
<?php foreach ($avatarPresetOptions as $index => $meta): ?>
<label class="avatar-preset-card">
<input
type="radio"
name="avatar_preset"
value="<?= htmlspecialchars((string)$meta['seed'], ENT_QUOTES) ?>"
data-avatar-field="avatar_preset"
data-avatar-url="<?= htmlspecialchars((string)$meta['image'], ENT_QUOTES) ?>"
<?= $profile['avatar_preset'] === $meta['seed'] || ($profile['avatar_preset'] === '' && $index === 0) ? 'checked' : '' ?>
>
<span class="avatar-preset-card__thumb">
<img
src="<?= htmlspecialchars((string)$meta['image'], ENT_QUOTES) ?>"
alt="<?= htmlspecialchars((string)$meta['label'], ENT_QUOTES) ?>"
data-avatar-option-thumb
data-avatar-option-field="avatar_preset"
data-avatar-option-value="<?= htmlspecialchars((string)$meta['seed'], ENT_QUOTES) ?>"
>
</span>
<span class="avatar-preset-card__label"><?= htmlspecialchars((string)$meta['label'], ENT_QUOTES) ?></span>
</label>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
<div class="flex gap-12">
<button class="btn ghost" type="button" data-modal-close>Abbrechen</button>