diff --git a/src/components/Homepage/AnimatedGIF.tsx b/src/components/Homepage/AnimatedGIF.tsx new file mode 100644 index 000000000..76ae98072 --- /dev/null +++ b/src/components/Homepage/AnimatedGIF.tsx @@ -0,0 +1,18 @@ +import React from "react"; + +const AnimatedGIF = ({ srcs, alts }) => { + return ( +
+ {srcs.map((src, index) => { + const isMP4 = src.endsWith('.mp4'); + return isMP4 ? ( +
+ ); +}; + +export default AnimatedGIF; diff --git a/src/components/Homepage/HeroSection.tsx b/src/components/Homepage/HeroSection.tsx index c358016ed..96f4a9d25 100644 --- a/src/components/Homepage/HeroSection.tsx +++ b/src/components/Homepage/HeroSection.tsx @@ -1,8 +1,10 @@ import React from "react"; -import Link from "@docusaurus/Link"; import { FaGithub, FaArrowRight } from "react-icons/fa"; +import AnimatedGIF from "./AnimatedGIF"; +import mainGif from "./assets/main.gif"; -const HeroSection: React.FC = () => { + +const HeroSection = () => { return (
@@ -14,18 +16,22 @@ const HeroSection: React.FC = () => { understanding from the basics to advanced topics.

- Explore Algorithms - - + View on GitHub - + +
+
+
+
@@ -38,4 +44,4 @@ const HeroSection: React.FC = () => { ); }; -export default HeroSection; +export default HeroSection; \ No newline at end of file diff --git a/src/components/Homepage/assets/main.gif b/src/components/Homepage/assets/main.gif new file mode 100644 index 000000000..e17485ebf Binary files /dev/null and b/src/components/Homepage/assets/main.gif differ diff --git a/src/components/Homepage/assets/main.mp4 b/src/components/Homepage/assets/main.mp4 new file mode 100644 index 000000000..2fe8021dd Binary files /dev/null and b/src/components/Homepage/assets/main.mp4 differ