first commit
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
import { setRequestLocale } from "next-intl/server";
|
||||
import Image from "next/image";
|
||||
import { mockData } from "@/lib/mock-data";
|
||||
|
||||
export default async function GaleriPage({ params }: { params: Promise<{ locale: string }> }) {
|
||||
const { locale } = await params;
|
||||
setRequestLocale(locale);
|
||||
|
||||
// Combine hero slides and accommodation images for a rich gallery
|
||||
const allImages = [
|
||||
...mockData.heroSlides.map((url, i) => ({ id: `slide-${i}`, url, title: "Kordon Apart" })),
|
||||
...mockData.accommodations.map(r => ({ id: r.id, url: r.image, title: r.name }))
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="pt-32 min-h-screen max-w-7xl mx-auto px-4 md:px-12 pb-24">
|
||||
<div className="mb-16 text-center max-w-2xl mx-auto">
|
||||
<h1 className="font-heading text-4xl md:text-5xl font-bold text-primary dark:text-primary-fixed-dim mb-4">Galeri</h1>
|
||||
<p className="font-body-md text-on-surface-variant dark:text-outline text-lg">
|
||||
Kordon Apart'ın eşsiz atmosferini, mimarisini ve Fethiye'nin güzelliklerini keşfedin.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-6">
|
||||
{allImages.map((img) => (
|
||||
<div key={img.id} className="relative aspect-square w-full rounded-xl overflow-hidden group cursor-pointer shadow-md hover:shadow-xl transition-shadow duration-300">
|
||||
<Image
|
||||
src={img.url}
|
||||
alt={img.title}
|
||||
fill
|
||||
className="object-cover transition-transform duration-500 group-hover:scale-110"
|
||||
sizes="(max-width: 640px) 100vw, (max-width: 768px) 50vw, 33vw"
|
||||
/>
|
||||
<div className="absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300" />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { setRequestLocale, getTranslations } from 'next-intl/server';
|
||||
import { ContactContent } from '@/components/contact-content';
|
||||
|
||||
export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }) {
|
||||
const { locale } = await params;
|
||||
const t = await getTranslations({ locale, namespace: 'nav' });
|
||||
return {
|
||||
title: `${t('contact')} - Kordon Apart`,
|
||||
};
|
||||
}
|
||||
|
||||
export default async function ContactPage({ params }: { params: Promise<{ locale: string }> }) {
|
||||
const { locale } = await params;
|
||||
setRequestLocale(locale);
|
||||
|
||||
return <ContactContent />;
|
||||
}
|
||||
+29
-12
@@ -1,24 +1,28 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import { Inter, Montserrat } from "next/font/google";
|
||||
import { NextIntlClientProvider } from 'next-intl';
|
||||
import { getMessages, setRequestLocale } from 'next-intl/server';
|
||||
import { notFound } from 'next/navigation';
|
||||
import { routing } from '@/i18n/routing';
|
||||
import { Navbar } from '@/components/navbar';
|
||||
import { Footer } from '@/components/footer';
|
||||
import { ThemeProvider } from "@/components/theme-provider";
|
||||
import { Toaster } from "sonner";
|
||||
import "../globals.css";
|
||||
|
||||
const geistSans = Geist({
|
||||
variable: "--font-geist-sans",
|
||||
const inter = Inter({
|
||||
variable: "--font-inter",
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
const geistMono = Geist_Mono({
|
||||
variable: "--font-geist-mono",
|
||||
const montserrat = Montserrat({
|
||||
variable: "--font-montserrat",
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Boilerplate App",
|
||||
description: "Next.js boilerplate with next-intl and NextAuth",
|
||||
title: "Kordon Apart - Fethiye",
|
||||
description: "Kordon Apart Fethiye / Merkez - Delüks ve Premium Apart Odalar",
|
||||
};
|
||||
|
||||
export function generateStaticParams() {
|
||||
@@ -44,12 +48,25 @@ export default async function RootLayout({
|
||||
return (
|
||||
<html
|
||||
lang={locale}
|
||||
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
|
||||
className={`${inter.variable} ${montserrat.variable} h-full antialiased`}
|
||||
suppressHydrationWarning
|
||||
>
|
||||
<body className="min-h-full flex flex-col" suppressHydrationWarning>
|
||||
<NextIntlClientProvider messages={messages}>
|
||||
{children}
|
||||
</NextIntlClientProvider>
|
||||
<body className="min-h-full flex flex-col bg-surface dark:bg-inverse-surface text-on-surface dark:text-inverse-on-surface transition-colors duration-300" suppressHydrationWarning>
|
||||
<ThemeProvider
|
||||
attribute="class"
|
||||
defaultTheme="system"
|
||||
enableSystem
|
||||
disableTransitionOnChange={false}
|
||||
>
|
||||
<NextIntlClientProvider messages={messages}>
|
||||
<Navbar />
|
||||
<main className="flex-1">
|
||||
{children}
|
||||
</main>
|
||||
<Footer />
|
||||
<Toaster position="bottom-right" richColors theme="system" />
|
||||
</NextIntlClientProvider>
|
||||
</ThemeProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
import { notFound } from "next/navigation";
|
||||
import Image from "next/image";
|
||||
import { setRequestLocale } from "next-intl/server";
|
||||
import { mockData } from "@/lib/mock-data";
|
||||
|
||||
export default async function RoomDetailPage({
|
||||
params
|
||||
}: {
|
||||
params: Promise<{ locale: string; slug: string }>
|
||||
}) {
|
||||
const { locale, slug } = await params;
|
||||
setRequestLocale(locale);
|
||||
|
||||
const room = mockData.accommodations.find(r => r.slug === slug);
|
||||
if (!room) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="pt-32 min-h-screen max-w-7xl mx-auto px-4 md:px-12 pb-24">
|
||||
<div className="relative w-full h-[500px] rounded-xl overflow-hidden mb-12">
|
||||
<Image
|
||||
src={room.image}
|
||||
alt={room.name}
|
||||
fill
|
||||
className="object-cover"
|
||||
priority
|
||||
/>
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-[#002045]/80 to-transparent" />
|
||||
<div className="absolute bottom-0 left-0 p-12 text-white">
|
||||
<span className="bg-[#CA8A04] text-white px-3 py-1 rounded-full font-label-sm text-[12px] uppercase font-bold tracking-wider mb-4 inline-block">
|
||||
{room.type}
|
||||
</span>
|
||||
<h1 className="font-heading text-5xl md:text-6xl font-bold mb-4">{room.name}</h1>
|
||||
<p className="font-body-lg text-xl text-white/90">
|
||||
{room.location} • {room.bedrooms} Yatak Odası • {room.capacity} Kişi
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="max-w-3xl">
|
||||
<h2 className="font-heading text-3xl text-primary dark:text-primary-fixed-dim font-bold mb-6">Oda Detayları</h2>
|
||||
<p className="font-body-md text-lg text-on-surface-variant dark:text-outline leading-relaxed mb-8">
|
||||
Bu oda, konforunuz için özenle tasarlanmış benzersiz bir yaşam alanı sunar.
|
||||
{room.name}, muhteşem Fethiye manzarasıyla birleşen lüks dokunuşlarla unutulmaz bir konaklama deneyimi vadediyor.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { useTranslations } from "next-intl";
|
||||
import { setRequestLocale } from "next-intl/server";
|
||||
import { RoomList } from "@/components/home/room-list";
|
||||
|
||||
export default async function OdalarPage({ params }: { params: Promise<{ locale: string }> }) {
|
||||
const { locale } = await params;
|
||||
setRequestLocale(locale);
|
||||
|
||||
return (
|
||||
<div className="pt-24 min-h-screen">
|
||||
<RoomList />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+14
-43
@@ -1,48 +1,19 @@
|
||||
import { getTranslations, setRequestLocale } from 'next-intl/server'
|
||||
import Link from 'next/link'
|
||||
import { setRequestLocale } from 'next-intl/server';
|
||||
import { Hero } from '@/components/home/hero';
|
||||
import { RoomList } from '@/components/home/room-list';
|
||||
import { Services } from '@/components/home/services';
|
||||
import { Newsletter } from '@/components/home/newsletter';
|
||||
|
||||
export default async function HomePage({ params }: { params: Promise<{ locale: string }> }) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
|
||||
const t = await getTranslations('hero')
|
||||
const nav = await getTranslations('nav')
|
||||
const footer = await getTranslations('footer')
|
||||
const { locale } = await params;
|
||||
setRequestLocale(locale);
|
||||
|
||||
return (
|
||||
<div className="flex-1 flex flex-col min-h-screen">
|
||||
<header className="px-6 py-4 border-b flex items-center justify-between">
|
||||
<div className="font-bold text-xl">Boilerplate</div>
|
||||
<nav className="space-x-4">
|
||||
<Link href="/" className="text-gray-600 hover:text-gray-900">{nav('home')}</Link>
|
||||
<Link href="/about" className="text-gray-600 hover:text-gray-900">{nav('about')}</Link>
|
||||
<Link href="/contact" className="text-gray-600 hover:text-gray-900">{nav('contact')}</Link>
|
||||
<Link href="/login" className="px-4 py-2 bg-blue-600 text-white rounded-md text-sm">Login</Link>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main className="flex-1 flex flex-col items-center justify-center text-center px-4">
|
||||
<h1 className="text-5xl font-extrabold tracking-tight text-gray-900 sm:text-7xl mb-6">
|
||||
{t('title')}
|
||||
</h1>
|
||||
<p className="mt-4 text-xl text-gray-500 max-w-2xl mx-auto mb-8">
|
||||
This is a dummy landing page to demonstrate the localization setup using next-intl.
|
||||
</p>
|
||||
<div className="flex space-x-4">
|
||||
<button className="px-8 py-3 bg-blue-600 text-white rounded-full font-medium hover:bg-blue-700 transition">
|
||||
{t('cta')}
|
||||
</button>
|
||||
|
||||
<div className="flex bg-gray-100 rounded-full p-1">
|
||||
<Link href="/tr" className={`px-4 py-2 rounded-full text-sm font-medium ${locale === 'tr' ? 'bg-white shadow-sm' : 'text-gray-500 hover:text-gray-900'}`}>TR</Link>
|
||||
<Link href="/en" className={`px-4 py-2 rounded-full text-sm font-medium ${locale === 'en' ? 'bg-white shadow-sm' : 'text-gray-500 hover:text-gray-900'}`}>EN</Link>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer className="py-6 border-t text-center text-gray-500 text-sm">
|
||||
<p>{footer('rights')} <a href="https://ayris.tech" className="hover:text-blue-600 transition">Created by ayris.tech</a></p>
|
||||
</footer>
|
||||
</div>
|
||||
)
|
||||
<>
|
||||
<Hero />
|
||||
<RoomList />
|
||||
<Services />
|
||||
<Newsletter />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user