fix(nav): restrict visual editor access to pages management overview

This commit is contained in:
Daniel S
2026-08-09 22:36:33 +02:00
parent d5b66ff830
commit da50ac468b
2 changed files with 11 additions and 18 deletions

View File

@@ -5,9 +5,9 @@ const { currentPath = '' } = Astro.props;
const navItems = [
{ href: '/admin', label: 'Allgemein & Konfig', icon: '🎛️' },
{ href: '/admin/pages', label: 'Seiten-Verwaltung', icon: '📄' },
{ href: '/admin/editor', label: 'Visueller Editor', icon: '🎨' },
{ href: '/admin/settings', label: 'Stammdaten & SEO', icon: '⚙️' },
];
---
<!-- Burger Button (Mobile / Sidebar Toggle) -->

View File

@@ -36,31 +36,24 @@ const presets = Object.values(THEME_PRESETS);
</div>
<!-- Quick Admin Nav Cards / Links -->
<nav aria-label="Admin Navigation" class="grid grid-cols-1 sm:grid-cols-3 gap-3 pt-2">
<a href="/admin/pages" class="p-3 bg-slate-900/80 border border-white/10 hover:border-sky-400/50 rounded-xl flex items-center justify-between text-xs transition-all group">
<nav aria-label="Admin Navigation" class="grid grid-cols-1 sm:grid-cols-2 gap-4 pt-2">
<a href="/admin/pages" class="p-4 bg-slate-900/80 border border-white/10 hover:border-sky-400/50 rounded-xl flex items-center justify-between text-xs transition-all group">
<div>
<span class="font-bold text-white block group-hover:text-sky-400">📄 Seiten-Verwaltung</span>
<span class="text-[10px] text-slate-400">Routen, Slugs & Startseite festlegen</span>
<span class="font-bold text-white block group-hover:text-sky-400 text-sm">📄 Seiten-Verwaltung & Visueller Editor</span>
<span class="text-[11px] text-slate-400">Routen, Slugs, Startseite & Seiten im Editor öffnen</span>
</div>
<span class="text-sky-400 text-sm font-bold">→</span>
<span class="text-sky-400 text-base font-bold">→</span>
</a>
<a href="/admin/editor" class="p-3 bg-slate-900/80 border border-white/10 hover:border-sky-400/50 rounded-xl flex items-center justify-between text-xs transition-all group">
<a href="/admin/settings" class="p-4 bg-slate-900/80 border border-white/10 hover:border-sky-400/50 rounded-xl flex items-center justify-between text-xs transition-all group">
<div>
<span class="font-bold text-white block group-hover:text-sky-400">🎨 Visueller Drag & Drop Editor</span>
<span class="text-[10px] text-slate-400">Sektionen & Inhalts-Vorschau</span>
<span class="font-bold text-white block group-hover:text-sky-400 text-sm">⚙️ Stammdaten & SEO</span>
<span class="text-[11px] text-slate-400">Firmen-Daten & Dynamic Data Binding</span>
</div>
<span class="text-sky-400 text-sm font-bold">→</span>
</a>
<a href="/admin/settings" class="p-3 bg-slate-900/80 border border-white/10 hover:border-sky-400/50 rounded-xl flex items-center justify-between text-xs transition-all group">
<div>
<span class="font-bold text-white block group-hover:text-sky-400">⚙️ Stammdaten & SEO</span>
<span class="text-[10px] text-slate-400">Firmen-Daten & Dynamic Data Binding</span>
</div>
<span class="text-sky-400 text-sm font-bold">→</span>
<span class="text-sky-400 text-base font-bold">→</span>
</a>
</nav>
</div>