Merge branch 'main' of ssh://216.250.8.93:2018/~/repos/turkmen-expo
This commit is contained in:
commit
ad98db48fb
|
|
@ -1,4 +1,4 @@
|
|||
import { LayoutWithSidebar } from "@/components/page/layout-with-sidebar";
|
||||
import { LayoutWithSidebar } from "@/components/page/LayoutWithSidebar";
|
||||
import { getAbout } from "@/services/about";
|
||||
import { cookies } from "next/headers";
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import React from "react";
|
|||
|
||||
const CompanyLayout = ({ children }: { children: React.ReactNode }) => {
|
||||
return (
|
||||
<div className="lg:bg-blueBg bg-transparent">
|
||||
<div className="lg:bg-blueBg bg-transparent pt-12">
|
||||
<div className="container">
|
||||
<div className="flex w-full">
|
||||
<aside className="w-[25%] hidden tab:block">
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import clsx from "clsx";
|
|||
import { Card } from "@/components/shared/Card";
|
||||
import { BorderBtn } from "@/components/ui/Buttons";
|
||||
import { Pagination } from "@/components/ui/Pagination";
|
||||
import { LayoutWithSidebar } from "@/components/page/layout-with-sidebar";
|
||||
import { LayoutWithSidebar } from "@/components/page/LayoutWithSidebar";
|
||||
|
||||
const News = () => {
|
||||
const { activeLang } = useAppSelector(selectHeader);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { LayoutWithSidebar } from "@/components/page/layout-with-sidebar";
|
||||
import { LayoutWithSidebar } from "@/components/page/LayoutWithSidebar";
|
||||
import { getServices } from "@/services/services";
|
||||
|
||||
export default async function AdvertisingPage() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { LayoutWithSidebar } from "@/components/page/layout-with-sidebar";
|
||||
import { LayoutWithSidebar } from "@/components/page/LayoutWithSidebar";
|
||||
import { getServices } from "@/services/services";
|
||||
|
||||
export default async function AdvertisingPage() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { LayoutWithSidebar } from "@/components/page/layout-with-sidebar";
|
||||
import { LayoutWithSidebar } from "@/components/page/LayoutWithSidebar";
|
||||
import { getServices } from "@/services/services";
|
||||
|
||||
export default async function BusinessTours() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { LayoutWithSidebar } from "@/components/page/layout-with-sidebar";
|
||||
import { LayoutWithSidebar } from "@/components/page/LayoutWithSidebar";
|
||||
import { getServices } from "@/services/services";
|
||||
|
||||
export default async function CertificationPage() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { LayoutWithSidebar } from "@/components/page/layout-with-sidebar";
|
||||
import { LayoutWithSidebar } from "@/components/page/LayoutWithSidebar";
|
||||
import { getServices } from "@/services/services";
|
||||
|
||||
export default async function ForwardingPage() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { LayoutWithSidebar } from "@/components/page/layout-with-sidebar";
|
||||
import { LayoutWithSidebar } from "@/components/page/LayoutWithSidebar";
|
||||
import { getServices } from "@/services/services";
|
||||
|
||||
export default async function HybridsPage() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { LayoutWithSidebar } from "@/components/page/layout-with-sidebar";
|
||||
import { LayoutWithSidebar } from "@/components/page/LayoutWithSidebar";
|
||||
import { getServices } from "@/services/services";
|
||||
|
||||
export default async function MeetingsPage() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { LayoutWithSidebar } from "@/components/page/layout-with-sidebar";
|
||||
import { LayoutWithSidebar } from "@/components/page/LayoutWithSidebar";
|
||||
import { getServices } from "@/services/services";
|
||||
|
||||
export default async function MissionsPage() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { LayoutWithSidebar } from "@/components/page/layout-with-sidebar";
|
||||
import { LayoutWithSidebar } from "@/components/page/LayoutWithSidebar";
|
||||
import { getServices } from "@/services/services";
|
||||
|
||||
export default async function OrganizationPage() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { LayoutWithSidebar } from "@/components/page/layout-with-sidebar";
|
||||
import { LayoutWithSidebar } from "@/components/page/LayoutWithSidebar";
|
||||
import { getServices } from "@/services/services";
|
||||
|
||||
export default async function OutsourcingPage() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { LayoutWithSidebar } from "@/components/page/layout-with-sidebar";
|
||||
import { LayoutWithSidebar } from "@/components/page/LayoutWithSidebar";
|
||||
import { getServices } from "@/services/services";
|
||||
|
||||
export default async function PersonalTrainingPage() {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use client";
|
||||
|
||||
import { LayoutWithSidebar } from "@/components/page/layout-with-sidebar";
|
||||
import { LayoutWithSidebar } from "@/components/page/LayoutWithSidebar";
|
||||
import { baseAPI } from "@/lib/API";
|
||||
import { useAppSelector } from "@/redux/hooks";
|
||||
import { selectHeader } from "@/redux/slices/headerSlice";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use client";
|
||||
|
||||
import { LayoutWithSidebar } from "@/components/page/layout-with-sidebar";
|
||||
import { LayoutWithSidebar } from "@/components/page/LayoutWithSidebar";
|
||||
import { baseAPI } from "@/lib/API";
|
||||
import { useAppSelector } from "@/redux/hooks";
|
||||
import { selectHeader } from "@/redux/slices/headerSlice";
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export default async function EventPage({
|
|||
const data = await getEventPage(id, lang);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col container gap-20 pt-16 section-mb">
|
||||
<div className="flex flex-col container gap-20 pt-32 section-mb">
|
||||
<h1 className="md:text-[48px] text-[28px] text-ON_SURFACE leading-[115%] font-medium">
|
||||
{data?.title ? data?.title : null}
|
||||
</h1>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export default async function CalendarPage() {
|
|||
|
||||
const title = lang === "en" ? "Calendar of events" : "Календарь мероприятий";
|
||||
return (
|
||||
<div className="section-mb">
|
||||
<div className="section-mb pt-10">
|
||||
<div className="container flex flex-col items-start pt-5 gap-10 md:gap-12">
|
||||
<div>
|
||||
<div className="mb-[24px]">
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export default async function ContactsPage() {
|
|||
const lang = cookies().get("lang")?.value;
|
||||
|
||||
return (
|
||||
<main className="bg-blueBg h-full w-full">
|
||||
<main className="bg-blueBg h-full w-full pt-12">
|
||||
<div className="container flex flex-col items-start">
|
||||
<div className="mt-5">
|
||||
<BreadCrumbs second={lang === "ru" ? "Контакты" : "Contacts"} />
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { Events } from "@/components/shared/Events";
|
||||
import { News } from "@/components/shared/News";
|
||||
import { Partners } from "@/components/shared/Partners";
|
||||
import { Reviews } from "@/components/shared/Reviews";
|
||||
import { Slider } from "@/components/shared/Slider";
|
||||
import { Video } from "@/components/shared/Video";
|
||||
import Loader from "@/components/ui/Loader";
|
||||
import { cookies } from "next/headers";
|
||||
import { Suspense } from "react";
|
||||
|
|
@ -18,6 +18,7 @@ export default async function HomePage() {
|
|||
<Events lang={lang} />
|
||||
</Suspense>
|
||||
<News />
|
||||
<Reviews />
|
||||
{/* <Video /> */}
|
||||
<Partners />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -416,6 +416,22 @@ p img {
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
.dot {
|
||||
display: inline-block;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background-color: #d1d5db;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
.dot-active {
|
||||
@apply bg-PRIMARY;
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
.input {
|
||||
@apply flex h-14 rounded-[2px] p-4 focus:ring-2 border-0 focus:outline-none focus:ring-white transition-all hover:ring-white ring-slate-300 ring-[1px] bg-[#E3E8E5] text-base file:border-0 file:bg-SECONDARY_CONTAINER file:outline-none file:text-sm file:w-fit file:text-ON_SECONDARY_CONTAINER file:font-medium focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ const events = [
|
|||
];
|
||||
|
||||
export const Events = async ({ lang }: { lang: string }) => {
|
||||
const data = await getEvents(lang);
|
||||
// const data = await getEvents(lang);
|
||||
|
||||
const btnText =
|
||||
lang === "en" ? "Show more" : lang === "ru" ? "Показать еще" : "Show more";
|
||||
|
|
@ -37,7 +37,7 @@ export const Events = async ({ lang }: { lang: string }) => {
|
|||
<div className="sm:mb-10">
|
||||
<h2 className="text-center font-semibold text-3xl mb-8">
|
||||
{title} <span className="text-PRIMARY">Turkmen</span>
|
||||
<span className="text-red">Expo</span>
|
||||
<span className="text-red">Expo 2025</span>
|
||||
</h2>
|
||||
{/* <Title
|
||||
text={
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import logo from "@/public/assets/icons/logo.svg";
|
|||
import search from "@/public/assets/icons/header/search.svg";
|
||||
import searchMob from "@/public/assets/icons/header/mob-search.svg";
|
||||
|
||||
import { LangMenu } from "../ui/lang-menu";
|
||||
import { LangMenu } from "../ui/LangMenu";
|
||||
import { SearchInput } from "./search-input";
|
||||
import { headerMenu2 } from "@/lib/database/pathnames";
|
||||
import { BurgerMenu } from "../ui/burger-menu";
|
||||
|
|
@ -18,7 +18,6 @@ import { useAppDispatch, useAppSelector } from "@/redux/hooks";
|
|||
import { selectHeader, setShowInput } from "@/redux/slices/headerSlice";
|
||||
import { selectBurger, setBurgerOpen } from "@/redux/slices/burgerSlice";
|
||||
import { useStorage } from "@/hooks/useStorage";
|
||||
import { usePathname, useRouter } from "next/navigation";
|
||||
|
||||
export const Header = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
|
|
@ -26,7 +25,6 @@ export const Header = () => {
|
|||
const { burgerOpen } = useAppSelector(selectBurger);
|
||||
const { activeLang } = useAppSelector(selectHeader);
|
||||
const [activeLink, setActiveLink] = useState("");
|
||||
const pathname = usePathname();
|
||||
|
||||
const toggleMenu = () => {
|
||||
dispatch(setBurgerOpen(!burgerOpen));
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ export const Slider = ({ lang }: { lang: string }) => {
|
|||
<Swiper
|
||||
modules={[Autoplay, Pagination]}
|
||||
loop
|
||||
autoplay={{ delay: 3000 }}
|
||||
autoplay={{ delay: 5000 }}
|
||||
speed={5000}
|
||||
slidesPerView={1}
|
||||
slidesPerGroup={1}
|
||||
|
|
@ -73,6 +73,14 @@ export const Slider = ({ lang }: { lang: string }) => {
|
|||
target="_blank"
|
||||
className="size-full"
|
||||
>
|
||||
{item.image.includes(".mp4") ? (
|
||||
<video
|
||||
src={item.image}
|
||||
className="size-full object-contain"
|
||||
autoPlay
|
||||
muted
|
||||
/>
|
||||
) : (
|
||||
<Image
|
||||
ref={imgRef}
|
||||
height={600}
|
||||
|
|
@ -81,6 +89,7 @@ export const Slider = ({ lang }: { lang: string }) => {
|
|||
alt={item?.title}
|
||||
className="object-contain size-full"
|
||||
/>
|
||||
)}
|
||||
</Link>
|
||||
</SwiperSlide>
|
||||
))}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { activeLangType, setActiveLang } from "@/redux/slices/headerSlice";
|
|||
import clsx from "clsx";
|
||||
import { burgerMenu, burgerMenu2 } from "@/lib/database/header";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { lang } from "./lang-menu";
|
||||
import { lang } from "./LangMenu";
|
||||
|
||||
interface flagTypes {
|
||||
// title: 'Ру' | 'En' | 'Tm';
|
||||
|
|
|
|||
|
|
@ -1,123 +0,0 @@
|
|||
"use client";
|
||||
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import Image from "next/image";
|
||||
import clsx from "clsx";
|
||||
import { motion, AnimatePresence } from "framer-motion";
|
||||
|
||||
import triangle from "@/public/assets/icons/drop-icon.svg";
|
||||
import { useAppSelector, useAppDispatch } from "@/redux/hooks";
|
||||
import { activeLangType, selectHeader } from "@/redux/slices/headerSlice";
|
||||
import { setActiveLang } from "@/redux/slices/headerSlice";
|
||||
import { usePathname, useRouter, useSearchParams } from "next/navigation";
|
||||
|
||||
export const lang = [
|
||||
{
|
||||
title: "Русский",
|
||||
localization: "ru",
|
||||
},
|
||||
// {
|
||||
// title: 'Tm',
|
||||
// localization: 'tm',
|
||||
// },
|
||||
{
|
||||
title: "English",
|
||||
localization: "en",
|
||||
},
|
||||
];
|
||||
|
||||
export const LangMenu = () => {
|
||||
const { activeLang } = useAppSelector(selectHeader);
|
||||
const { refresh } = useRouter();
|
||||
const [active, setActive] = useState(false);
|
||||
const dispatch = useAppDispatch();
|
||||
const menuRef = useRef<HTMLDivElement>(null);
|
||||
const setLang = (lang: activeLangType) => {
|
||||
// Устанавливаем cookie через document.cookie
|
||||
document.cookie = `lang=${lang.localization}; path=/; max-age=31536000`;
|
||||
dispatch(setActiveLang(lang));
|
||||
refresh();
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const cookieLang = document.cookie
|
||||
.split("; ")
|
||||
.find((row) => row.startsWith("lang="))
|
||||
?.split("=")[1];
|
||||
|
||||
if (cookieLang) {
|
||||
const foundLang = lang.find((l) => l.localization === cookieLang);
|
||||
if (foundLang) dispatch(setActiveLang(foundLang));
|
||||
}
|
||||
}, [dispatch]);
|
||||
|
||||
useEffect(() => {
|
||||
const handleClick = (e: MouseEvent) => {
|
||||
if (menuRef.current && !menuRef.current.contains(e.target as Node)) {
|
||||
setActive(false);
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener("click", handleClick);
|
||||
|
||||
return () => document.removeEventListener("click", handleClick);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={menuRef}
|
||||
className="relative w-[90px] cursor-pointer flex items-center gap-x-5"
|
||||
onClick={() => {
|
||||
setActive(!active);
|
||||
}}
|
||||
>
|
||||
<div className="flex items-center px-[12px]">
|
||||
<p>{activeLang.title}</p>
|
||||
<Image
|
||||
src={triangle}
|
||||
alt="arrow"
|
||||
className={clsx("transition-rotate duration-300 img-auto", {
|
||||
"rotate-180": active,
|
||||
})}
|
||||
/>
|
||||
</div>
|
||||
<AnimatePresence>
|
||||
{active && (
|
||||
<motion.div
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
}}
|
||||
exit={{
|
||||
opacity: 0,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.2,
|
||||
}}
|
||||
className="absolute rounded-[4px] w-[112px] overflow-hidden custom-shadow z-10 flex flex-col top-[27px] bg-[#EEF1F0] transition-all duration-300"
|
||||
>
|
||||
{lang
|
||||
.filter((item) => item.title !== activeLang.title)
|
||||
.map((item, i) => (
|
||||
<div
|
||||
key={i}
|
||||
onClick={() => setLang(item)}
|
||||
className={clsx(
|
||||
"p-3 pr-[22px] py-4 text-extraSm transition-all",
|
||||
{
|
||||
"hover:bg-ON_SECONDARY_CONTAINER/[8%]":
|
||||
item.title === item.title,
|
||||
}
|
||||
)}
|
||||
>
|
||||
{item.title}
|
||||
</div>
|
||||
))}
|
||||
</motion.div>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
@ -1,8 +1,20 @@
|
|||
import clsx from "clsx";
|
||||
import React from "react";
|
||||
|
||||
export const Title = ({ text }: { text: string | boolean }) => {
|
||||
export const Title = ({
|
||||
text,
|
||||
className,
|
||||
}: {
|
||||
text: string | boolean;
|
||||
className?: string;
|
||||
}) => {
|
||||
return (
|
||||
<h2 className={`text-[26px] sm:text-[34px] leading-[115%] font-normal`}>
|
||||
<h2
|
||||
className={clsx(
|
||||
`text-[26px] sm:text-[34px] leading-[115%] font-normal`,
|
||||
className
|
||||
)}
|
||||
>
|
||||
{text}
|
||||
</h2>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue