adasd
This commit is contained in:
@@ -10,37 +10,48 @@ $navLinks = $navLinks ?? [
|
||||
];
|
||||
|
||||
$navActive = $navActive ?? null;
|
||||
$headerTabs = isset($headerTabs) ? (string)$headerTabs : '';
|
||||
$hasHeaderTabs = trim($headerTabs) !== '';
|
||||
$showNavLinks = !$hasHeaderTabs && !empty($navLinks);
|
||||
?>
|
||||
<header class="site-header sticky top-0 z-40 border-b border-slate-200 bg-white/90 backdrop-blur">
|
||||
<div class="max-w-6xl mx-auto px-4 lg:px-6 flex items-center gap-4 py-3">
|
||||
<div class="max-w-6xl mx-auto px-4 lg:px-6 flex flex-wrap items-center gap-4 py-3">
|
||||
<a href="<?= htmlspecialchars($appBaseUrl . '/index.php') ?>" class="flex items-center gap-2 text-slate-800 font-semibold">
|
||||
<span class="inline-flex h-9 w-9 items-center justify-center rounded-xl bg-sky-500 text-white font-bold">ET</span>
|
||||
<span class="hidden sm:block">Email Template System</span>
|
||||
</a>
|
||||
|
||||
<nav class="ms-auto hidden md:flex items-center gap-2 text-sm font-medium text-slate-500">
|
||||
<?php foreach ($navLinks as $link): ?>
|
||||
<?php
|
||||
$isActive = $navActive && $navActive === ($link['id'] ?? null);
|
||||
$classes = 'px-3 py-1.5 rounded-full transition-colors';
|
||||
$classes .= $isActive ? ' bg-sky-100 text-sky-700' : ' hover:text-slate-900';
|
||||
?>
|
||||
<a href="<?= htmlspecialchars($link['href']) ?>" class="<?= $classes ?>">
|
||||
<?= htmlspecialchars($link['label']) ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</nav>
|
||||
<div class="ms-auto flex items-center gap-3 flex-wrap justify-end flex-1">
|
||||
<?php if ($hasHeaderTabs): ?>
|
||||
<div class="header-tabs flex flex-wrap items-center gap-3 justify-end text-sm w-full md:w-auto">
|
||||
<?= $headerTabs ?>
|
||||
</div>
|
||||
<?php elseif ($showNavLinks): ?>
|
||||
<nav class="hidden md:flex items-center gap-2 text-sm font-medium text-slate-500">
|
||||
<?php foreach ($navLinks as $link): ?>
|
||||
<?php
|
||||
$isActive = $navActive && $navActive === ($link['id'] ?? null);
|
||||
$classes = 'px-3 py-1.5 rounded-full transition-colors';
|
||||
$classes .= $isActive ? ' bg-sky-100 text-sky-700' : ' hover:text-slate-900';
|
||||
?>
|
||||
<a href="<?= htmlspecialchars($link['href']) ?>" class="<?= $classes ?>">
|
||||
<?= htmlspecialchars($link['label']) ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="relative ms-auto md:ms-4" id="userMenu">
|
||||
<button id="btn-user" type="button" class="btn-avatar" aria-haspopup="true" aria-expanded="false">
|
||||
<span id="userAvatar">U</span>
|
||||
</button>
|
||||
<div id="userMenuPanel" class="user-menu hidden" role="menu">
|
||||
<a href="<?= htmlspecialchars($appBaseUrl . '/admin/profile.php') ?>" class="user-menu-item" data-menu="profile">Profil</a>
|
||||
<a href="<?= htmlspecialchars($appBaseUrl . '/admin/dashboard.php') ?>" class="user-menu-item" data-role="admin">Dashboard</a>
|
||||
<a href="<?= htmlspecialchars($appBaseUrl . '/admin/settings.php') ?>" class="user-menu-item" data-role="admin">Administration</a>
|
||||
<a href="<?= htmlspecialchars($appBaseUrl . '/admin/bridge.php') ?>" class="user-menu-item" data-role="admin">Bridge Setup</a>
|
||||
<button id="btn-logout" type="button" class="user-menu-item text-red-600">Logout</button>
|
||||
<div class="relative" id="userMenu">
|
||||
<button id="btn-user" type="button" class="btn-avatar" aria-haspopup="true" aria-expanded="false">
|
||||
<span id="userAvatar">U</span>
|
||||
</button>
|
||||
<div id="userMenuPanel" class="user-menu hidden" role="menu">
|
||||
<a href="<?= htmlspecialchars($appBaseUrl . '/admin/profile.php') ?>" class="user-menu-item" data-menu="profile">Profil</a>
|
||||
<a href="<?= htmlspecialchars($appBaseUrl . '/admin/dashboard.php') ?>" class="user-menu-item" data-role="admin">Dashboard</a>
|
||||
<a href="<?= htmlspecialchars($appBaseUrl . '/admin/settings.php') ?>" class="user-menu-item" data-role="admin">Administration</a>
|
||||
<a href="<?= htmlspecialchars($appBaseUrl . '/admin/bridge.php') ?>" class="user-menu-item" data-role="admin">Bridge Setup</a>
|
||||
<button id="btn-logout" type="button" class="user-menu-item text-red-600">Logout</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,22 +3,27 @@ require_once __DIR__ . '/../config/fileload.php';
|
||||
|
||||
$pageTitle = 'Email Template System – Admin';
|
||||
$pageId = 'home';
|
||||
$navActive = null;
|
||||
$navLinks = [];
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<nav class="isolate inline-flex flex-wrap rounded-2xl shadow-sm border bg-white overflow-hidden">
|
||||
<button type="button" data-tab="templates" class="px-4 py-2 text-sm border-e bg-sky-50 text-sky-700">Templates</button>
|
||||
<button type="button" data-tab="sections" class="px-4 py-2 text-sm border-e">Sections</button>
|
||||
<button type="button" data-tab="blocks" class="px-4 py-2 text-sm border-e">Blocks</button>
|
||||
<button type="button" data-tab="snippets" class="px-4 py-2 text-sm">Snippets</button>
|
||||
</nav>
|
||||
<button id="btn-new" type="button" class="btn">Neu …</button>
|
||||
<?php
|
||||
$headerTabs = ob_get_clean();
|
||||
|
||||
require __DIR__ . '/../partials/structure/layout_start.php';
|
||||
?>
|
||||
<main class="max-w-6xl mx-auto p-4 flex-1 w-full space-y-6">
|
||||
<section class="bg-white border border-slate-200 rounded-2xl shadow-sm px-4 py-3 flex flex-wrap items-center gap-3 sticky top-20 z-10">
|
||||
<h1 class="font-semibold text-lg text-slate-900 me-2">Email Template System</h1>
|
||||
<nav class="isolate inline-flex rounded-2xl shadow-sm border bg-white overflow-hidden">
|
||||
<button type="button" data-tab="templates" class="px-4 py-2 text-sm border-e bg-sky-50 text-sky-700">Templates</button>
|
||||
<button type="button" data-tab="sections" class="px-4 py-2 text-sm border-e">Sections</button>
|
||||
<button type="button" data-tab="blocks" class="px-4 py-2 text-sm border-e">Blocks</button>
|
||||
<button type="button" data-tab="snippets" class="px-4 py-2 text-sm">Snippets</button>
|
||||
</nav>
|
||||
<div class="flex items-center gap-3 ms-auto">
|
||||
<button id="btn-new" type="button" class="btn">Neu …</button>
|
||||
</div>
|
||||
</section>
|
||||
<header class="pb-2 border-b border-slate-200">
|
||||
<h1 class="font-semibold text-lg text-slate-900">Email Template System</h1>
|
||||
<p class="text-sm text-slate-500">Wähle eine Kategorie, um Templates, Sections, Blocks oder Snippets zu pflegen.</p>
|
||||
</header>
|
||||
|
||||
<section id="view-templates" class="view"></section>
|
||||
<section id="view-sections" class="view hidden"></section>
|
||||
|
||||
Reference in New Issue
Block a user