diff --git a/frontend/src/css/_app.css b/frontend/src/css/_app.css index affc655..36bd4a9 100644 --- a/frontend/src/css/_app.css +++ b/frontend/src/css/_app.css @@ -30,3 +30,22 @@ li.stack-item:not(:last-child):after { .main-navbar, .app-sidebar-brand { box-shadow: 0px -1px 40px rgba(112, 144, 176, 0.2); } + +@keyframes blob { + 0% { transform: translate(0px, 0px) scale(1); } + 33% { transform: translate(30px, -50px) scale(1.1); } + 66% { transform: translate(-20px, 20px) scale(0.9); } + 100% { transform: translate(0px, 0px) scale(1); } +} + +.animate-blob { + animation: blob 7s infinite; +} + +.animation-delay-2000 { + animation-delay: 2s; +} + +.animation-delay-4000 { + animation-delay: 4s; +} \ No newline at end of file diff --git a/frontend/src/pages/index.tsx b/frontend/src/pages/index.tsx index cba7592..c2f84ed 100644 --- a/frontend/src/pages/index.tsx +++ b/frontend/src/pages/index.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react'; +import React, { useEffect, useState } from 'react'; import type { ReactElement } from 'react'; import Head from 'next/head'; import Link from 'next/link'; @@ -13,11 +13,21 @@ import { fetch as fetchCourses } from '../stores/courses/coursesSlice'; export default function Starter() { const dispatch = useAppDispatch(); const { courses, loading } = useAppSelector((state) => state.courses); + const [scrollY, setScrollY] = useState(0); useEffect(() => { dispatch(fetchCourses({ query: '?published=true&limit=6' })); }, [dispatch]); + useEffect(() => { + const handleScroll = () => { + setScrollY(window.scrollY); + }; + + window.addEventListener('scroll', handleScroll, { passive: true }); + return () => window.removeEventListener('scroll', handleScroll); + }, []); + const title = 'EduFlow LMS'; const features = [ @@ -46,17 +56,28 @@ export default function Starter() { }; return ( -
+
{getPageTitle('Home')} {/* Hero Section */}
+ {/* Animated Background Blobs */} +
+
+
+
+
+
+
-
+

Unlock Your Potential with EduFlow

@@ -68,39 +89,55 @@ export default function Starter() { href="/register" label="Start Learning Now" color="white" - className="px-8 py-3 font-bold rounded-full shadow-lg" + className="px-8 py-3 font-bold rounded-full shadow-lg transform transition hover:scale-105" />
-
-
+
+
Learning
+ + {/* Floating elements for parallax */} +
+
{/* Features Section */} -
+

Why Choose EduFlow?

{features.map((feature, idx) => ( -
+
@@ -132,7 +169,7 @@ export default function Starter() {
{courses && courses.length > 0 ? ( courses.map((course: any, idx: number) => ( -
+
{page}; -}; \ No newline at end of file +};