From de1e0a4a89bc1a3c85a18c68480c59ca3264c885 Mon Sep 17 00:00:00 2001 From: BunyodL Date: Sun, 27 Apr 2025 22:48:03 +0500 Subject: [PATCH] update: make website responsive --- src/features/map/ui/gas-station-map.tsx | 8 +- src/shared/components/about-counter.tsx | 8 +- src/widgets/about-section.tsx | 86 +++++++------- src/widgets/charity-section.tsx | 8 +- src/widgets/cta-section.tsx | 5 +- src/widgets/header/ui/index.tsx | 8 +- src/widgets/hero-section.tsx | 6 +- src/widgets/map-section.tsx | 2 +- src/widgets/partners-section.tsx | 9 +- src/widgets/promotions-section.tsx | 2 +- src/widgets/stats-section.tsx | 4 +- src/widgets/vacancies-section.tsx | 149 ++++++++++-------------- 12 files changed, 138 insertions(+), 157 deletions(-) diff --git a/src/features/map/ui/gas-station-map.tsx b/src/features/map/ui/gas-station-map.tsx index 7621105..5ef8a15 100644 --- a/src/features/map/ui/gas-station-map.tsx +++ b/src/features/map/ui/gas-station-map.tsx @@ -529,8 +529,8 @@ export default function GasStationMap() { className='border border-gray-200 bg-white text-gray-800 shadow-md hover:bg-gray-100' onClick={() => setIsFilterOpen(true)} > - - {t('map.filters')} + + {t('map.filters')} {(activeFilters.length > 0 || activeCities.length > 0) && ( {activeFilters.length + activeCities.length} @@ -546,8 +546,8 @@ export default function GasStationMap() { className='border border-gray-200 bg-white text-gray-800 shadow-md hover:bg-gray-100' onClick={() => setIsStationListOpen(true)} > - - {t('map.stationsList')} + + {t('map.stationsList')} {filteredStations.length} diff --git a/src/shared/components/about-counter.tsx b/src/shared/components/about-counter.tsx index 317f7f3..6f301c0 100644 --- a/src/shared/components/about-counter.tsx +++ b/src/shared/components/about-counter.tsx @@ -33,8 +33,8 @@ export default function AboutCounter() { }, []); return ( -
-
+
+
@@ -43,7 +43,7 @@ export default function AboutCounter() {

Сотрудников

-
+
@@ -52,7 +52,7 @@ export default function AboutCounter() {

Литров топлива в месяц

-
+
diff --git a/src/widgets/about-section.tsx b/src/widgets/about-section.tsx index 11d8a6b..3d26fe7 100644 --- a/src/widgets/about-section.tsx +++ b/src/widgets/about-section.tsx @@ -10,7 +10,7 @@ export const AboutSection = () => { const { t } = useLanguage(); return ( -
+
@@ -24,47 +24,7 @@ export const AboutSection = () => {

{t('home.about.description2')}

-
-
-
- -
-
-

- {t('home.about.features.quality.title')} -

-

- {t('home.about.features.quality.description')} -

-
-
-
-
- -
-
-

- {t('home.about.features.equipment.title')} -

-

- {t('home.about.features.equipment.description')} -

-
-
-
-
- -
-
-

- {t('home.about.features.staff.title')} -

-

- {t('home.about.features.staff.description')} -

-
-
-
+
{
); }; + +interface Feature { + title: string; + description: string; +} + +const features: Array = [ + { + title: 'home.about.features.quality.title', + description: 'home.about.features.quality.description', + }, + { + title: 'home.about.features.equipment.title', + description: 'home.about.features.equipment.description', + }, + { + title: 'home.about.features.staff.title', + description: 'home.about.features.staff.description', + }, +]; + +const Features = () => { + const { t } = useLanguage(); + + return ( +
+ {features.map(({ title, description }) => { + return ( +
+
+ +
+
+

{t(title)}

+

{t(description)}

+
+
+ ); + })} +
+ ); +}; diff --git a/src/widgets/charity-section.tsx b/src/widgets/charity-section.tsx index 3562f5e..44b943d 100644 --- a/src/widgets/charity-section.tsx +++ b/src/widgets/charity-section.tsx @@ -11,12 +11,12 @@ export const CharitySection = () => { const { t } = useLanguage(); return ( -
+
{
-

+

{t('home.charity.title')}

diff --git a/src/widgets/cta-section.tsx b/src/widgets/cta-section.tsx index 67df7e3..9faa576 100644 --- a/src/widgets/cta-section.tsx +++ b/src/widgets/cta-section.tsx @@ -1,14 +1,15 @@ 'use client'; +import Link from 'next/link'; + import { useLanguage } from '@/shared/language'; import { Button } from '@/shared/shadcn-ui/button'; -import Link from 'next/link'; export const CtaSection = () => { const { t } = useLanguage(); return ( -

+

diff --git a/src/widgets/header/ui/index.tsx b/src/widgets/header/ui/index.tsx index 9baef64..71197f0 100644 --- a/src/widgets/header/ui/index.tsx +++ b/src/widgets/header/ui/index.tsx @@ -5,7 +5,7 @@ import Link from 'next/link'; import { Logo } from '@/shared/assets/logo'; import { useLanguage } from '@/shared/language'; -import { LanguageSwitcher } from '@/shared/language/ui/language-switcher'; +// import { LanguageSwitcher } from '@/shared/language/ui/language-switcher'; import { Button } from '@/shared/shadcn-ui/button'; import { DesktopNav } from './desktop-nav'; @@ -19,10 +19,10 @@ export function Header() {
-
+
-
- +
+ {/* */}

-

+

{t('home.hero.description')}

-
+
-
-
- - + jobTitle={job} + location='Душанбе, Таджикистан' + tags={['Полный день', 'Опыт от 1 года']} + /> ))} @@ -80,69 +59,23 @@ export const VacanciesSection = () => { 'Бухгалтер', 'Специалист по логистике', ].map((job, index) => ( - - -
-
-
-

{job}

-

- Душанбе, Таджикистан -

-
- - Полный день - - - Опыт от 1 года - -
-
- -
-
-
-
+ jobTitle={job} + location='Душанбе, Таджикистан' + tags={['Полный день', 'Опыт от 1 года']} + /> ))}
{['Оператор АЗС', 'Заправщик', 'Менеджер станции'].map( (job, index) => ( - - -
-
-
-

{job}

-

- Душанбе, Таджикистан -

-
- - Сменный график - - - Обучение - -
-
- -
-
-
-
+ jobTitle={job} + location='Душанбе, Таджикистан' + tags={['Сменный график', 'Обучение']} + /> ), )}
@@ -151,3 +84,49 @@ export const VacanciesSection = () => {
); }; + +interface VacancyProps { + jobTitle: string; + location: string; + tags: Array; +} + +const Vacancy = ({ jobTitle, location, tags }: VacancyProps) => { + const { t } = useLanguage(); + + return ( + + +
+
+
+

{jobTitle}

+

{location}

+
+ {tags.map((tag, index) => { + return ( + + {tag} + + ); + })} +
+
+ +
+
+
+
+ ); +};