diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 272b820..e02bd4a 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -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();
- N&D i-t SOLUTIONS + {siteConfig.header?.brandName || 'N&D'} {siteConfig.header?.brandHighlight || 'i-t SOLUTIONS'}

- Ihr Partner für professionelles Webdesign, Website-Entwicklung und lokale SEO für Kleinbetriebe & KMU. + {footer.brandDescription}

@@ -31,13 +39,15 @@ const currentYear = new Date().getFullYear();
- © {currentYear} N&D i-t SOLUTIONS. Alle Rechte vorbehalten. -
-
- Datenschutz - | - Impressum + © {currentYear} {footer.copyrightText}
+ {footer.showLegalLinks !== false && ( +
+ Datenschutz + | + Impressum +
+ )}
diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index d441a1d..576691c 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -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 +}; --- -
+
- N&D i-t SOLUTIONS + {header.brandName || 'N&D'} {header.brandHighlight || 'i-t SOLUTIONS'} @@ -23,22 +34,26 @@ import { FaBars, FaTimes } from 'react-icons/fa';
- - + {header.showThemeToggle !== false && ( + + + )} - + {header.ctaText && ( + + )}
- + + + +
+

+ Header & Navigation Bearbeiten +

+
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+

+ Footer & Reconstitution Bearbeiten +

+
+
+ + +
+
+ + +
+
+
@@ -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', diff --git a/src/utils/configLoader.ts b/src/utils/configLoader.ts index 5bd187f..a691565 100644 --- a/src/utils/configLoader.ts +++ b/src/utils/configLoader.ts @@ -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.',