carType page over
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { CollapseProps } from "antd";
|
||||
import { Collapse } from "antd";
|
||||
import Text from "../text";
|
||||
import Title from "../title";
|
||||
import Text from "../lib_components/text";
|
||||
import Title from "../lib_components/title";
|
||||
|
||||
const FaqTexts: CollapseProps["items"] = [
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
"use client";
|
||||
|
||||
import Title from "../title";
|
||||
import Title from "../lib_components/title";
|
||||
import { FaPhoneAlt, FaTelegram } from "react-icons/fa";
|
||||
import { BiTargetLock } from "react-icons/bi";
|
||||
import GoogleMap from "../google.map";
|
||||
import GoogleMap from "../lib_components/google.map";
|
||||
|
||||
export default function Map() {
|
||||
return (
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Swiper, SwiperSlide } from "swiper/react";
|
||||
import { Navigation } from "swiper/modules";
|
||||
import "swiper/css";
|
||||
import "swiper/css/navigation";
|
||||
import Title from "../title";
|
||||
import Title from "../lib_components/title";
|
||||
import SliderCard from "../cards/sliderCard";
|
||||
import { sliderData } from "@/data";
|
||||
|
||||
@@ -14,27 +14,35 @@ const navigationNextEl = ".custom-swiper-next";
|
||||
|
||||
export default function CustomSlider() {
|
||||
return (
|
||||
<div dir="ltr" className="max-w-[1400px] w-full mx-auto relative my-20 px-4">
|
||||
<div
|
||||
dir="ltr"
|
||||
className="max-w-[1400px] w-full mx-auto relative my-20 px-4"
|
||||
>
|
||||
{/* Title */}
|
||||
<div className="my-10 mb-20 flex items-center justify-between ">
|
||||
<div className="">
|
||||
<Title text="news-h2" />
|
||||
</div>
|
||||
|
||||
{/* Custom buttons */}
|
||||
<div className="flex gap-2 items-center justify-center">
|
||||
<button
|
||||
className={`${navigationPrevEl.replace('.', '')} w-10 h-10 p-0 bg-primary text-[30px] text-center text-white flex items-center justify-center hover:bg-secondary hover:cursor-pointer transition`}
|
||||
>
|
||||
‹
|
||||
</button>
|
||||
<button
|
||||
className={`${navigationNextEl.replace('.', '')} w-10 h-10 bg-primary text-[30px] text-center text-white flex items-center justify-center hover:bg-secondary hover:cursor-pointer transition `}
|
||||
>
|
||||
›
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Custom buttons */}
|
||||
<div className="flex gap-2 items-center justify-center">
|
||||
<button
|
||||
className={`${navigationPrevEl.replace(
|
||||
".",
|
||||
""
|
||||
)} w-10 h-10 p-0 bg-primary text-[30px] text-center text-white flex items-center justify-center hover:bg-secondary hover:cursor-pointer transition`}
|
||||
>
|
||||
‹
|
||||
</button>
|
||||
<button
|
||||
className={`${navigationNextEl.replace(
|
||||
".",
|
||||
""
|
||||
)} w-10 h-10 bg-primary text-[30px] text-center text-white flex items-center justify-center hover:bg-secondary hover:cursor-pointer transition `}
|
||||
>
|
||||
›
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Swiper */}
|
||||
@@ -60,7 +68,6 @@ export default function CustomSlider() {
|
||||
</SwiperSlide>
|
||||
))}
|
||||
</Swiper>
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Image from "next/image";
|
||||
import Title from "../title";
|
||||
import Text from "../text";
|
||||
import Title from "../lib_components/title";
|
||||
import Text from "../lib_components/text";
|
||||
import { Ekskavator_offer } from "@/assets";
|
||||
|
||||
export default function Offer() {
|
||||
@@ -25,8 +25,8 @@ export default function Offer() {
|
||||
</div>
|
||||
<div className="text-primary flex flex-col text-[18px] relative pl-8">
|
||||
<div className=" absolute left-0">
|
||||
<div className="bg-primary w-[3px] h-[28px]"></div>
|
||||
<div className="bg-secondary w-[3px] h-[100px]"></div>
|
||||
<div className="bg-primary w-[3px] h-[28px]"></div>
|
||||
<div className="bg-secondary w-[3px] h-[100px]"></div>
|
||||
</div>
|
||||
<span>"</span>
|
||||
<Text txt="about-block-quote" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import Title from "../title";
|
||||
import Title from "../lib_components/title";
|
||||
|
||||
import React from "react";
|
||||
// Import Swiper React components
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
"use client";
|
||||
|
||||
import React, { useEffect, useState } from "react";
|
||||
import Title from "../title";
|
||||
import Text from "../text";
|
||||
import Title from "../lib_components/title";
|
||||
import Text from "../lib_components/text";
|
||||
import { Asphalt, Ekskavator, Forklift, Kran, Truck } from "@/assets";
|
||||
import Image from "next/image";
|
||||
import type { productFilterTypes, ProductTypes } from "@/types";
|
||||
import { allProducts, cranes, excavators, forklift, road_repairs, trucks } from "@/data";
|
||||
import {
|
||||
allProducts,
|
||||
cranes,
|
||||
excavators,
|
||||
forklift,
|
||||
road_repairs,
|
||||
trucks,
|
||||
} from "@/data";
|
||||
import ProductCard from "../cards/productCard";
|
||||
|
||||
const productFilterTypesMainPage: productFilterTypes[] = [
|
||||
@@ -15,31 +22,30 @@ const productFilterTypesMainPage: productFilterTypes[] = [
|
||||
{ name: "forklift-trucks", image: Ekskavator },
|
||||
{ name: "excavators", image: Forklift },
|
||||
{ name: "road-repairs", image: Asphalt },
|
||||
{ name: "all", image: '' },
|
||||
{ name: "all", image: "" },
|
||||
];
|
||||
|
||||
export default function Products() {
|
||||
|
||||
const [productFilter, setProductFilter] = useState<string | null>(null);
|
||||
|
||||
const [cars,setCars] = useState(allProducts)
|
||||
const [cars, setCars] = useState(allProducts);
|
||||
|
||||
// execute filetr function
|
||||
useEffect(()=>{
|
||||
if(productFilter === 'trucks'){
|
||||
// execute filetr function
|
||||
useEffect(() => {
|
||||
if (productFilter === "trucks") {
|
||||
setCars(trucks);
|
||||
}else if(productFilter === 'cranes'){
|
||||
} else if (productFilter === "cranes") {
|
||||
setCars(cranes);
|
||||
}else if(productFilter === 'forklift-trucks'){
|
||||
} else if (productFilter === "forklift-trucks") {
|
||||
setCars(forklift);
|
||||
} else if(productFilter === 'excavators'){
|
||||
} else if (productFilter === "excavators") {
|
||||
setCars(excavators);
|
||||
}else if(productFilter === 'road-repairs'){
|
||||
setCars(road_repairs)
|
||||
}else {
|
||||
setCars(allProducts)
|
||||
} else if (productFilter === "road-repairs") {
|
||||
setCars(road_repairs);
|
||||
} else {
|
||||
setCars(allProducts);
|
||||
}
|
||||
},[productFilter])
|
||||
}, [productFilter]);
|
||||
return (
|
||||
<div dir="ltr" className="max-w-[1200px] w-full mx-auto">
|
||||
{/* title part */}
|
||||
@@ -66,21 +72,23 @@ export default function Products() {
|
||||
} flex items-center gap-2 h-[58px] hover:bg-secondary border-gray-300 hover:border-secondary border-[1px] px-7 text-2xl rounded-tr-full rounded-bl-full `}
|
||||
>
|
||||
<Text txt={item.name} />
|
||||
{item.image && (<Image
|
||||
src={item.image}
|
||||
alt="Truck images"
|
||||
width={50}
|
||||
height={50}
|
||||
className="object-cover"
|
||||
/>)}
|
||||
</button>
|
||||
{item.image && (
|
||||
<Image
|
||||
src={item.image}
|
||||
alt="Truck images"
|
||||
width={50}
|
||||
height={50}
|
||||
className="object-cover"
|
||||
/>
|
||||
)}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* products */}
|
||||
<div className="px-4 grid gap-5 grid-cols-1 place-content-center min-[500px]:grid-cols-2 min-lg:grid-cols-4 min-[1210px]:grid-cols-4">
|
||||
{cars.map((item: ProductTypes, index: number) => (
|
||||
<div key={index} >
|
||||
<div key={index}>
|
||||
<ProductCard data={item} />
|
||||
</div>
|
||||
))}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import Title from "../title";
|
||||
import Title from "../lib_components/title";
|
||||
import { Gehl, Hyundai, JCB, Lonking, Mitsubishi, XCMG } from "@/assets";
|
||||
import Image, { StaticImageData } from "next/image";
|
||||
|
||||
@@ -48,7 +48,7 @@ export default function Texnika() {
|
||||
className="mySwiper flex items-center justify-around"
|
||||
>
|
||||
{slideImage.map((item, index) => (
|
||||
<SwiperSlide key={index} className="!w-[200px] mx-10 " >
|
||||
<SwiperSlide key={index} className="!w-[200px] mx-10 ">
|
||||
<Image
|
||||
src={item}
|
||||
alt="Partner images"
|
||||
|
||||
Reference in New Issue
Block a user