From 7199cafcad04b340ae077288e77890572a8e8930 Mon Sep 17 00:00:00 2001 From: Tatyana Date: Thu, 7 Aug 2025 12:58:05 +0300 Subject: [PATCH] =?UTF-8?q?=D1=8D=D0=BA=D1=80=D0=B0=D0=BD=20home=20=D0=B4?= =?UTF-8?q?=D0=B8=D0=B7=D0=B0=D0=B9=D0=BD=20=D0=B4=D0=BE=D0=B4=D0=B5=D0=BB?= =?UTF-8?q?=D0=B0=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BottomNavigation.tsx | 26 +-- src/pages/Home.tsx | 272 ++++++++++++++-------------- 2 files changed, 144 insertions(+), 154 deletions(-) diff --git a/src/components/BottomNavigation.tsx b/src/components/BottomNavigation.tsx index 2b365a4..320e19c 100644 --- a/src/components/BottomNavigation.tsx +++ b/src/components/BottomNavigation.tsx @@ -9,11 +9,11 @@ const BottomNavigation: React.FC = () => { const location = useLocation() // Define SVG icons directly within the component, with active state styling - const HomeIcon = ({ active, size = 24 }: { active: boolean; size?: number }) => ( + const HomeIcon = ({ active }: { active: boolean; size?: number }) => ( { ) - const CoursesIcon = ({ active, size = 24 }: { active: boolean; size?: number }) => ( + const CoursesIcon = ({ active }: { active: boolean; size?: number }) => ( { ) - const ExerciseIcon = ({ active, size = 24 }: { active: boolean; size?: number }) => ( + const ExerciseIcon = ({ active }: { active: boolean; size?: number }) => ( @@ -61,11 +61,11 @@ const BottomNavigation: React.FC = () => { ) - const SettingsIcon = ({ active, size = 24 }: { active: boolean; size?: number }) => ( + const SettingsIcon = ({ active }: { active: boolean; size?: number }) => ( { }`} > {/* Внутренний маленький круг */} -
+
diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index bb4e20c..d357ae0 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -11,7 +11,7 @@ export default function Home() { useEffect(() => { setCurrentDate( new Date().toLocaleDateString("ru-RU", { - weekday: "long", + year: "numeric", month: "long", day: "numeric", @@ -23,7 +23,7 @@ export default function Home() { - + const stats = [ { value: "12", @@ -146,164 +146,154 @@ export default function Home() { const overallProgress = Math.round(courses.reduce((sum, course) => sum + course.progress, 0) / totalCourses) return ( -
- {/* Header */} -
-
-
-

Привет, Александр!

+
+
+ {/* Header */} +
+
+
+

Результаты

+
+
+

{currentDate}

+
-
-

{currentDate}

+
+
+
+
Все курсы
+
{totalCourses}/1
+
+
+
Все упражнения
+
{totalExercises}/4
+
+
+
+ +
- -
- - -
-
-
Все курсы
-
{totalCourses}/1
- +
history.push("/exercise/1")} className="px-4 sm:px-6 space-y-6 "> + {/* Current Exercise */} +
+ {/* Заголовок и статус */} +
+

Тренировка

+
+ Активно +
-
-
Все упражнения
-
{totalExercises}/4
- + {/* Основной блок с иконками и прогрессом */} +
+ {/* Иконка часов */} +
+
+ {/* Clock SVG */} + + + {/* Удалил лишний circle, так как он не нужен */} + + +
+ {/* Пульсирующая точка */} +
+ + + +
+
+ {/* Информация о упражнении */} +
+

В процессе

+

Текущее упражнение

+ {/* Кнопка с стрелкой */} +
+
- -
- -
-
-
- -
- {/* Current Exercise */} -
- {/* Заголовок и статус */} -
-

Тренировка

-
- Активно -
-
- - {/* Основной блок с иконками и прогрессом */} -
- {/* Иконка часов */} -
-
- {/* Clock SVG */} - +
history.push("/courses")} className="glass-morphism rounded-3xl text-left border border-white/50 shadow-lg backdrop-blur-xl p-6 text-white transition-transform transform hover:scale-105 duration-300 overflow-hidden"> + - - + + +
+ {/* Clock icon SVG */} + +
- {/* Пульсирующая точка */} -
- - +
Курсы
+
все назначенные
+
+
history.push("/course/${courseId}/exercises")} className="glass-morphism rounded-3xl text-left border border-white/50 shadow-lg backdrop-blur-xl p-6 text-white transition-transform transform hover:scale-105 duration-300 overflow-hidden"> + + + + +
+ + +
+
Упражнения
+
внутри текущего курса
- - {/* Информация о упражнении */} -
-

Подъемы ног лежа

-

Восстановление колена • 3 подхода по 12

- - {/* Прогрессбар */} -
-
- {/* Процент */} -
{'60%'}
-
-
-
- - {/* Кнопка продолжения */} -
-
- - {/* Quick Stats (Total Exercises & Total Courses) */} -
-
history.push("/courses")} className="glass-morphism rounded-3xl text-left border border-white/50 shadow-lg backdrop-blur-xl p-6 text-white transition-transform transform hover:scale-105 duration-300"> -
- {/* Clock icon SVG */} - - - - -
-
Курсы
-
все назначенные
-
- - -
history.push("/course/${courseId}/exercises")} className="glass-morphism rounded-3xl text-left border border-white/50 shadow-lg backdrop-blur-xl p-6 text-white transition-transform transform hover:scale-105 duration-300"> -
- {/* Clock icon SVG */} - - - - -
-
Упражнения
-
внутри текущего курса
-
-
- - +
-
) }