Files
ndsolutionswebsite/src/layouts/Layout.astro
Daniel S baa639a9b2
Some checks failed
Production Build & Deploy / build-and-deploy (push) Has been cancelled
feat(admin): add demo mode toggle in admin dashboard and rewrite 404 page for missing routes
2026-08-09 22:43:36 +02:00

149 lines
4.2 KiB
Plaintext

---
import '@fontsource/inter/300.css';
import '@fontsource/inter/400.css';
import '@fontsource/inter/500.css';
import '@fontsource/inter/600.css';
import '@fontsource/inter/700.css';
import '@fontsource/space-grotesk/400.css';
import '@fontsource/space-grotesk/500.css';
import '@fontsource/space-grotesk/600.css';
import '@fontsource/space-grotesk/700.css';
import '../styles/glassmorphism.css';
import { loadWaasConfigs } from '../utils/configLoader';
import { THEME_PRESETS } from '../utils/themePresets';
interface Props {
title: string;
description?: string;
}
const { siteConfig, themeConfig } = loadWaasConfigs(Astro.request.headers.get('user-agent') ?? '');
const activePreset = THEME_PRESETS[themeConfig.activePreset] || THEME_PRESETS.corporateDark;
const colors = activePreset.colors;
const { title, description = "Professionelles Webdesign & moderne Websites." } = Astro.props;
---
<!doctype html>
<html lang="de" class="scroll-smooth">
<head>
<meta charset="UTF-8" />
<meta name="description" content={description} />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<title>{title}</title>
<script is:inline src="/js/editor-bridge.js"></script>
<style is:global define:vars={{
themeBg: colors.bg,
themeCardBg: colors.cardBg,
themeText: colors.text,
themeAccent: colors.accent,
themeBorder: colors.border
}}>
:root {
--theme-bg: var(--themeBg);
--theme-card-bg: var(--themeCardBg);
--theme-text: var(--themeText);
--theme-accent: var(--themeAccent);
--theme-border: var(--themeBorder);
}
html.light {
--theme-bg: #F8FAFC;
--theme-card-bg: rgba(255, 255, 255, 0.7);
--theme-text: #0F172A;
--theme-border: rgba(0, 0, 0, 0.1);
}
</style>
<!-- Inline theme initialization to prevent FOUC -->
<script is:inline>
(function() {
const theme = localStorage.getItem('theme');
if (theme === 'light') {
document.documentElement.classList.add('light');
document.documentElement.classList.remove('dark');
} else {
document.documentElement.classList.add('dark');
document.documentElement.classList.remove('light');
}
})();
</script>
</head>
<body class="font-sans transition-colors duration-500 antialiased">
{(siteConfig as any).is_demo_mode && (
<div class="bg-gradient-to-r from-amber-600 via-amber-500 to-amber-600 text-slate-950 text-center py-2 px-4 text-xs font-bold font-mono tracking-wide shadow-md flex items-center justify-center gap-2">
<span>🎭 DEMO-MODUS AKTIV</span>
<span class="opacity-75 font-sans font-normal">— Dies ist eine interaktive Vorschau-Instanz der N&D WaaS Engine.</span>
</div>
)}
<slot />
</body>
</html>
<style is:global>
:root {
--font-sans: 'Inter', sans-serif;
--font-display: 'Space Grotesk', sans-serif;
}
html {
font-family: var(--font-sans);
}
h1, h2, h3, h4, h5, h6 {
font-family: var(--font-display);
}
/* Parallax background custom scroll */
.parallax-bg {
background-attachment: fixed;
}
@media (max-width: 768px) {
.parallax-bg {
background-attachment: scroll;
}
}
/* Custom scrollbar */
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
background: #222;
border-radius: 5px;
border: 2px solid #0a0a0a;
}
::-webkit-scrollbar-thumb:hover {
background: #333;
}
/* Tactile Craftsman UI CSS classes */
.tactile-grid-bg {
background-image:
linear-gradient(to right, rgba(35, 45, 69, 0.2) 1px, transparent 1px),
linear-gradient(to bottom, rgba(35, 45, 69, 0.2) 1px, transparent 1px);
background-size: 40px 40px;
}
.tactile-noise {
position: relative;
}
.tactile-noise::before {
content: "";
position: absolute;
inset: 0;
width: 100%;
height: 100%;
opacity: 0.025;
pointer-events: none;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
z-index: 1;
}
</style>