Merge version_3 into main #2
143
src/app/page.tsx
143
src/app/page.tsx
@@ -2,6 +2,7 @@
|
||||
|
||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||
import ReactLenis from "lenis/react";
|
||||
import { useState } from "react";
|
||||
import ContactCenter from '@/components/sections/contact/ContactCenter';
|
||||
import FeatureCardTwentyOne from '@/components/sections/feature/FeatureCardTwentyOne';
|
||||
import FooterLogoReveal from '@/components/sections/footer/FooterLogoReveal';
|
||||
@@ -13,6 +14,10 @@ import ProductCardFour from '@/components/sections/product/ProductCardFour';
|
||||
import TestimonialCardOne from '@/components/sections/testimonial/TestimonialCardOne';
|
||||
|
||||
export default function LandingPage() {
|
||||
// Simulated Auth Context: In a real app, this would come from a Context/Hook
|
||||
const [user] = useState({ role: 'admin' }); // Change to 'user' to test restricted view
|
||||
const isAdmin = user?.role === 'admin' || user?.role === 'manager';
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="shift-hover"
|
||||
@@ -50,20 +55,15 @@ export default function LandingPage() {
|
||||
buttons={[
|
||||
{
|
||||
text: "تسوق الآن", href: "#products"},
|
||||
...(isAdmin ? [{ text: "لوحة الإدارة", href: "#admin" }] : [])
|
||||
]}
|
||||
slides={[
|
||||
{
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/friends-sitting-christmas-gifts-womans-holding-big-boxes-guy-little-one_176420-7393.jpg", imageAlt: "Luxury Gifts"},
|
||||
{
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/scratched-metal-dark-carbon-fiber-background_1048-5869.jpg", imageAlt: "Automotive"},
|
||||
{
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/spring-marketing-sales_23-2151949778.jpg", imageAlt: "Cosmetics"},
|
||||
{
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/present-with-tag-fern-plant_23-2148370084.jpg", imageAlt: "Stationery"},
|
||||
{
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/brunette-woman-bags-season-black_1157-3443.jpg", imageAlt: "Fashion"},
|
||||
{
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/3d-rendering-loft-luxury-living-room-with-bookshelf-with-pouf_105762-2177.jpg", imageAlt: "Furniture"},
|
||||
{ imageSrc: "http://img.b2bpic.net/free-photo/friends-sitting-christmas-gifts-womans-holding-big-boxes-guy-little-one_176420-7393.jpg", imageAlt: "Luxury Gifts" },
|
||||
{ imageSrc: "http://img.b2bpic.net/free-photo/scratched-metal-dark-carbon-fiber-background_1048-5869.jpg", imageAlt: "Automotive" },
|
||||
{ imageSrc: "http://img.b2bpic.net/free-photo/spring-marketing-sales_23-2151949778.jpg", imageAlt: "Cosmetics" },
|
||||
{ imageSrc: "http://img.b2bpic.net/free-photo/present-with-tag-fern-plant_23-2148370084.jpg", imageAlt: "Stationery" },
|
||||
{ imageSrc: "http://img.b2bpic.net/free-photo/brunette-woman-bags-season-black_1157-3443.jpg", imageAlt: "Fashion" },
|
||||
{ imageSrc: "http://img.b2bpic.net/free-photo/3d-rendering-loft-luxury-living-room-with-bookshelf-with-pouf_105762-2177.jpg", imageAlt: "Furniture" },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
@@ -74,14 +74,10 @@ export default function LandingPage() {
|
||||
title="أقسام المتجر"
|
||||
description="تصفح عبر أكثر من ٢٥ قسماً متنوعاً تلبي كافة احتياجاتك اليومية والترفيهية."
|
||||
accordionItems={[
|
||||
{
|
||||
id: "cat1", title: "الإلكترونيات", content: "هواتف، حواسيب، وأجهزة ذكية."},
|
||||
{
|
||||
id: "cat2", title: "مستلزمات السيارات", content: "قطع غيار، إكسسوارات، وزينة سيارات."},
|
||||
{
|
||||
id: "cat3", title: "الأزياء والعطور", content: "أحدث صيحات الموضة والعطور الفاخرة."},
|
||||
{
|
||||
id: "cat4", title: "أثاث ومستلزمات منزلية", content: "أثاث عصري ومعدات منزلية متطورة."},
|
||||
{ id: "cat1", title: "الإلكترونيات", content: "هواتف، حواسيب، وأجهزة ذكية." },
|
||||
{ id: "cat2", title: "مستلزمات السيارات", content: "قطع غيار، إكسسوارات، وزينة سيارات." },
|
||||
{ id: "cat3", title: "الأزياء والعطور", content: "أحدث صيحات الموضة والعطور الفاخرة." },
|
||||
{ id: "cat4", title: "أثاث ومستلزمات منزلية", content: "أثاث عصري ومعدات منزلية متطورة." },
|
||||
]}
|
||||
imageSrc="http://img.b2bpic.net/free-photo/desk-gadgets_181624-23300.jpg"
|
||||
mediaAnimation="slide-up"
|
||||
@@ -95,18 +91,12 @@ export default function LandingPage() {
|
||||
gridVariant="four-items-2x2-equal-grid"
|
||||
useInvertedBackground={false}
|
||||
products={[
|
||||
{
|
||||
id: "p1", name: "سماعات احترافية", price: "١٥٠ ريال", variant: "إلكترونيات", imageSrc: "http://img.b2bpic.net/free-photo/volume-control-knob-hi-fi-amplifier_1232-3570.jpg"},
|
||||
{
|
||||
id: "p2", name: "هاتف ذكي", price: "٣٠٠٠ ريال", variant: "جوالات", imageSrc: "http://img.b2bpic.net/free-photo/new-cell-phone-white-background_58702-5163.jpg"},
|
||||
{
|
||||
id: "p3", name: "محفظة جلدية", price: "٢٥٠ ريال", variant: "إكسسوارات", imageSrc: "http://img.b2bpic.net/free-photo/fathers-day-composition-with-present-box_23-2147790827.jpg"},
|
||||
{
|
||||
id: "p4", name: "مجموعة عناية", price: "٤٠٠ ريال", variant: "تجميل", imageSrc: "http://img.b2bpic.net/free-photo/foundation-bottles-stands_23-2149511226.jpg"},
|
||||
{
|
||||
id: "p5", name: "ساعة ذكية", price: "٨٠٠ ريال", variant: "إلكترونيات", imageSrc: "http://img.b2bpic.net/free-photo/still-life-tech-device_23-2150722612.jpg"},
|
||||
{
|
||||
id: "p6", name: "باقة زهور", price: "٢٠٠ ريال", variant: "هدايا", imageSrc: "http://img.b2bpic.net/free-photo/three-hands-holding-black-basket-pink-roses-wall_114579-1504.jpg"},
|
||||
{ id: "p1", name: "سماعات احترافية", price: "١٥٠ ريال", variant: "إلكترونيات", imageSrc: "http://img.b2bpic.net/free-photo/volume-control-knob-hi-fi-amplifier_1232-3570.jpg" },
|
||||
{ id: "p2", name: "هاتف ذكي", price: "٣٠٠٠ ريال", variant: "جوالات", imageSrc: "http://img.b2bpic.net/free-photo/new-cell-phone-white-background_58702-5163.jpg" },
|
||||
{ id: "p3", name: "محفظة جلدية", price: "٢٥٠ ريال", variant: "إكسسوارات", imageSrc: "http://img.b2bpic.net/free-photo/fathers-day-composition-with-present-box_23-2147790827.jpg" },
|
||||
{ id: "p4", name: "مجموعة عناية", price: "٤٠٠ ريال", variant: "تجميل", imageSrc: "http://img.b2bpic.net/free-photo/foundation-bottles-stands_23-2149511226.jpg" },
|
||||
{ id: "p5", name: "ساعة ذكية", price: "٨٠٠ ريال", variant: "إلكترونيات", imageSrc: "http://img.b2bpic.net/free-photo/still-life-tech-device_23-2150722612.jpg" },
|
||||
{ id: "p6", name: "باقة زهور", price: "٢٠٠ ريال", variant: "هدايا", imageSrc: "http://img.b2bpic.net/free-photo/three-hands-holding-black-basket-pink-roses-wall_114579-1504.jpg" },
|
||||
]}
|
||||
title="منتجات مميزة"
|
||||
description="أحدث المنتجات التي تم اختيارها خصيصاً لذوقك الرفيع."
|
||||
@@ -119,54 +109,32 @@ export default function LandingPage() {
|
||||
textboxLayout="default"
|
||||
useInvertedBackground={false}
|
||||
plans={[
|
||||
{
|
||||
id: "offer1", badge: "توفير", price: "٥٠٪", subtitle: "تخفيض على قسم الإلكترونيات", buttons: [
|
||||
{
|
||||
text: "تسوق العرض"},
|
||||
],
|
||||
features: [
|
||||
"شحن مجاني", "ضمان سنتين"],
|
||||
},
|
||||
{
|
||||
id: "offer2", badge: "توفير", price: "٣٠٪", subtitle: "تخفيض على الأزياء", buttons: [
|
||||
{
|
||||
text: "تسوق العرض"},
|
||||
],
|
||||
features: [
|
||||
"استبدال سريع", "جودة عالية"],
|
||||
},
|
||||
{
|
||||
id: "offer3", badge: "توفير", price: "٢٠٪", subtitle: "تخفيض على مستلزمات المنزل", buttons: [
|
||||
{
|
||||
text: "تسوق العرض"},
|
||||
],
|
||||
features: [
|
||||
"خدمة عملاء ٢٤/٧", "توصيل سريع"],
|
||||
},
|
||||
{ id: "offer1", badge: "توفير", price: "٥٠٪", subtitle: "تخفيض على قسم الإلكترونيات", buttons: [{ text: "تسوق العرض" }], features: ["شحن مجاني", "ضمان سنتين"] },
|
||||
{ id: "offer2", badge: "توفير", price: "٣٠٪", subtitle: "تخفيض على الأزياء", buttons: [{ text: "تسوق العرض" }], features: ["استبدال سريع", "جودة عالية"] },
|
||||
{ id: "offer3", badge: "توفير", price: "٢٠٪", subtitle: "تخفيض على مستلزمات المنزل", buttons: [{ text: "تسوق العرض" }], features: ["خدمة عملاء ٢٤/٧", "توصيل سريع"] },
|
||||
]}
|
||||
title="عروض حصرية"
|
||||
description="خصومات كبرى لفترة محدودة على منتجات مختارة."
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div id="metrics" data-section="metrics">
|
||||
{isAdmin && (
|
||||
<div id="metrics" data-section="metrics">
|
||||
<MetricCardTwo
|
||||
animationType="slide-up"
|
||||
textboxLayout="default"
|
||||
gridVariant="uniform-all-items-equal"
|
||||
useInvertedBackground={false}
|
||||
metrics={[
|
||||
{
|
||||
id: "m1", value: "٥٠٠٠+", description: "عميل سعيد"},
|
||||
{
|
||||
id: "m2", value: "٢٥+", description: "قسم تسوق"},
|
||||
{
|
||||
id: "m3", value: "١٠٠٪", description: "ضمان الجودة"},
|
||||
]}
|
||||
title="أرقامنا"
|
||||
description="نحن نفخر بخدمة الآلاف من العملاء حول العالم."
|
||||
/>
|
||||
</div>
|
||||
animationType="slide-up"
|
||||
textboxLayout="default"
|
||||
gridVariant="uniform-all-items-equal"
|
||||
useInvertedBackground={false}
|
||||
metrics={[
|
||||
{ id: "m1", value: "٥٠٠٠+", description: "عميل سعيد" },
|
||||
{ id: "m2", value: "٢٥+", description: "قسم تسوق" },
|
||||
{ id: "m3", value: "١٠٠٪", description: "ضمان الجودة" },
|
||||
]}
|
||||
title="لوحة تحكم الإدارة"
|
||||
description="عرض إحصائيات النظام والتحكم في المحتوى."
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div id="testimonials" data-section="testimonials">
|
||||
<TestimonialCardOne
|
||||
@@ -175,21 +143,11 @@ export default function LandingPage() {
|
||||
gridVariant="uniform-all-items-equal"
|
||||
useInvertedBackground={false}
|
||||
testimonials={[
|
||||
{
|
||||
id: "t1", name: "سارة أحمد", role: "مصممة", company: "الرياض", rating: 5,
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/beautiful-young-female-with-hair-bun-having-joyful-look-smiling-cheerfully-happy-with-some-positive-news_273609-9042.jpg"},
|
||||
{
|
||||
id: "t2", name: "محمد خالد", role: "مهندس", company: "جدة", rating: 5,
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/portrait-woman-smiling-kitchen_107420-12357.jpg"},
|
||||
{
|
||||
id: "t3", name: "نورة علي", role: "مديرة", company: "دبي", rating: 5,
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/studio-portrait-serious-bearded-male-dressed-suit_613910-14795.jpg"},
|
||||
{
|
||||
id: "t4", name: "عمر سعد", role: "مطور", company: "القاهرة", rating: 5,
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/selfie-portrait-cute-brunette-girl-with-short-hair-sitting-table-gray-plaid-terrace-restaurant-she-wears-blue-shirt-looks-happy_197531-971.jpg"},
|
||||
{
|
||||
id: "t5", name: "ليلى حسن", role: "محامية", company: "الدمام", rating: 5,
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/portrait-handsome-bearded-stylish-male-wearing-elegant-suit-dark-background_613910-11359.jpg"},
|
||||
{ id: "t1", name: "سارة أحمد", role: "مصممة", company: "الرياض", rating: 5, imageSrc: "http://img.b2bpic.net/free-photo/beautiful-young-female-with-hair-bun-having-joyful-look-smiling-cheerfully-happy-with-some-positive-news_273609-9042.jpg" },
|
||||
{ id: "t2", name: "محمد خالد", role: "مهندس", company: "جدة", rating: 5, imageSrc: "http://img.b2bpic.net/free-photo/portrait-woman-smiling-kitchen_107420-12357.jpg" },
|
||||
{ id: "t3", name: "نورة علي", role: "مديرة", company: "دبي", rating: 5, imageSrc: "http://img.b2bpic.net/free-photo/studio-portrait-serious-bearded-male-dressed-suit_613910-14795.jpg" },
|
||||
{ id: "t4", name: "عمر سعد", role: "مطور", company: "القاهرة", rating: 5, imageSrc: "http://img.b2bpic.net/free-photo/selfie-portrait-cute-brunette-girl-with-short-hair-sitting-table-gray-plaid-terrace-restaurant-she-wears-blue-shirt-looks-happy_197531-971.jpg" },
|
||||
{ id: "t5", name: "ليلى حسن", role: "محامية", company: "الدمام", rating: 5, imageSrc: "http://img.b2bpic.net/free-photo/portrait-handsome-bearded-stylish-male-wearing-elegant-suit-dark-background_613910-11359.jpg" },
|
||||
]}
|
||||
title="آراء عملائنا"
|
||||
description="ماذا يقول عملاؤنا عن تجربة التسوق في Sama Store؟"
|
||||
@@ -199,8 +157,7 @@ export default function LandingPage() {
|
||||
<div id="contact" data-section="contact">
|
||||
<ContactCenter
|
||||
useInvertedBackground={false}
|
||||
background={{
|
||||
variant: "sparkles-gradient"}}
|
||||
background={{ variant: "sparkles-gradient" }}
|
||||
tag="حساب الدعم"
|
||||
title="تواصل مع فريق الدعم"
|
||||
description="نحن هنا لمساعدتك على مدار الساعة في أي استفسار."
|
||||
@@ -210,10 +167,8 @@ export default function LandingPage() {
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterLogoReveal
|
||||
logoText="Sama Store"
|
||||
leftLink={{
|
||||
text: "سياسة الخصوصية", href: "#"}}
|
||||
rightLink={{
|
||||
text: "الشروط والأحكام", href: "#"}}
|
||||
leftLink={{ text: "سياسة الخصوصية", href: "#" }}
|
||||
rightLink={{ text: "الشروط والأحكام", href: "#" }}
|
||||
/>
|
||||
</div>
|
||||
</ReactLenis>
|
||||
|
||||
Reference in New Issue
Block a user