layout
This commit is contained in:
@@ -1,30 +1,4 @@
|
||||
</main>
|
||||
</div>
|
||||
<footer class="site-footer">
|
||||
<div class="footer-left">© <?= date('Y') ?> Nexus</div>
|
||||
<div class="footer-right">Security first · Internal only</div>
|
||||
</footer>
|
||||
<?php asset_scripts('footer'); ?>
|
||||
<?php if (defined('APP_DEBUG_TOOL') && APP_DEBUG_TOOL): ?>
|
||||
<div class="debug-modal" id="debug-modal" aria-hidden="true">
|
||||
<div class="debug-modal__backdrop" data-debug-close></div>
|
||||
<div class="debug-modal__panel card">
|
||||
<div class="debug-modal__header">
|
||||
<strong>Debug Logs</strong>
|
||||
<button class="debug-modal__close" data-debug-close type="button">✕</button>
|
||||
</div>
|
||||
<div class="debug-modal__body">
|
||||
<div class="debug-modal__list">
|
||||
<div class="muted">Logs</div>
|
||||
<ul id="debug-log-list"></ul>
|
||||
</div>
|
||||
<div class="debug-modal__content">
|
||||
<div class="muted">Inhalt</div>
|
||||
<pre id="debug-log-content"></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</main>
|
||||
<script src="<?= e(app()->assets()->versioned('/assets/js/app.js')) ?>" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,134 +1,23 @@
|
||||
<?php
|
||||
/** @var \App\App $app */
|
||||
$app = app();
|
||||
$app->assets()->addStyle('/assets/css/app.css', 'early');
|
||||
$app->assets()->addScript('/assets/js/app.js', 'footer', true);
|
||||
$theme = user_theme();
|
||||
$currentModule = current_module_name();
|
||||
$path = $app->request()->path();
|
||||
$moduleMenu = [];
|
||||
$moduleSidebar = [];
|
||||
if ($currentModule) {
|
||||
$module = modules()->get($currentModule);
|
||||
$moduleMenu = $module['menu'] ?? [];
|
||||
$moduleSidebar = $module['sidebar'] ?? [];
|
||||
}
|
||||
$sidebarEnabled = !empty($moduleSidebar['enabled']);
|
||||
$sidebarCollapsible = !empty($moduleSidebar['collapsible']);
|
||||
$sidebarDefault = ($moduleSidebar['default'] ?? 'collapsed') === 'open' ? 'open' : 'collapsed';
|
||||
$sidebarItems = $moduleSidebar['items'] ?? [];
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="de" data-theme="<?= e($theme) ?>" data-accent="logo">
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?= htmlspecialchars(t('common.title'), ENT_QUOTES) ?></title>
|
||||
<?php asset_styles(); ?>
|
||||
<?php asset_scripts('header'); ?>
|
||||
<title>Nexus</title>
|
||||
<script>
|
||||
(() => {
|
||||
try {
|
||||
const theme = localStorage.getItem('nexus.theme') || 'day';
|
||||
const accent = localStorage.getItem('nexus.accent') || 'logo';
|
||||
document.documentElement.dataset.theme = theme;
|
||||
document.documentElement.dataset.accent = accent;
|
||||
} catch (error) {
|
||||
document.documentElement.dataset.theme = 'day';
|
||||
document.documentElement.dataset.accent = 'logo';
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<link rel="stylesheet" href="<?= e(app()->assets()->versioned('/assets/css/app.css')) ?>">
|
||||
</head>
|
||||
<body>
|
||||
<div class="bg-orb orb-a"></div>
|
||||
<div class="bg-orb orb-b"></div>
|
||||
|
||||
<header class="site-header card">
|
||||
<div class="logo-wrap">
|
||||
<img src="/assets/images/logo.png" alt="Nexus Logo" class="site-logo">
|
||||
</div>
|
||||
<nav class="header-nav">
|
||||
<a class="nav-link" href="/">Dashboard</a>
|
||||
<div class="dropdown">
|
||||
<button class="nav-link dropdown-toggle" type="button">Module ▾</button>
|
||||
<div class="dropdown-menu">
|
||||
<?php foreach (app()->auth()->filterModules(modules()->all()) as $m): ?>
|
||||
<?php if (!empty($m['enabled'])): ?>
|
||||
<a class="dropdown-item" href="/module/<?= e($m['name']) ?>"><?= e($m['title']) ?></a>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="/modules">Module Übersicht</a>
|
||||
<a class="dropdown-item" href="/modules/install">Modul installieren/aktivieren</a>
|
||||
<a class="dropdown-item" href="/settings">Settings</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<?php if (auth_enabled() && auth_user()): ?>
|
||||
<button class="avatar-btn" type="button">
|
||||
<span class="avatar"><?= e(auth_initials()) ?></span>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<div class="dropdown-header"><?= e(auth_display_name()) ?></div>
|
||||
<a class="dropdown-item" href="/settings">User-Settings</a>
|
||||
<a class="dropdown-item" href="/auth/logout">Logout</a>
|
||||
</div>
|
||||
<?php elseif (auth_enabled()): ?>
|
||||
<a class="nav-link" href="/auth/login">Login</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<?php if ($moduleMenu): ?>
|
||||
<div class="module-subnav card">
|
||||
<?php foreach ($moduleMenu as $entry): ?>
|
||||
<?php
|
||||
$href = (string)($entry['href'] ?? '');
|
||||
$label = (string)($entry['label'] ?? 'Link');
|
||||
$children = is_array($entry['children'] ?? null) ? $entry['children'] : [];
|
||||
$isSetup = $href !== '' && str_starts_with($href, '/modules/setup/');
|
||||
if ($isSetup) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<?php if ($children): ?>
|
||||
<div class="nav-dropdown">
|
||||
<button class="nav-link nav-link-button" type="button"><?= e($label) ?> ▾</button>
|
||||
<div class="nav-dropdown-menu">
|
||||
<?php foreach ($children as $child): ?>
|
||||
<?php
|
||||
$childHref = (string)($child['href'] ?? '');
|
||||
if ($childHref !== '' && str_starts_with($childHref, '/modules/setup/')) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<a class="nav-link" href="<?= e($childHref ?: '#') ?>">
|
||||
<?= e((string)($child['label'] ?? 'Link')) ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<a class="nav-link" href="<?= e($href ?: '#') ?>">
|
||||
<?= e($label) ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="layout-body no-sidebar sidebar-collapsed"
|
||||
data-sidebar-enabled="0"
|
||||
data-sidebar-collapsible="0"
|
||||
data-sidebar-default="collapsed">
|
||||
|
||||
<main class="main-content">
|
||||
|
||||
<button class="console-fab" type="button" data-console-fab title="Konsole öffnen">
|
||||
<span>›</span>
|
||||
</button>
|
||||
<div class="console-modal" data-console-modal aria-hidden="true">
|
||||
<div class="console-modal-card">
|
||||
<div class="console-modal-header">
|
||||
<strong>Konsole Tabs</strong>
|
||||
<button class="icon-button" type="button" data-console-close>×</button>
|
||||
</div>
|
||||
<div class="console-tabs" data-console-tabs style="margin-top:12px;">
|
||||
<div class="console-tab-bar" data-console-tab-bar></div>
|
||||
<div class="console-tab-panels" data-console-tab-panels></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (defined('APP_DEBUG_TOOL') && APP_DEBUG_TOOL && auth_is_admin()): ?>
|
||||
<button class="debug-fab" data-debug-open title="Debug" type="button">🐞</button>
|
||||
<?php endif; ?>
|
||||
<main class="main-shell">
|
||||
|
||||
Reference in New Issue
Block a user