8 Commits

Author SHA1 Message Date
96060aa67b Merge version_3 into main
Merge version_3 into main
2026-06-10 07:43:38 +00:00
6689daf06d Add src/components/LanguageSwitcher.tsx 2026-06-10 07:43:35 +00:00
840a72de76 Update src/app/page.tsx 2026-06-10 07:43:35 +00:00
52adeba4a6 Add src/app/langContext.tsx 2026-06-10 07:43:34 +00:00
d6e0cf06b5 Merge version_2 into main
Merge version_2 into main
2026-06-10 07:38:09 +00:00
769406e459 Update src/app/page.tsx 2026-06-10 07:38:06 +00:00
b4c191f3ac Merge version_1 into main
Merge version_1 into main
2026-06-07 17:30:51 +00:00
02dbfe2fbe Merge version_1 into main
Merge version_1 into main
2026-06-07 17:30:05 +00:00
3 changed files with 125 additions and 32 deletions

57
src/app/langContext.tsx Normal file
View File

@@ -0,0 +1,57 @@
"use client";
import React, { createContext, useContext, useState, useEffect, useCallback } from "react";
type Language = "en" | "ku";
type Direction = "ltr" | "rtl";
interface LangContextType {
lang: Language;
dir: Direction;
setLanguage: (language: Language) => void;
}
const LangContext = createContext<LangContextType | undefined>(undefined);
export function LangProvider({ children }: { children: React.ReactNode }) {
const [lang, setLang] = useState<Language>(() => {
if (typeof window !== "undefined") {
return (localStorage.getItem("lang") as Language) || "en";
}
return "en";
});
const [dir, setDir] = useState<Direction>(() => {
if (typeof window !== "undefined") {
const storedLang = localStorage.getItem("lang");
return storedLang === "ku" ? "rtl" : "ltr";
}
return "ltr";
});
useEffect(() => {
if (typeof document !== "undefined") {
document.documentElement.setAttribute("lang", lang);
document.documentElement.setAttribute("dir", dir);
localStorage.setItem("lang", lang);
}
}, [lang, dir]);
const updateLanguage = useCallback((newLang: Language) => {
setLang(newLang);
setDir(newLang === "ku" ? "rtl" : "ltr");
}, []);
return (
<LangContext.Provider value={{ lang, dir, setLanguage: updateLanguage }}>
{children}
</LangContext.Provider>
);
}
export function useLang() {
const context = useContext(LangContext);
if (context === undefined) {
throw new Error("useLang must be used within a LangProvider");
}
return context;
}

View File

@@ -41,6 +41,9 @@ export default function LandingPage() {
name: "Reviews", id: "#testimonials"},
{
name: "Reservations", id: "#contact"},
{
name: "کوردی", id: "#hero"
}
]}
brandName="Obaw Restaurant"
button={{
@@ -174,18 +177,18 @@ export default function LandingPage() {
useInvertedBackground={false}
testimonials={[
{
id: "1", name: "Faryal Minhas", handle: "@FaryalM", testimonial: "A new restaurant. We had breakfast which was excellent. The view from the restaurant is worth everything, just breathtaking. Would definitely go back and recommend.", imageSrc: "http://img.b2bpic.net/free-photo/couple-having-date-together-luxurious-restaurant_23-2150517423.jpg", imageAlt: "Customer Faryal Minhas"},
id: "1", name: "Faryal Minhas", handle: "@FaryalM", testimonial: "چێشتخانەیەکی نوێ. نانی بەیانیمان خوارد کە نایاب بوو. دیمەنی چێشتخانەکە شایەنی هەموو شتێکە، زۆر سەرنجڕاکێشە. بە دڵنیاییەوە دەگەڕێمەوە و پێشنیاری دەکەم.", imageSrc: "http://img.b2bpic.net/free-photo/couple-having-date-together-luxurious-restaurant_23-2150517423.jpg", imageAlt: "Customer Faryal Minhas"},
{
id: "2", name: "Black Pearl", handle: "@BlackPearl", testimonial: "I went to Obaw Restaurant for breakfast. The view of Rawanduz was amazing, and the place had a great atmosphere. The food was delicious, but it took a while to be served. Still, I enjoyed my time there.", imageSrc: "http://img.b2bpic.net/free-photo/group-young-people-enjoying-dinner-together_23-2148454092.jpg", imageAlt: "Customer Black Pearl"},
id: "2", name: "Black Pearl", handle: "@BlackPearl", testimonial: "بۆ نانی بەیانی چوومە چێشتخانەی ئۆباو. دیمەنی ڕەواندز سەرسوڕهێنەر بوو، و شوێنەکە کەشێکی خۆشی هەبوو. خواردنەکە بەتام بوو، بەڵام کەمێک کاتی ویست تا پێشکەش کرا. هێشتا، کاتێکی خۆشم لەوێ بەسەر برد.", imageSrc: "http://img.b2bpic.net/free-photo/group-young-people-enjoying-dinner-together_23-2148454092.jpg", imageAlt: "Customer Black Pearl"},
{
id: "3", name: "Hoshang Kanabi", handle: "@HoshangK", testimonial: "This restaurant offers an incredible dining experience with a breathtaking view of the Rwanduz Canyon. We visited for breakfast, and it was excellent. The best part? It only cost 12,000 IQD for breakfast for two people—great value for such a wonderful setting!", imageSrc: "http://img.b2bpic.net/free-photo/portrait-smiling-young-professional-male-chef-with-his-prepared-dish_23-2147863802.jpg", imageAlt: "Customer Hoshang Kanabi"},
id: "3", name: "Hoshang Kanabi", handle: "@HoshangK", testimonial: "ئەم چێشتخانەیە ئەزموونێکی نایابی نانخواردن پێشکەش دەکات لەگەڵ دیمەنێکی سەرنجڕاکێشی کانی ڕەواندز. ئێمە بۆ نانی بەیانی سەردانمان کرد، و نایاب بوو. باشترین بەش؟ تەنها 12,000 دیناری عێراقی تێچوو بۆ نانی بەیانی دوو کەس نرخێکی زۆر باشە بۆ شوێنێکی بەم شێوەیە جوان!", imageSrc: "http://img.b2bpic.net/free-photo/portrait-smiling-young-professional-male-chef-with-his-prepared-dish_23-2147863802.jpg", imageAlt: "Customer Hoshang Kanabi"},
{
id: "4", name: "Sarah J.", handle: "@SarahJ", testimonial: "The ambiance at Obaw Restaurant is simply enchanting. Every dish was a masterpiece, beautifully presented and bursting with flavor. A truly memorable dining experience!", imageSrc: "http://img.b2bpic.net/free-photo/couple-with-delicious-drinks-high-angle_23-2150124832.jpg", imageAlt: "Customer Sarah J."},
id: "4", name: "Sarah J.", handle: "@SarahJ", testimonial: "کەشوهەوای چێشتخانەی ئۆباو سادە و دڵڕفێنە. هەر خواردنێک شاکارێک بوو، بە جوانی پێشکەش کرابوو و پڕ بوو لە تام. ئەزموونێکی نانخواردنی بەڕاستی لەبیرنەکراو!", imageSrc: "http://img.b2bpic.net/free-photo/couple-with-delicious-drinks-high-angle_23-2150124832.jpg", imageAlt: "Customer Sarah J."},
{
id: "5", name: "Ahmad R.", handle: "@AhmadR", testimonial: "From the moment we arrived, the service was impeccable. The staff were attentive and knowledgeable, and the traditional Kurdish dishes were exquisite. Highly recommended!", imageSrc: "http://img.b2bpic.net/free-photo/cook-with-pasta-dish_1154-135.jpg", imageAlt: "Customer Ahmad R."},
id: "5", name: "Ahmad R.", handle: "@AhmadR", testimonial: "لە یەکەم ساتەوە کە گەیشتین، خزمەتگوزاری بێ کەموکوڕی بوو. ستافەکە سەرنجڕاکێش و زانیاریان هەبوو، و خواردنە کوردییە نەریتییەکان نایاب بوون. زۆر پێشنیار دەکرێت!", imageSrc: "http://img.b2bpic.net/free-photo/cook-with-pasta-dish_1154-135.jpg", imageAlt: "Customer Ahmad R."},
]}
title="What Our Cherished Guests Say"
description="Hear directly from those who have experienced the magic of Obaw Restaurant. Their words are a testament to our dedication to culinary excellence and warm service."
title="گوتمانی میوانە خۆشەویستەکانمان"
description="ڕاستەوخۆ لەو کەسانەوە ببیستە کە ئەزموونی جادووی چێشتخانەی ئۆباویان کردووە. قسەکانیان بەڵگەیە لەسەر پابەندبوونمان بە باشترین چێشتلێنان و خزمەتگوزاری گەرم."
speed={60}
topMarqueeDirection="right"
/>
@@ -194,37 +197,37 @@ export default function LandingPage() {
<div id="contact" data-section="contact">
<ContactSplitForm
useInvertedBackground={true}
title="Plan Your Visit & Reservations"
description="We are open 24 hours to serve you an exceptional dining experience. Whether for a special occasion or a casual meal, we look forward to welcoming you to Obaw Restaurant.\n\nAddress: JG7H+96J, ھەولێر, Erbil Governorate\nPhone: 0750 497 1391\nEmail: info@obawrestaurant.com"
title="پلاندانان بۆ سەردان و گرتنی مێز"
description="ئێمە 24 کاتژمێر کراوەین بۆ پێشکەشکردنی ئەزموونێکی نایابی نانخواردن. جا بۆ بۆنەیەکی تایبەت بێت یان ژەمێکی ئاسایی، بە پەرۆشین بۆ پێشوازیکردن لێتان لە چێشتخانەی ئۆباو.\n\nناونیشان: JG7H+96J, ھەولێر, پارێزگای ھەولێر\nتەلەفۆن: 0750 497 1391\nئیمەیڵ: info@obawrestaurant.com"
inputs={[
{
name: "name", type: "text", placeholder: "Your Full Name", required: true,
name: "name", type: "text", placeholder: "ناوى تەواو", required: true,
},
{
name: "email", type: "email", placeholder: "Your Email Address", required: true,
name: "email", type: "email", placeholder: "ناونیشانی ئیمەیڵ", required: true,
},
{
name: "phone", type: "tel", placeholder: "Phone Number", required: false,
name: "phone", type: "tel", placeholder: "ژمارەی تەلەفۆن", required: false,
},
{
name: "date", type: "date", placeholder: "Date", required: true,
name: "date", type: "date", placeholder: "بەروار", required: true,
},
{
name: "time", type: "time", placeholder: "Time", required: true,
name: "time", type: "time", placeholder: "کات", required: true,
},
{
name: "partySize", type: "number", placeholder: "Party Size (e.g., 4)", required: true,
name: "partySize", type: "number", placeholder: "ژمارەی کەسەکان (بۆ نموونە، 4)", required: true,
},
]}
textarea={{
name: "message", placeholder: "Special requests or message...", rows: 4,
name: "message", placeholder: "داواکاری تایبەت یان پەیام...", rows: 4,
required: false,
}}
imageSrc="http://img.b2bpic.net/free-photo/maps-loupe-black-desk_23-2148193385.jpg"
imageAlt="Map showing Obaw Restaurant location in Erbil"
mediaAnimation="opacity"
mediaPosition="left"
buttonText="Confirm Reservation"
buttonText="دووپاتکردنەوەی گرتنی مێز"
/>
</div>
@@ -233,42 +236,42 @@ export default function LandingPage() {
logoText="Obaw Restaurant"
columns={[
{
title: "Quick Links", items: [
title: "بەستەری خێرا", items: [
{
label: "Home", href: "#hero"},
label: "ماڵەوە", href: "#hero"},
{
label: "About Us", href: "#about"},
label: "دەربارەی ئێمە", href: "#about"},
{
label: "Menu", href: "#menu"},
label: "لیستەی خواردن", href: "#menu"},
{
label: "Gallery", href: "#gallery"},
label: "پێشانگا", href: "#gallery"},
],
},
{
title: "Support", items: [
title: "پشتگیری", items: [
{
label: "Reservations", href: "#contact"},
label: "گرتنی مێز", href: "#contact"},
{
label: "Contact Us", href: "#contact"},
label: "پەیوەندی بە ئێمەوە بکە", href: "#contact"},
{
label: "FAQ", href: "#"},
label: "پرسیارە باوەکان", href: "#"},
],
},
{
title: "Follow Us", items: [
title: "دوامان بکەوە", items: [
{
label: "Instagram", href: "https://instagram.com/obawrestaurant"},
label: "ئینستاگرام", href: "https://instagram.com/obawrestaurant"},
{
label: "Facebook", href: "https://facebook.com/obawrestaurant"},
label: "فەیسبووک", href: "https://facebook.com/obawrestaurant"},
{
label: "Twitter", href: "https://twitter.com/obawrestaurant"},
label: "تویتەر", href: "https://twitter.com/obawrestaurant"},
],
},
]}
copyrightText="© 2024 Obaw Restaurant. All rights reserved."
copyrightText="© 2024 چێشتخانەی ئۆباو. هەموو مافەکانی پارێزراون."
/>
</div>
</ReactLenis>
</ThemeProvider>
);
}
}

View File

@@ -0,0 +1,33 @@
"use client";
import React from "react";
import { useLang } from "@/app/langContext";
const LanguageSwitcher: React.FC = () => {
const { lang, setLanguage } = useLang();
return (
<div className="flex space-x-2 p-2">
<button
onClick={() => setLanguage("en")}
className={`px-3 py-1 rounded-md text-sm transition-colors duration-200 ${
lang === "en"
? "bg-primary-cta text-primary-cta-foreground" : "bg-transparent text-foreground hover:bg-muted"}
`}
>
English
</button>
<button
onClick={() => setLanguage("ku")}
className={`px-3 py-1 rounded-md text-sm transition-colors duration-200 ${
lang === "ku"
? "bg-primary-cta text-primary-cta-foreground" : "bg-transparent text-foreground hover:bg-muted"}
`}
>
کوردی
</button>
</div>
);
};
export default LanguageSwitcher;