Files
iiEasy/components/EducationBusinessSection.tsx

185 lines
8.9 KiB
TypeScript
Raw Normal View History

import React from 'react';
import { SECTION_IDS, EDUCATION_BUSINESS_CONTENT } from '../constants';
import { BusinessCourse } from '../types';
import {
CpuChipIcon, ChartBarIcon, CommandLineIcon, AcademicCapIcon, LightBulbIcon, CheckIcon
} from '../components/icons';
import ApproachCard from './ApproachCard';
// Icon map for Business Courses
const businessCourseIconMap: Record<string, React.ElementType> = {
CpuChipIcon,
ChartBarIcon,
CommandLineIcon,
AcademicCapIcon,
LightBulbIcon,
};
interface CourseHighlightProps {
iconName: string;
title: string;
description: string;
}
const CourseHighlight: React.FC<CourseHighlightProps> = ({ iconName, title, description }) => {
const IconComponent = businessCourseIconMap[iconName] || AcademicCapIcon; // Fallback icon
return (
<div className="bg-white p-6 rounded-xl">
<div className="flex items-start">
<div className="flex-shrink-0">
<IconComponent className="w-8 h-8 text-slate-600" aria-hidden="true" />
</div>
<div className="ml-4">
<h3 className="font-quicksand text-xl font-semibold text-slate-800 mb-2">{title}</h3>
<p className="font-inter text-slate-600 leading-relaxed">
{description}
</p>
</div>
</div>
</div>
);
};
const PersonIcon = ({ color }: { color: string }) => (
<div className="relative w-12 h-12">
<div className={`w-8 h-8 ${color} rounded-full absolute top-0 left-1/2 -translate-x-1/2`}></div>
<div className={`w-12 h-6 ${color} rounded-t-lg absolute bottom-0`}></div>
</div>
);
interface EducationBusinessSectionProps {
businessCourses: BusinessCourse[];
}
const EducationBusinessSection: React.FC<EducationBusinessSectionProps> = ({ businessCourses }) => {
return (
<section
id={SECTION_IDS.educationBusinessPage}
className="py-16 md:py-24 bg-white min-h-screen"
>
<div className="container mx-auto px-4 sm:px-6 lg:px-8">
<header className="mb-12 md:mb-16">
<h1 className="font-quicksand text-4xl sm:text-5xl md:text-6xl font-bold text-slate-900">
{EDUCATION_BUSINESS_CONTENT.title}
</h1>
<p className="mt-4 text-lg md:text-xl text-slate-700 max-w-3xl">
{EDUCATION_BUSINESS_CONTENT.subtitle}
</p>
</header>
{/* "Our Approach" section */}
<div className="my-16 md:my-24">
<div className="max-w-3xl mx-auto text-center mb-12">
<h2 className="text-3xl sm:text-4xl font-bold font-quicksand text-slate-800">Наш подход к обучению</h2>
<p className="mt-4 text-lg text-slate-600 font-inter">
Мы верим в комплексный подход, который готовит специалистов к реальным вызовам в области ИИ.
</p>
</div>
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
<ApproachCard
title="Обучаем"
description="Мы начинаем с фундаментальных принципов работы с ИИ, отсеивая сложную теорию и фокусируясь на практическом применении для решения реальных задач."
visual={
<div className="relative w-40 h-24 flex items-center justify-center">
<div className="absolute top-0 left-0 w-20 h-20 bg-black rounded-full"></div>
<div className="absolute bottom-0 right-0 w-20 h-20 bg-gray-300 rounded-full"></div>
<div className="absolute bottom-4 right-4 w-8 h-8 bg-green-400 rounded-lg flex items-center justify-center ring-4 ring-white">
<CheckIcon className="w-5 h-5 text-white" strokeWidth={2.5} />
</div>
</div>
}
/>
<ApproachCard
title="Тестируем"
description="Мы проводим внутренние оценки и работаем с экспертами для проверки знаний в реальных сценариях, что помогает закрепить навыки и подготовиться к сертификации."
visual={
<div className="relative w-40 h-24 flex items-center justify-center">
<div className="relative w-36 h-16 bg-gray-100 rounded-lg p-3 space-y-2 flex flex-col justify-center">
<div className="w-full h-1.5 bg-gray-300 rounded-full"></div>
<div className="w-2/3 h-1.5 bg-gray-300 rounded-full"></div>
</div>
<div className="absolute top-4 left-4 w-8 h-8 bg-green-400 rounded-lg flex items-center justify-center ring-4 ring-white">
<CheckIcon className="w-5 h-5 text-white" strokeWidth={2.5} />
</div>
</div>
}
/>
<ApproachCard
title="Делимся опытом"
description="Мы используем обратную связь из реального мира и опыт наших экспертов, чтобы сделать наши курсы по ИИ более понятными, актуальными и полезными для людей."
visual={
<div className="w-32 h-32 grid grid-cols-2 gap-2 content-center justify-items-center">
<PersonIcon color="bg-gray-300" />
<PersonIcon color="bg-black" />
<PersonIcon color="bg-gray-300" />
<div className="relative">
<PersonIcon color="bg-black" />
<div className="absolute bottom-1 right-0 w-6 h-6 bg-green-400 rounded-lg flex items-center justify-center ring-2 ring-white">
<CheckIcon className="w-4 h-4 text-white" strokeWidth={2.5} />
</div>
</div>
</div>
}
/>
</div>
</div>
<div className="my-16 md:my-20">
<h2 className="text-center font-quicksand text-3xl sm:text-4xl font-semibold text-slate-700 mb-10">
Курсы для бизнеса
</h2>
{businessCourses && businessCourses.length > 0 ? (
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
{businessCourses.map((course: BusinessCourse) => (
<CourseHighlight
key={course.title}
iconName={course.icon}
title={course.title}
description={course.description}
/>
))}
</div>
) : (
<div className="text-center py-10 bg-white p-6 rounded-xl">
<AcademicCapIcon className="w-16 h-16 mx-auto text-slate-300 mb-4" />
<h2 className="text-2xl font-quicksand font-semibold text-slate-700 mb-3">Курсы для бизнеса скоро появятся</h2>
<p className="text-slate-600 font-inter">
Мы активно работаем над созданием актуальных программ обучения. Следите за обновлениями!
</p>
</div>
)}
</div>
<div className="mt-16 text-center bg-white p-8 md:p-12 rounded-xl">
<h2 className="text-3xl font-quicksand font-semibold text-slate-800 mb-6">
{EDUCATION_BUSINESS_CONTENT.ctaTitle}
</h2>
<p className="font-inter text-lg text-slate-600 mb-8 max-w-xl mx-auto">
{EDUCATION_BUSINESS_CONTENT.ctaSubtitle}
</p>
<div className="flex flex-col sm:flex-row flex-wrap justify-center items-center gap-4 sm:gap-6">
{EDUCATION_BUSINESS_CONTENT.contactMethods.map((method) => (
<a
key={method.id}
href={method.href}
target="_blank"
rel="noopener noreferrer"
className={`group inline-flex items-center justify-center px-6 py-3 text-base font-medium text-slate-800 ${method.bgColor} ${method.hoverBgColor} rounded-full focus:outline-none focus:ring-2 ${method.ringColor} focus:ring-offset-2 transition-all duration-150 ease-in-out font-quicksand w-full sm:w-auto sm:min-w-[180px]`}
aria-label={method.ariaLabel}
>
<method.icon className="w-5 h-5" />
<span className="ml-2.5">{method.name}</span>
</a>
))}
</div>
</div>
</div>
</section>
);
};
export default EducationBusinessSection;