From 8eb434643cd4e1108072f5593ad9734d2f7a5f80 Mon Sep 17 00:00:00 2001 From: "nabijonovdavronbek619@gmail.com" Date: Tue, 17 Feb 2026 20:32:07 +0500 Subject: [PATCH] hero section banner change to slider --- app/[locale]/services/detail/loading.tsx | 5 + app/[locale]/services/detail/page.tsx | 24 ---- app/[locale]/services/loading.tsx | 5 + components/pages/about/whyChooseUs.tsx | 11 +- components/pages/home/banner.tsx | 107 ---------------- components/pages/home/banner/banner.tsx | 33 +++++ components/pages/home/banner/slider.tsx | 150 +++++++++++++++++++++++ components/pages/home/index.ts | 2 +- 8 files changed, 202 insertions(+), 135 deletions(-) create mode 100644 app/[locale]/services/detail/loading.tsx create mode 100644 app/[locale]/services/loading.tsx delete mode 100644 components/pages/home/banner.tsx create mode 100644 components/pages/home/banner/banner.tsx create mode 100644 components/pages/home/banner/slider.tsx diff --git a/app/[locale]/services/detail/loading.tsx b/app/[locale]/services/detail/loading.tsx new file mode 100644 index 0000000..f7b4b86 --- /dev/null +++ b/app/[locale]/services/detail/loading.tsx @@ -0,0 +1,5 @@ +import { InitialLoading } from "@/components/initialLoading/initialLoading"; + +export default function Loading() { + return ; +} diff --git a/app/[locale]/services/detail/page.tsx b/app/[locale]/services/detail/page.tsx index ed3415c..b71195a 100644 --- a/app/[locale]/services/detail/page.tsx +++ b/app/[locale]/services/detail/page.tsx @@ -2,10 +2,8 @@ import Image from "next/image"; import { motion } from "framer-motion"; -import { useEffect, useState } from "react"; import { useTranslations } from "next-intl"; import { - getOperationalSystems, SystemFeature, } from "@/lib/api/demoapi/operationalSystems"; import { Breadcrumb } from "@/components/breadCrumb"; @@ -157,28 +155,6 @@ export default function OperationalSystemsPage() { > {data?.description} - - {/*
-
    - {system.features.map((feature, featureIndex) => ( - - - {feature} - - - ))} -
-
*/} diff --git a/app/[locale]/services/loading.tsx b/app/[locale]/services/loading.tsx new file mode 100644 index 0000000..f7b4b86 --- /dev/null +++ b/app/[locale]/services/loading.tsx @@ -0,0 +1,5 @@ +import { InitialLoading } from "@/components/initialLoading/initialLoading"; + +export default function Loading() { + return ; +} diff --git a/components/pages/about/whyChooseUs.tsx b/components/pages/about/whyChooseUs.tsx index 798ebb3..e140179 100644 --- a/components/pages/about/whyChooseUs.tsx +++ b/components/pages/about/whyChooseUs.tsx @@ -3,10 +3,12 @@ import Image from "next/image"; import { Check } from "lucide-react"; import DotAnimatsiya from "@/components/dot/DotAnimatsiya"; -import { useTranslations } from "next-intl"; +import { useLocale, useTranslations } from "next-intl"; +import Link from "next/link"; export function WhyChooseUs() { const t = useTranslations(); + const locale = useLocale(); const features = [ { title: t("about.whyChoose.features.fastResponse") }, { title: t("about.whyChoose.features.ready24") }, @@ -56,9 +58,12 @@ export function WhyChooseUs() { {/* CTA Button */}
- +
diff --git a/components/pages/home/banner.tsx b/components/pages/home/banner.tsx deleted file mode 100644 index cad5c1c..0000000 --- a/components/pages/home/banner.tsx +++ /dev/null @@ -1,107 +0,0 @@ -import { useLocale, useTranslations } from "next-intl"; -import DotAnimatsiya from "../../dot/DotAnimatsiya"; -import Link from "next/link"; - -export function Banner() { - const t = useTranslations(); - const locale = useLocale(); - return ( -
- {/* Background Image */} -
- - {/* Gradient Overlay - Bottom-left to top-right */} -
- - {/* Content Container */} -
-
-
- {/* Right side - Text Content */} -
- {/* Badge */} -
- - - {t("home.banner.title1")} - -
- - {/* Main Heading */} -

- {t("home.banner.title2")} -

- - {/* Description */} -

- {t("home.banner.description")} -

- - {/* CTA Button */} - -
- - {/* Left side - Firefighters Image */} -
- Firefighters -
- - {/* Right side - Text Content */} -
- {/* Badge */} -
- - - {t("home.banner.title1")} - -
- - {/* Main Heading */} -

- {t("home.banner.title2")} -

- - {/* Description */} -

- {t("home.banner.description")} -

- - {/* CTA Button */} - - {t("home.banner.cta")} - -
-
-
-
-
- ); -} diff --git a/components/pages/home/banner/banner.tsx b/components/pages/home/banner/banner.tsx new file mode 100644 index 0000000..d5dfda7 --- /dev/null +++ b/components/pages/home/banner/banner.tsx @@ -0,0 +1,33 @@ +import { useLocale, useTranslations } from "next-intl"; +import DotAnimatsiya from "../../../dot/DotAnimatsiya"; +import Link from "next/link"; +import { BannerSlider } from "./slider"; + +export function Banner() { + const t = useTranslations(); + const locale = useLocale(); + return ( +
+ {/* Background Image */} +
+ + {/* Gradient Overlay - Bottom-left to top-right */} +
+ + {/* Content Container */} + +
+ ); +} diff --git a/components/pages/home/banner/slider.tsx b/components/pages/home/banner/slider.tsx new file mode 100644 index 0000000..a4e8dcf --- /dev/null +++ b/components/pages/home/banner/slider.tsx @@ -0,0 +1,150 @@ +"use client"; + +import { Swiper, SwiperSlide } from "swiper/react"; +import { Navigation, Autoplay } from "swiper/modules"; +import "swiper/css"; +import "swiper/css/navigation"; +import { ChevronLeft, ChevronRight } from "lucide-react"; +import Image from "next/image"; +import Link from "next/link"; +import { useLocale, useTranslations } from "next-intl"; +import DotAnimatsiya from "@/components/dot/DotAnimatsiya"; +// The custom CSS selectors for navigation +const navigationPrevEl = ".hero-swiper-prev"; +const navigationNextEl = ".hero-swiper-next"; + +export function BannerSlider() { + const t = useTranslations(); + const locale = useLocale(); + const BANNER_DATA = [ + { + image: "/images/homeBanner3.png", + title: "YONG'INGA QARSHI HIMOYA", + description: + "Biz yong‘in xavfsizligi tizimlarini o‘rnatish va sertifikatlangan himoya vositalari savdosi bo‘yicha professional xizmatlar ko‘rsatamiz.", + }, + { + image: "/images/homeBanner2.png", + title: "YONG'INGA QARSHI HIMOYA", + description: + "Biz yong‘in xavfsizligi tizimlarini o‘rnatish va sertifikatlangan himoya vositalari savdosi bo‘yicha professional xizmatlar ko‘rsatamiz.", + }, + ]; + return ( +
+ {/* Custom buttons */} + + + + {BANNER_DATA.map((item, index) => ( + +
+
+
+ {/* Right side - Text Content */} +
+ {/* Badge */} +
+ + + {t("home.banner.title1")} + +
+ + {/* Main Heading */} +

+ {item.title} +

+ + {/* Description */} +

+ {item.description} +

+ + {/* CTA Button */} + +
+ + {/* Left side - Firefighters Image */} +
+ Firefighters +
+ + {/* Right side - Text Content */} +
+ {/* Badge */} +
+ + + {t("home.banner.title1")} + +
+ + {/* Main Heading */} +

+ {t("home.banner.title2")} +

+ + {/* Description */} +

+ {t("home.banner.description")} +

+ + {/* CTA Button */} + + {t("home.banner.cta")} + +
+
+
+
+
+ ))} +
+
+ ); +} diff --git a/components/pages/home/index.ts b/components/pages/home/index.ts index 082d0bd..b5ebf50 100644 --- a/components/pages/home/index.ts +++ b/components/pages/home/index.ts @@ -1,4 +1,4 @@ -export { Banner } from "./banner"; +export { Banner } from "./banner/banner"; export { Statistics } from "./statistics"; export { AboutUs } from "./about"; export { Video } from "./video";