From babc4e16ddbebc5c5a009023dfb534e14f2e57e3 Mon Sep 17 00:00:00 2001 From: Tatyana Date: Fri, 8 Aug 2025 11:09:28 +0300 Subject: [PATCH] =?UTF-8?q?=D1=83=D0=BF=D1=80=D0=B0=D0=B6=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=BA=D1=83=D1=80=D1=81=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/test.tsx | 2 + src/components/BottomNavigation.tsx | 2 +- src/components/CircularProgressDisplay.tsx | 2 +- src/index.css | 7 - src/pages/CourseComplete.tsx | 2 +- src/pages/CourseExercises.tsx | 142 ++++----------------- src/pages/Home.tsx | 4 +- 7 files changed, 32 insertions(+), 129 deletions(-) create mode 100644 src/assets/test.tsx diff --git a/src/assets/test.tsx b/src/assets/test.tsx new file mode 100644 index 0000000..02ccd72 --- /dev/null +++ b/src/assets/test.tsx @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/components/BottomNavigation.tsx b/src/components/BottomNavigation.tsx index 825c7d5..0eec0ea 100644 --- a/src/components/BottomNavigation.tsx +++ b/src/components/BottomNavigation.tsx @@ -82,7 +82,7 @@ const BottomNavigation: React.FC = () => { const navItems = [ { path: "/home", icon: HomeIcon, label: "Домой" }, { path: "/courses", icon: CoursesIcon, label: "Курсы" }, - { path: "/exercise/1", icon: ExerciseIcon, label: "Тренировка" }, + { path: "/course/${courseId}/exercises", icon: ExerciseIcon, label: "Тренировка" }, { path: "/settings", icon: SettingsIcon, label: "Меню" }, ] diff --git a/src/components/CircularProgressDisplay.tsx b/src/components/CircularProgressDisplay.tsx index fb0dc34..c3d8fa3 100644 --- a/src/components/CircularProgressDisplay.tsx +++ b/src/components/CircularProgressDisplay.tsx @@ -14,7 +14,7 @@ const CircularProgressDisplay: React.FC = ({ const radius = 40 const circumference = 2 * Math.PI * radius - // For the "Courses" ring (blue) + // For the "Courses" ring (cyan) const coursesProgress = (totalCourses / 5) * 100 // Assuming max 5 courses for visual representation const coursesStrokeDashoffset = circumference - (coursesProgress / 100) * circumference diff --git a/src/index.css b/src/index.css index 7d54bfb..6c0b075 100644 --- a/src/index.css +++ b/src/index.css @@ -132,10 +132,3 @@ border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle white border */ box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); /* Shadow */ } - -body { - overflow: auto !important; /* включаем вертикальную прокрутку */ -} -.overflow_auto { - overflow: auto !important; -} \ No newline at end of file diff --git a/src/pages/CourseComplete.tsx b/src/pages/CourseComplete.tsx index 265635a..384bc87 100644 --- a/src/pages/CourseComplete.tsx +++ b/src/pages/CourseComplete.tsx @@ -21,7 +21,7 @@ const CourseComplete: React.FC = () => { }, []) return ( -
+
{/* Background Animation */}
diff --git a/src/pages/CourseExercises.tsx b/src/pages/CourseExercises.tsx index cba9ff4..a680c80 100644 --- a/src/pages/CourseExercises.tsx +++ b/src/pages/CourseExercises.tsx @@ -81,40 +81,24 @@ const CourseExercises: React.FC = () => { } return ( -
+ + + + +
{/* Header */} -
+
-
-
- -
-

Восстановление колена

-

Курс упражнений

-
-
- - - -
-
+
+

Курс упражнений

+

Восстановление колена

+ + {/* Exercise Slider */} -
+
{/* Exercise Image */}
@@ -163,75 +147,16 @@ const CourseExercises: React.FC = () => {
{/* Exercise Info */} -
-

{currentExercise.name}

-

{currentExercise.description}

+
+

{currentExercise.name}

- {/* Stats Grid */} -
-
-
- - - -
-
{currentExercise.duration}
-
Время
-
-
-
- - - -
-
{currentExercise.sets}
-
Подходы
-
-
-
- - - -
-
{currentExercise.reps}
-
Повторы
-
-
-
- - - -
-
{currentExercise.calories}
-
Калории
-
-
+
@@ -244,7 +169,7 @@ const CourseExercises: React.FC = () => { onClick={() => setCurrentSlide(index)} className={`h-2 rounded-full transition-all duration-300 ${ index === currentSlide - ? "bg-gradient-to-r from-[#2BACBE] to-blue-600 w-8 shadow-lg" + ? "bg-gradient-to-r from-[#2BACBE] to-cyan-600 w-8 shadow-lg" : "bg-gray-300 w-2 hover:bg-gray-400" }`} /> @@ -253,45 +178,28 @@ const CourseExercises: React.FC = () => {
{/* Exercise List */} -
-

Все упражнения курса

+
+

Все упражнения курса

{exercises.map((exercise, index) => (
history.push(`/exercise/${exercise.id}`)} className={`glass-morphism rounded-2xl p-4 sm:p-6 border border-white/50 shadow-lg cursor-pointer transition-all duration-300 hover:shadow-2xl transform hover:scale-[1.02] backdrop-blur-xl ${ - index === currentSlide ? "ring-2 ring-[#2BACBE] bg-blue-50/20" : "" + index === currentSlide ? "ring-2 ring-[#2BACBE] bg-cyan-50/20" : "" }`} >
-
+
{index + 1}
-
- {index < currentSlide ? "✅" : index === currentSlide ? "▶️" : "⏳"} -
+
-

{exercise.name}

+

{exercise.name}

{exercise.description}

-
- - 💪 - - {exercise.sets} × {exercise.reps} - - - - ⏱️ - {exercise.duration} - - - 🔥 - {exercise.calories} кал - -
+
diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index f1fb41e..c28a21a 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -70,7 +70,7 @@ export default function Home() { { value: "3", label: "Курса", - color: "from-blue-400 to-cyan-500", + color: "from-cyan-400 to-cyan-500", svg: (