Files
GNX-WEB/frontEnd/app/layout.tsx
Iliyan Angelov 366f28677a update
2025-11-24 03:52:08 +02:00

167 lines
5.5 KiB
TypeScript

import type { Metadata } from "next";
import { Inter, Montserrat } from "next/font/google";
import "@/public/styles/main.scss";
import { CookieConsentProvider } from "@/components/shared/layout/CookieConsentContext";
import { CookieConsent } from "@/components/shared/layout/CookieConsent";
import LayoutWrapper from "@/components/shared/layout/LayoutWrapper";
import { generateMetadata as createMetadata } from "@/lib/seo/metadata";
import { OrganizationSchema, WebsiteSchema, LocalBusinessSchema } from "@/components/shared/seo/StructuredData";
const montserrat = Montserrat({
subsets: ["latin"],
display: "swap",
weight: ["100", "200", "300", "400", "500", "600", "700", "800", "900"],
variable: "--mont",
fallback: [
"-apple-system",
"Segoe UI",
"Roboto",
"Ubuntu",
"Fira Sans",
"Arial",
"sans-serif",
],
});
const inter = Inter({
subsets: ["latin"],
display: "swap",
weight: ["100", "200", "300", "400", "500", "600", "700", "800", "900"],
variable: "--inter",
fallback: [
"-apple-system",
"Segoe UI",
"Roboto",
"Ubuntu",
"Fira Sans",
"Arial",
"sans-serif",
],
});
// Enhanced SEO metadata for root layout
export const metadata: Metadata = createMetadata({
title: "Enterprise Software Development & IT Solutions",
description: "Leading enterprise software development company specializing in custom software, data replication, incident management, AI business intelligence, and comprehensive system integrations for modern businesses.",
keywords: [
"Enterprise Software Development",
"Custom Software Solutions",
"Data Replication Services",
"Incident Management SaaS",
"AI Business Intelligence",
"Backend Engineering",
"Frontend Engineering",
"Systems Integration",
],
url: "/",
});
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en" style={{ scrollBehavior: 'auto', overflow: 'auto' }}>
<head>
<script
dangerouslySetInnerHTML={{
__html: `
if ('scrollRestoration' in history) {
history.scrollRestoration = 'manual';
}
window.scrollTo(0, 0);
`,
}}
/>
{/* Content Protection Script */}
<script
dangerouslySetInnerHTML={{
__html: `
(function() {
if (typeof window === 'undefined') return;
// Wait for DOM to be ready
document.addEventListener('DOMContentLoaded', function() {
// Disable right-click
document.addEventListener('contextmenu', function(e) {
e.preventDefault();
return false;
});
// Disable keyboard shortcuts
document.addEventListener('keydown', function(e) {
// Ctrl+C, Ctrl+X, Ctrl+S, Ctrl+A, Ctrl+P, Ctrl+U, Ctrl+I, Ctrl+J
if ((e.ctrlKey || e.metaKey) && ['c','x','s','a','p','u','i','j','k'].includes(e.key)) {
e.preventDefault();
return false;
}
// F12
if (e.key === 'F12' || e.keyCode === 123) {
e.preventDefault();
return false;
}
// Ctrl+Shift+I, Ctrl+Shift+J, Ctrl+Shift+C
if ((e.ctrlKey || e.metaKey) && e.shiftKey && ['I','J','C'].includes(e.key)) {
e.preventDefault();
return false;
}
});
// Disable text selection
document.addEventListener('selectstart', function(e) {
if (e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA') {
e.preventDefault();
return false;
}
});
// Disable image dragging
document.addEventListener('dragstart', function(e) {
e.preventDefault();
return false;
});
// Disable copy/cut
document.addEventListener('copy', function(e) {
e.preventDefault();
return false;
});
document.addEventListener('cut', function(e) {
e.preventDefault();
return false;
});
});
})();
`,
}}
/>
</head>
<body className={`${inter.variable} ${montserrat.variable} content-protected`} style={{ scrollBehavior: 'auto', overflow: 'auto' }}>
{/* Structured Data for SEO */}
<OrganizationSchema />
<WebsiteSchema />
<LocalBusinessSchema />
<CookieConsentProvider
config={{
companyName: "GNX Soft",
privacyPolicyUrl: "/policy?type=privacy",
cookiePolicyUrl: "/policy?type=privacy",
dataControllerEmail: "privacy@gnxsoft.com",
retentionPeriod: 365,
enableAuditLog: true,
enableDetailedSettings: true,
showPrivacyNotice: true,
}}
>
<LayoutWrapper>
{children}
</LayoutWrapper>
<CookieConsent />
</CookieConsentProvider>
</body>
</html>
);
}