Update src/app/layout.tsx

This commit is contained in:
2026-03-06 21:33:57 +00:00
parent 9d439f4676
commit 6b0985b3f6

View File

@@ -1,58 +1,71 @@
import type { Metadata } from "next";
import { Halant } from "next/font/google";
import { Inter } from "next/font/google";
import { Open_Sans } from "next/font/google";
import "./globals.css";
import { ServiceWrapper } from "@/components/ServiceWrapper";
import Tag from "@/tag/Tag";
const halant = Halant({
variable: "--font-halant",
subsets: ["latin"],
weight: ["300", "400", "500", "600", "700"],
});
import { ReactLenis } from "lenis/react";
const inter = Inter({
variable: "--font-inter",
subsets: ["latin"],
});
const openSans = Open_Sans({
variable: "--font-open-sans",
subsets: ["latin"],
variable: "--font-inter", subsets: ["latin"],
weight: ["100", "200", "300", "400", "500", "600", "700", "800", "900"],
});
export const metadata: Metadata = {
title: "Çevrimiçi Öğretmen Platformu - Uzman Eğitim",
description: "50+ deneyimli öğretmenle bağlantı kurun. Kişiselleştirilmiş eğitim, esnek zaman planlaması ve 4.9/5 memnuniyet oranı.",
keywords: "çevrimiçi öğretmen, ders platformu, eğitim, uzak eğitim, dersler",
title: "Öğretmen Platformu - Kişiselleştirilmiş Online Eğitim", description: "50+ deneyimli öğretmenle bağlantı kurun ve kişiselleştirilmiş eğitim alın. Esnek zaman planlaması ve etkili öğrenme deneyimi.", keywords: "online eğitim, öğretmen, tutor, kişiselleştirilmiş öğrenme, ders, eğitim platformu", authors: [{ name: "Öğretmen Platformu" }],
openGraph: {
title: "Çevrimiçi Öğretmen Platformu",
description: "50+ deneyimli öğretmenle bağlantı kurun ve etkili eğitim alın",
siteName: "Öğretmen Platformu",
type: "website",
type: "website", locale: "tr_TR", url: "https://ogretmen-platformu.com", title: "Öğretmen Platformu - Kişiselleştirilmiş Online Eğitim", description: "50+ deneyimli öğretmenle bağlantı kurun ve kişiselleştirilmiş eğitim alın.", siteName: "Öğretmen Platformu", images: [
{
url: "https://ogretmen-platformu.com/og-image.jpg", width: 1200,
height: 630,
alt: "Öğretmen Platformu"},
],
},
twitter: {
card: "summary_large_image",
title: "Çevrimiçi Öğretmen Platformu",
description: "Uzman öğretmenlerle dersler için kaydolun",
card: "summary_large_image", title: "Öğretmen Platformu", description: "Kişiselleştirilmiş online eğitim platformu", images: ["https://ogretmen-platformu.com/twitter-image.jpg"],
},
icons: {
icon: [
{ url: "/favicon.ico", sizes: "any" },
{ url: "/favicon-16x16.png", sizes: "16x16", type: "image/png" },
{ url: "/favicon-32x32.png", sizes: "32x32", type: "image/png" },
],
apple: [
{ url: "/apple-touch-icon.png", sizes: "180x180", type: "image/png" },
],
},
manifest: "/site.webmanifest", viewport: "width=device-width, initial-scale=1, maximum-scale=5", appleWebApp: {
capable: true,
statusBarStyle: "black-translucent", title: "Öğretmen Platformu"},
};
export default function RootLayout({
children,
}: Readonly<{
}: {
children: React.ReactNode;
}>) {
}) {
return (
<html lang="en" suppressHydrationWarning>
<ServiceWrapper>
<body
className={`${halant.variable} ${inter.variable} ${openSans.variable} antialiased`}
>
<Tag />
<html lang="tr">
<head>
<meta charSet="utf-8" />
<meta name="theme-color" content="#ffffff" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link rel="alternate" hrefLang="tr" href="https://ogretmen-platformu.com" />
<script
type="application/ld+json"
dangerouslySetInnerHTML={{
__html: JSON.stringify({
"@context": "https://schema.org", "@type": "EducationalOrganization", "name": "Öğretmen Platformu", "url": "https://ogretmen-platformu.com", "logo": "https://ogretmen-platformu.com/logo.png", "description": "Kişiselleştirilmiş online eğitim platformu", "sameAs": [
"https://twitter.com/ogretmenplatformu", "https://facebook.com/ogretmenplatformu", "https://instagram.com/ogretmenplatformu"
]
})
}}
/>
</head>
<body className={`${inter.variable} bg-background text-foreground`}>
<ReactLenis root>
{children}
</ReactLenis>
<CookieConsentBanner />
<script
dangerouslySetInnerHTML={{
__html: `
@@ -1420,7 +1433,59 @@ export default function RootLayout({
}}
/>
</body>
</ServiceWrapper>
</html>
);
}
function CookieConsentBanner() {
return (
<div
id="cookie-consent"
className="fixed bottom-0 left-0 right-0 z-50 p-4 bg-card border-t border-accent rounded-t-lg shadow-lg transform translate-y-full transition-transform duration-300 md:bottom-4 md:left-4 md:right-auto md:max-w-sm md:rounded-lg"
role="region"
aria-label="Cookie consent"
>
<div className="flex flex-col gap-3">
<p className="text-sm text-foreground leading-relaxed">
Deneyiminizi iyileştirmek için çerezleri kullanıyoruz. Site kullanımına devam ederek, çerez politikamızı kabul etmiş olursunuz.
</p>
<div className="flex gap-2 flex-col sm:flex-row sm:justify-end">
<button
onClick={() => {
const banner = document.getElementById('cookie-consent');
if (banner) banner.style.transform = 'translateY(100%)';
localStorage.setItem('cookieConsent', 'accepted');
}}
className="px-4 py-2 rounded-md bg-primary-cta text-card font-medium text-sm hover:opacity-90 transition-opacity min-h-11 min-w-11 flex items-center justify-center"
aria-label="Accept cookies"
>
Kabul Et
</button>
<button
onClick={() => {
const banner = document.getElementById('cookie-consent');
if (banner) banner.style.transform = 'translateY(100%)';
localStorage.setItem('cookieConsent', 'rejected');
}}
className="px-4 py-2 rounded-md border border-accent text-foreground font-medium text-sm hover:bg-background-accent transition-colors min-h-11 min-w-11 flex items-center justify-center"
aria-label="Reject cookies"
>
Reddet
</button>
</div>
</div>
<script
dangerouslySetInnerHTML={{
__html: `
(function() {
const consent = localStorage.getItem('cookieConsent');
if (!consent) {
document.getElementById('cookie-consent').style.transform = 'translateY(0)';
}
})();
`
}}
/>
</div>
);
}