feat(waas-engine): add editable Header, Footer & Glassmorphism design controls in editor Inspector
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
---
|
||||
// src/components/Footer.astro
|
||||
import { loadWaasConfigs } from '../utils/configLoader';
|
||||
|
||||
const { siteConfig } = loadWaasConfigs();
|
||||
const footer = siteConfig.footer || {
|
||||
brandDescription: 'Ihr Partner für professionelles Webdesign, Website-Entwicklung und lokale SEO für Kleinbetriebe & KMU.',
|
||||
copyrightText: 'N&D i-t SOLUTIONS. Alle Rechte vorbehalten.',
|
||||
showLegalLinks: true
|
||||
};
|
||||
const currentYear = new Date().getFullYear();
|
||||
---
|
||||
|
||||
@@ -10,10 +18,10 @@ const currentYear = new Date().getFullYear();
|
||||
<!-- Brand logo/name -->
|
||||
<div>
|
||||
<a href="#" class="text-lg font-bold tracking-wider text-slate-900 dark:text-white">
|
||||
N&D <span class="text-brand-arcticBlue">i-t SOLUTIONS</span>
|
||||
{siteConfig.header?.brandName || 'N&D'} <span class="text-brand-arcticBlue">{siteConfig.header?.brandHighlight || 'i-t SOLUTIONS'}</span>
|
||||
</a>
|
||||
<p class="mt-2 text-xs text-slate-500 dark:text-gray-500 max-w-sm">
|
||||
Ihr Partner für professionelles Webdesign, Website-Entwicklung und lokale SEO für Kleinbetriebe & KMU.
|
||||
{footer.brandDescription}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -31,13 +39,15 @@ const currentYear = new Date().getFullYear();
|
||||
<!-- Bottom Copyright & Legal Links -->
|
||||
<div class="flex flex-col sm:flex-row items-center justify-between gap-4 text-xs text-slate-500 dark:text-gray-500">
|
||||
<div>
|
||||
© {currentYear} N&D i-t SOLUTIONS. Alle Rechte vorbehalten.
|
||||
© {currentYear} {footer.copyrightText}
|
||||
</div>
|
||||
{footer.showLegalLinks !== false && (
|
||||
<div class="flex gap-6">
|
||||
<a href="/privacy" class="hover:text-slate-900 dark:hover:text-white transition-colors">Datenschutz</a>
|
||||
<span class="text-slate-300 dark:text-white/10">|</span>
|
||||
<a href="/privacy#impressum" class="hover:text-slate-900 dark:hover:text-white transition-colors">Impressum</a>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -1,16 +1,27 @@
|
||||
---
|
||||
// src/components/Navbar.astro
|
||||
import { FaBars, FaTimes } from 'react-icons/fa';
|
||||
import { loadWaasConfigs } from '../utils/configLoader';
|
||||
|
||||
const { siteConfig } = loadWaasConfigs();
|
||||
const header = siteConfig.header || {
|
||||
brandName: 'N&D',
|
||||
brandHighlight: 'i-t SOLUTIONS',
|
||||
ctaText: 'Erstgespräch buchen',
|
||||
ctaLink: '#contact',
|
||||
showThemeToggle: true,
|
||||
glassEffect: true
|
||||
};
|
||||
---
|
||||
|
||||
<header id="main-header" class="fixed top-0 left-0 w-full z-50 transition-all duration-300 py-3 bg-white/30 dark:bg-brand-darkBg/30 backdrop-blur-xl border-b border-slate-200 dark:border-brand-darkBorder">
|
||||
<header id="main-header" class={`fixed top-0 left-0 w-full z-50 transition-all duration-300 py-3 ${header.glassEffect !== false ? 'bg-white/30 dark:bg-brand-darkBg/30 backdrop-blur-xl border-b border-slate-200 dark:border-brand-darkBorder' : 'bg-slate-900 border-b border-white/10'}`}>
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex items-center justify-between h-14">
|
||||
|
||||
<!-- Logo -->
|
||||
<a href="#" class="flex items-center gap-2 group">
|
||||
<span class="text-lg sm:text-xl font-bold tracking-wider text-slate-900 dark:text-white select-none transition-colors duration-300">
|
||||
N&D <span class="text-brand-arcticBlue">i-t SOLUTIONS</span>
|
||||
{header.brandName || 'N&D'} <span class="text-brand-arcticBlue">{header.brandHighlight || 'i-t SOLUTIONS'}</span>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
@@ -23,6 +34,7 @@ import { FaBars, FaTimes } from 'react-icons/fa';
|
||||
|
||||
<!-- Right controls -->
|
||||
<div class="flex items-center gap-4">
|
||||
{header.showThemeToggle !== false && (
|
||||
<!-- Theme Toggle Button (44x44px target) -->
|
||||
<button id="theme-toggle" class="w-11 h-11 flex items-center justify-center rounded-lg border border-slate-200 dark:border-brand-darkBorder bg-white/50 dark:bg-zinc-900/50 text-slate-700 dark:text-zinc-400 hover:text-brand-arcticBlue dark:hover:text-brand-arcticBlue transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-sky-500" aria-label="Farbschema wechseln">
|
||||
<!-- Moon Icon -->
|
||||
@@ -34,11 +46,14 @@ import { FaBars, FaTimes } from 'react-icons/fa';
|
||||
<path d="M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.46 5.05l-.707-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z" fill-rule="evenodd" clip-rule="evenodd"></path>
|
||||
</svg>
|
||||
</button>
|
||||
)}
|
||||
|
||||
<!-- CTA button -->
|
||||
<a href="#contact" class="hidden sm:inline-flex items-center justify-center px-4 py-2 text-xs font-semibold tracking-wider text-slate-700 dark:text-white border border-slate-200 dark:border-brand-darkBorder rounded bg-white/50 dark:bg-zinc-900/50 hover:border-brand-arcticBlue hover:text-brand-arcticBlue transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-sky-500" aria-label="Erstgespräch buchen">
|
||||
Erstgespräch buchen
|
||||
{header.ctaText && (
|
||||
<a href={header.ctaLink || "#contact"} class="hidden sm:inline-flex items-center justify-center px-4 py-2 text-xs font-semibold tracking-wider text-slate-700 dark:text-white border border-slate-200 dark:border-brand-darkBorder rounded bg-white/50 dark:bg-zinc-900/50 hover:border-brand-arcticBlue hover:text-brand-arcticBlue transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-sky-500" aria-label={header.ctaText}>
|
||||
{header.ctaText}
|
||||
</a>
|
||||
)}
|
||||
|
||||
<!-- Mobile menu button (44x44px target) -->
|
||||
<button id="mobile-menu-btn" class="md:hidden w-11 h-11 flex items-center justify-center rounded bg-white dark:bg-zinc-900 text-slate-700 dark:text-white border border-slate-200 dark:border-brand-darkBorder hover:bg-slate-50 dark:hover:bg-zinc-800 transition-all focus:outline-none focus:ring-2 focus:ring-sky-500" aria-label="Menü öffnen">
|
||||
|
||||
@@ -203,11 +203,12 @@ const { siteConfig, themeConfig } = loadWaasConfigs();
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- TAB 2: STIL (Layout, Typographie, Farbung & Glows) -->
|
||||
<!-- TAB 2: STIL (Layout, Header, Footer & Glassmorphism) -->
|
||||
<div id="tab-panel-style" class="hidden space-y-6">
|
||||
<!-- Glassmorphism & Theme Styles -->
|
||||
<div class="glass-panel rounded-xl p-4 space-y-4">
|
||||
<h3 class="text-xs font-bold text-sky-400 uppercase tracking-wider">
|
||||
Globales Farbtheme & Styling
|
||||
Glassmorphism & Theme Presets
|
||||
</h3>
|
||||
|
||||
<div class="space-y-3">
|
||||
@@ -220,16 +221,64 @@ const { siteConfig, themeConfig } = loadWaasConfigs();
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-[10px] font-bold text-slate-400 uppercase mb-1">Glass Backdrop Blur</label>
|
||||
<select id="style-blur-select" class="w-full glass-panel bg-slate-900 rounded-lg p-2 text-xs text-white focus:outline-none focus:border-sky-400">
|
||||
<option value="blur-sm">Subtle (blur-sm 4px)</option>
|
||||
<option value="blur-md">Medium (blur-md 8px)</option>
|
||||
<option value="blur-xl" selected>Ultra Glass (blur-xl 20px)</option>
|
||||
<option value="blur-3xl">Max Aurora (blur-3xl 60px)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-[10px] font-bold text-slate-400 uppercase mb-1">Glass Border Radius</label>
|
||||
<select id="style-radius-select" class="w-full glass-panel bg-slate-900 rounded-lg p-2 text-xs text-white focus:outline-none focus:border-sky-400">
|
||||
<option value="rounded-lg">Medium (12px)</option>
|
||||
<option value="rounded-xl">Large (16px)</option>
|
||||
<option value="rounded-xl" selected>Large (16px)</option>
|
||||
<option value="rounded-2xl">Extra Large (24px)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Header Bearbeiten -->
|
||||
<div class="glass-panel rounded-xl p-4 space-y-4">
|
||||
<h3 class="text-xs font-bold text-sky-400 uppercase tracking-wider">
|
||||
Header & Navigation Bearbeiten
|
||||
</h3>
|
||||
<div class="space-y-3">
|
||||
<div>
|
||||
<label class="block text-[10px] font-bold text-slate-400 uppercase mb-1">Marken-Name / Logo</label>
|
||||
<input type="text" id="header-brand-name" value={siteConfig.header?.brandName || 'N&D'} class="w-full glass-panel bg-slate-900 rounded-lg p-2 text-xs text-white focus:outline-none focus:border-sky-400" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-[10px] font-bold text-slate-400 uppercase mb-1">Marken Highlight</label>
|
||||
<input type="text" id="header-brand-highlight" value={siteConfig.header?.brandHighlight || 'i-t SOLUTIONS'} class="w-full glass-panel bg-slate-900 rounded-lg p-2 text-xs text-white focus:outline-none focus:border-sky-400" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-[10px] font-bold text-slate-400 uppercase mb-1">CTA Button Text</label>
|
||||
<input type="text" id="header-cta-text" value={siteConfig.header?.ctaText || 'Erstgespräch buchen'} class="w-full glass-panel bg-slate-900 rounded-lg p-2 text-xs text-white focus:outline-none focus:border-sky-400" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer Bearbeiten -->
|
||||
<div class="glass-panel rounded-xl p-4 space-y-4">
|
||||
<h3 class="text-xs font-bold text-sky-400 uppercase tracking-wider">
|
||||
Footer & Reconstitution Bearbeiten
|
||||
</h3>
|
||||
<div class="space-y-3">
|
||||
<div>
|
||||
<label class="block text-[10px] font-bold text-slate-400 uppercase mb-1">Footer Beschreibung</label>
|
||||
<textarea id="footer-description" class="w-full h-16 glass-panel bg-slate-900 rounded-lg p-2 text-xs text-white focus:outline-none focus:border-sky-400">{siteConfig.footer?.brandDescription || 'Ihr Partner für professionelles Webdesign.'}</textarea>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-[10px] font-bold text-slate-400 uppercase mb-1">Copyright Text</label>
|
||||
<input type="text" id="footer-copyright" value={siteConfig.footer?.copyrightText || 'N&D i-t SOLUTIONS. Alle Rechte vorbehalten.'} class="w-full glass-panel bg-slate-900 rounded-lg p-2 text-xs text-white focus:outline-none focus:border-sky-400" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- TAB 3: ERWEITERT (Animationen, Custom CSS & Z_index) -->
|
||||
@@ -495,6 +544,24 @@ const { siteConfig, themeConfig } = loadWaasConfigs();
|
||||
saveBtn.disabled = true;
|
||||
saveBtn.textContent = 'Wird gespeichert...';
|
||||
|
||||
// Collect Header Inputs
|
||||
const brandName = document.getElementById('header-brand-name')?.value;
|
||||
const brandHighlight = document.getElementById('header-brand-highlight')?.value;
|
||||
const ctaText = document.getElementById('header-cta-text')?.value;
|
||||
|
||||
if (!siteConfigState.header) siteConfigState.header = {};
|
||||
if (brandName !== undefined) siteConfigState.header.brandName = brandName;
|
||||
if (brandHighlight !== undefined) siteConfigState.header.brandHighlight = brandHighlight;
|
||||
if (ctaText !== undefined) siteConfigState.header.ctaText = ctaText;
|
||||
|
||||
// Collect Footer Inputs
|
||||
const footerDesc = document.getElementById('footer-description')?.value;
|
||||
const footerCopy = document.getElementById('footer-copyright')?.value;
|
||||
|
||||
if (!siteConfigState.footer) siteConfigState.footer = {};
|
||||
if (footerDesc !== undefined) siteConfigState.footer.brandDescription = footerDesc;
|
||||
if (footerCopy !== undefined) siteConfigState.footer.copyrightText = footerCopy;
|
||||
|
||||
try {
|
||||
await fetch('/api/update-config', {
|
||||
method: 'POST',
|
||||
|
||||
@@ -24,6 +24,19 @@ export interface SectionConfig {
|
||||
export interface SiteConfig {
|
||||
siteName: string;
|
||||
metaDescription: string;
|
||||
header?: {
|
||||
brandName?: string;
|
||||
brandHighlight?: string;
|
||||
ctaText?: string;
|
||||
ctaLink?: string;
|
||||
showThemeToggle?: boolean;
|
||||
glassEffect?: boolean;
|
||||
};
|
||||
footer?: {
|
||||
brandDescription?: string;
|
||||
copyrightText?: string;
|
||||
showLegalLinks?: boolean;
|
||||
};
|
||||
hero: {
|
||||
badge: string;
|
||||
title: string;
|
||||
@@ -59,6 +72,9 @@ export interface SiteConfig {
|
||||
|
||||
export interface ThemeConfig {
|
||||
activePreset: string;
|
||||
glassBlur?: string; // 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'
|
||||
glassOpacity?: number; // 0.1 to 0.9
|
||||
glassBorderRadius?: string; // 'rounded-lg' | 'rounded-xl' | 'rounded-2xl'
|
||||
customColors?: {
|
||||
bg?: string;
|
||||
accent?: string;
|
||||
@@ -79,6 +95,19 @@ export interface SmtpConfig {
|
||||
export const FALLBACK_SITE_CONFIG: SiteConfig = {
|
||||
siteName: 'N&D IT Solutions',
|
||||
metaDescription: 'High-Performance Webdesign & Digital Solutions - 100% DSGVO-konform.',
|
||||
header: {
|
||||
brandName: 'N&D',
|
||||
brandHighlight: 'i-t SOLUTIONS',
|
||||
ctaText: 'Erstgespräch buchen',
|
||||
ctaLink: '#contact',
|
||||
showThemeToggle: true,
|
||||
glassEffect: true
|
||||
},
|
||||
footer: {
|
||||
brandDescription: 'Ihr Partner für professionelles Webdesign, Website-Entwicklung und lokale SEO für Kleinbetriebe & KMU.',
|
||||
copyrightText: 'N&D i-t SOLUTIONS. Alle Rechte vorbehalten.',
|
||||
showLegalLinks: true
|
||||
},
|
||||
hero: {
|
||||
badge: ' Waas Enterprise Baukastensystem',
|
||||
title: 'Maßgeschneiderte Webseiten. Digital im Griff.',
|
||||
|
||||
Reference in New Issue
Block a user