layout
This commit is contained in:
@@ -9,24 +9,20 @@ $modules = array_values(array_filter(
|
||||
));
|
||||
?>
|
||||
<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): ?>
|
||||
<?php if ($authUser !== null): ?>
|
||||
<div class="section-head">
|
||||
<div style="display:flex; gap:10px; flex-wrap:wrap;">
|
||||
<a class="nav-link" href="/modules">Module verwalten</a>
|
||||
<?php if (auth_is_admin()): ?>
|
||||
<a class="nav-link" href="/exports/database.sql">SQL-Export</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($modules === []): ?>
|
||||
<div class="empty-state" data-reveal>
|
||||
Keine Module fuer den aktuellen Zugriff sichtbar.
|
||||
Keine Module für den aktuellen Zugriff sichtbar.
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="module-list">
|
||||
@@ -34,11 +30,9 @@ $modules = array_values(array_filter(
|
||||
<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>
|
||||
|
||||
@@ -5,9 +5,12 @@ if ($currentModuleName === null && preg_match('~^/modules/(?:setup|access)/([a-z
|
||||
$currentModuleName = $moduleMatch[1];
|
||||
}
|
||||
$currentModule = $currentModuleName !== null ? modules()->get($currentModuleName) : null;
|
||||
$headerEyebrow = $currentModule ? 'Modul' : 'Nexus';
|
||||
$headerTitle = $currentModule ? (string)($currentModule['title'] ?? $currentModuleName) : (defined('APP_DOMAIN_PRIMARY') ? (string)APP_DOMAIN_PRIMARY : 'Nexus');
|
||||
$headerText = $currentModule ? (string)($currentModule['description'] ?? '') : 'Kompakter Einstieg fuer die verfuegbaren Module.';
|
||||
$isStagingHost = defined('APP_DOMAIN_PRIMARY') && str_starts_with((string) APP_DOMAIN_PRIMARY, 'staging.');
|
||||
$headerEyebrow = '';
|
||||
$headerTitle = $currentModule
|
||||
? (string)($currentModule['title'] ?? $currentModuleName)
|
||||
: ('Nexus' . ($isStagingHost ? ' (staging)' : ''));
|
||||
$headerText = $currentModule ? (string)($currentModule['description'] ?? '') : '';
|
||||
$auth = app()->auth();
|
||||
$authUser = $auth->user();
|
||||
?>
|
||||
@@ -43,7 +46,9 @@ $authUser = $auth->user();
|
||||
<img src="/assets/images/logo.png" alt="Nexus Logo">
|
||||
</a>
|
||||
<div class="brand-copy">
|
||||
<span class="eyebrow"><?= e($headerEyebrow) ?></span>
|
||||
<?php if ($headerEyebrow !== ''): ?>
|
||||
<span class="eyebrow"><?= e($headerEyebrow) ?></span>
|
||||
<?php endif; ?>
|
||||
<h1><?= e($headerTitle) ?></h1>
|
||||
<?php if ($headerText !== ''): ?>
|
||||
<p><?= e($headerText) ?></p>
|
||||
|
||||
Reference in New Issue
Block a user