diff --git a/app/products/[slug]/page.tsx b/app/products/[slug]/page.tsx new file mode 100644 index 0000000..df3fe0b --- /dev/null +++ b/app/products/[slug]/page.tsx @@ -0,0 +1,39 @@ +"use client"; + +import { DATA } from "@/lib/demoData"; +import { Features, RightSide, SliderComp } from "@/components/pages/products"; + +export default function SlugPage() { + const statusColor = + DATA[0].status === "full" + ? "text-green-500" + : DATA[0].status === "empty" + ? "text-red-600" + : "text-yellow-800"; + + const statusText = + DATA[0].status === "full" + ? "Sotuvda mavjud" + : DATA[0].status === "empty" + ? "Sotuvda qolmagan" + : "Buyurtma asosida"; + + return ( +
+
+
+ + + +
+ +
+
+ ); +} diff --git a/app/products/page.tsx b/app/products/page.tsx new file mode 100644 index 0000000..4c5e657 --- /dev/null +++ b/app/products/page.tsx @@ -0,0 +1,11 @@ +import { ProductBanner, Products } from "@/components/pages/products"; +import React from "react"; + +export default function Page() { + return ( +
+ + +
+ ); +} diff --git a/components/layout/navbar.tsx b/components/layout/navbar.tsx index 917f0b5..14f4898 100644 --- a/components/layout/navbar.tsx +++ b/components/layout/navbar.tsx @@ -71,7 +71,7 @@ export function Navbar() { Services Blog @@ -80,7 +80,7 @@ export function Navbar() { )} - + Products diff --git a/components/pages/products/index.ts b/components/pages/products/index.ts new file mode 100644 index 0000000..accacc6 --- /dev/null +++ b/components/pages/products/index.ts @@ -0,0 +1,5 @@ +export { ProductBanner } from "./productBanner"; +export { Products } from "./products"; +export { SliderComp } from "./slug/slider"; +export { RightSide } from "./slug/rightSide"; +export { Features } from "./slug/features"; diff --git a/components/pages/products/productBanner.tsx b/components/pages/products/productBanner.tsx new file mode 100644 index 0000000..29607f6 --- /dev/null +++ b/components/pages/products/productBanner.tsx @@ -0,0 +1,43 @@ +import DotAnimatsiya from "@/components/dot/DotAnimatsiya"; + +export function ProductBanner() { + return ( +
+ {/* Background Image */} +
+ + {/* Gradient Overlay - Bottom-left to top-right */} +
+ +
+
+
+ +

+ Ignum technology
At The Ready +

+
+
+ It emphasizes that these firefighters are there not just as public + servants but as a vital part of the community. +
+
+
+
+ ); +} diff --git a/components/pages/products/productCard.tsx b/components/pages/products/productCard.tsx new file mode 100644 index 0000000..730d699 --- /dev/null +++ b/components/pages/products/productCard.tsx @@ -0,0 +1,70 @@ +"use client"; + +import Image from "next/image"; +import Link from "next/link"; +import { ArrowRight } from "lucide-react"; + +interface ProductCardProps { + title: string; + name: string; + image: string; + slug: string; + status: "full" | "empty" | "withOrder"; +} + +export default function ProductCard({ + title, + name, + image, + slug, + status, +}: ProductCardProps) { + const statusColor = + status === "full" + ? "text-green-500" + : status === "empty" + ? "text-red-600" + : "text-yellow-800"; + + const statusText = + status === "full" + ? "Sotuvda mavjud" + : status === "empty" + ? "Sotuvda qolmagan" + : "Buyurtma asosida"; + return ( + +
+ {/* Image Container */} +
+ {title} +
+ + {/* Content Container */} +
+ {/* Title */} +

+ {title} +

+ + {/* Meta Information */} +
+ {name} + {statusText} +
+ + {/* Read More Link */} + + Read More + + +
+
+ + ); +} diff --git a/components/pages/products/products.tsx b/components/pages/products/products.tsx new file mode 100644 index 0000000..d8804e9 --- /dev/null +++ b/components/pages/products/products.tsx @@ -0,0 +1,24 @@ +import ProductCard from "./productCard"; + +export function Products() { + return ( +
+
+
+ {Array(9) + .fill(null) + .map((_, index) => ( + + ))} +
+
+
+ ); +} diff --git a/components/pages/products/slug/features.tsx b/components/pages/products/slug/features.tsx new file mode 100644 index 0000000..de8c8ea --- /dev/null +++ b/components/pages/products/slug/features.tsx @@ -0,0 +1,27 @@ +export function Features({ features }: { features: string[] }) { + return ( + + + + + + + + {features.map((feature, index) => ( + + + + ))} + +
+ Feature +
+ {feature} +
+ ); +} diff --git a/components/pages/products/slug/rightSide.tsx b/components/pages/products/slug/rightSide.tsx new file mode 100644 index 0000000..e2c6616 --- /dev/null +++ b/components/pages/products/slug/rightSide.tsx @@ -0,0 +1,112 @@ + +import { Facebook } from "lucide-react"; + +const socialLinks = [ + { name: "telegram", icon: "✈️", color: "#0088cc" }, + { name: "facebook", icon: , color: "#1877F2" }, + { name: "odnoklassniki", icon: "ok", color: "#ED7100" }, + { name: "vkontakte", icon: "VK", color: "#0077FF" }, + { name: "twitter", icon: "𝕏", color: "#1DA1F2" }, + { name: "whatsapp", icon: "W", color: "#25D366" }, +]; + +interface RightSideProps { + title: string; + name: string; + description: string; + statusText: string; + statusColor: string; +} + +export function RightSide({ + title, + name, + description, + statusColor, + statusText, +}: RightSideProps) { + return ( +
+ {/* Title */} +

+ {title} +

+ + {/* Article ID */} +
+

+ Artikul: + {name} +

+
+ + {/* Status Badge */} +
+ + {statusText} + +
+ + {/* description */} +
+

+ {description} +

+
+ + {/* Price Section */} +
+

+ 17.00$ +

+ + {/* Action Buttons */} +
+ {/* */} + + {/* */} +
+ + {/* Social Share Icons */} +
+
+ {socialLinks.map((social) => ( + + {social.icon} + + ))} +
+
+
+
+ ); +} diff --git a/components/pages/products/slug/slider.tsx b/components/pages/products/slug/slider.tsx new file mode 100644 index 0000000..70579ad --- /dev/null +++ b/components/pages/products/slug/slider.tsx @@ -0,0 +1,59 @@ +import { Swiper, SwiperSlide } from "swiper/react"; +import { Navigation } from "swiper/modules"; +import "swiper/css"; +import "swiper/css/navigation"; +import { DATA } from "@/lib/demoData"; + +// The custom CSS selectors for navigation +const navigationPrevEl = ".custom-swiper-prev"; +const navigationNextEl = ".custom-swiper-next"; + +export function SliderComp({ imgs }: { imgs: string[] }) { + return ( +
+
+ + {imgs.map((image, index) => ( + + {`${DATA[0].title} + + ))} + + {/* Custom buttons */} + + +
+
+ ); +} diff --git a/lib/demoData.ts b/lib/demoData.ts new file mode 100644 index 0000000..b44bcd3 --- /dev/null +++ b/lib/demoData.ts @@ -0,0 +1,30 @@ +export const DATA = [ + { + name: "P-0834405", + title: "Elektr yong'in detektori-Ypres ver.3", + status: "full", + description: `Xavfsizlik va yong'in qo'l detektori barcha turdagi qabul qilish va nazorat qilish moslamalari bilan ishlash uchun mo'ljallangan. + Detektor GOST R 53325-2012 bo'yicha a sinfiga mos keladi va himoya qopqog'ini ochib, qo'zg'aysan elementini - ishning markazidagi tugmachani + bosgandan so'ng signal signalini hosil qiladi.Detektor korpusining kichik qalinligi uni shikastlanishdan himoya qiladi, tashqi ko'rinishini + yaxshilaydi va faqat o'rnatish uchun qo'shimcha variantni ishlatishga imkon beradi. Elektr detektori-IPR ver.3 faqat HP signal kabellarida ishlashni ta'minlaydi. + Detektorning navbatchilik rejimi qizil rangdagi ko'rinishlar bilan ko'rsatiladi, "yong'in" rejimi - qizil indikatorni doimiy ravishda yoqish orqali. + Tugmani bosgandan va mahkamlagandan so'ng uni dastlabki holatiga qulay tarzda qaytarish( asbob bilan, maxsus kalitsiz); etkazib berish to'plamida shaffof himoya + qopqog'ining mavjudligi; tizimga texnik xizmat ko'rsatishni soddalashtirish uchun muhrlash qobiliyati.`, + features: [ + "Signal pallasida besleme zo'riqishida-9 + 28V;", + "Kutish rejimidagi iste'mol oqimi-40 mkA;", + 'Detektor orqali "yong\'in" rejimidagi oqim - 22 ma bilan cheklanishi kerak;', + "Harorat oralig'i: -40°C dan +70°C gacha;", + "Olchamlari-108x100x27 mm;", + "Og'irligi-0,11 kg;", + "Muvaffaqiyatsizlik uchun o'rtacha ish vaqti - 60 000 soat;", + "Detektorning ishlash muddati 10 yil.", + ], + images: [ + "/images/products/products.webp", + "/images/products/products.webp", + "/images/products/products.webp", + "/images/products/products.webp", + ], + }, +]; \ No newline at end of file diff --git a/public/images/products/products.webp b/public/images/products/products.webp new file mode 100644 index 0000000..6f3c0ec Binary files /dev/null and b/public/images/products/products.webp differ