Nexus upgrade design and refresh

This commit is contained in:
2026-04-11 01:23:28 +02:00
parent 9d5bb2d3cf
commit e83925ba64
53 changed files with 13388 additions and 60 deletions

View File

@@ -1,34 +1,76 @@
<?php
$modules = modules()->all();
declare(strict_types=1);
$auth = app()->auth();
$authUser = $auth->user();
$modules = array_values(array_filter(
$auth->filterModules(modules()->all()),
static fn (array $module): bool => !empty($module['enabled'])
));
?>
<div class="card">
<div class="pill">Core</div>
<h1 style="margin-top:.75rem;">Nexus Basis-System</h1>
<p class="muted">Aktive Module verwalten und neue Module initialisieren.</p>
<section class="home-hero" data-reveal>
<a class="brand-mark" href="/" aria-label="Nexus">
<img src="/assets/images/kusche-logo.png" alt="Kusche Logo">
</a>
<div class="brand-copy">
<span class="eyebrow">Nexus</span>
<h1><?= e(defined('APP_DOMAIN_PRIMARY') ? (string)APP_DOMAIN_PRIMARY : 'Nexus') ?></h1>
<p>Kompakter Einstieg fuer die verfuegbaren Module.</p>
</div>
<div class="theme-switcher" aria-label="Farbschema">
<?php if ($auth->isEnabled()): ?>
<a class="auth-pill" href="<?= $authUser === null ? '/auth/login' : '/auth/logout' ?>">
<?= $authUser === null ? 'Login' : 'Logout ' . e((string)($authUser['username'] ?? $authUser['name'] ?? '')) ?>
</a>
<?php endif; ?>
<label>
<span>Modus</span>
<select data-theme-mode>
<option value="day">Day</option>
<option value="night">Night</option>
</select>
</label>
<label>
<span>Farbe</span>
<select data-theme-accent>
<option value="logo">Logo</option>
<option value="pink">Pink</option>
<option value="cyan">Cyan</option>
<option value="orange">Orange</option>
<option value="green">Gruen</option>
</select>
</label>
</div>
</section>
<div style="margin-top:1rem;">
<a class="nav-link" href="/modules">Module verwalten</a>
<section class="module-list-section" data-reveal>
<div class="section-head">
<div>
<h2 class="section-title">Verfuegbare Module</h2>
<p>Module mit Login-Pflicht erscheinen erst nach passender Anmeldung.</p>
</div>
<?php if ($authUser !== null): ?>
<a class="nav-link" href="/modules">Module verwalten</a>
<?php endif; ?>
</div>
<div style="margin-top:1.5rem;" class="grid">
<?php foreach ($modules as $module): ?>
<div class="card" style="background:var(--panel-2);">
<div style="display:flex; align-items:center; justify-content:space-between; gap:12px;">
<div>
<strong><?= e($module['title']) ?></strong>
<div class="muted" style="font-size:.85rem;"><?= e($module['description'] ?? '') ?></div>
</div>
<?php if (!empty($module['enabled'])): ?>
<span class="pill" style="border-color:var(--accent-2); color:var(--accent-2);">aktiv</span>
<?php else: ?>
<span class="pill">inaktiv</span>
<?php endif; ?>
</div>
<div style="margin-top:.75rem; display:flex; gap:10px; flex-wrap:wrap;">
<a class="nav-link" href="/module/<?= e($module['name']) ?>">Öffnen</a>
<a class="nav-link" href="/modules/setup/<?= e($module['name']) ?>">Setup</a>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<?php if ($modules === []): ?>
<div class="empty-state" data-reveal>
Keine Module fuer den aktuellen Zugriff sichtbar.
</div>
<?php else: ?>
<div class="module-list">
<?php foreach ($modules as $module): ?>
<a class="module-row" href="<?= e((string)($module['entry'] ?? ('/module/' . $module['name']))) ?>">
<span class="module-row__icon"><?= e(strtoupper(substr((string)($module['title'] ?? $module['name']), 0, 1))) ?></span>
<span class="module-row__content">
<span class="module-kicker"><?= e((string)($module['name'] ?? '')) ?></span>
<strong class="module-title"><?= e((string)($module['title'] ?? $module['name'] ?? 'Modul')) ?></strong>
<span class="module-desc"><?= e((string)($module['description'] ?? '')) ?></span>
</span>
<span class="module-row__action">Oeffnen</span>
</a>
<?php endforeach; ?>
</div>
<?php endif; ?>
</section>