diff --git a/Frontend/package-lock.json b/Frontend/package-lock.json index deae757..a4805d6 100644 --- a/Frontend/package-lock.json +++ b/Frontend/package-lock.json @@ -28,7 +28,7 @@ "clsx": "^2.1.1", "date-fns": "^4.1.0", "dotenv": "^16.4.7", - "framer-motion": "^12.5.0", + "framer-motion": "^12.23.6", "lucide-react": "^0.477.0", "react": "^19.0.0", "react-day-picker": "^8.10.1", @@ -4365,13 +4365,12 @@ } }, "node_modules/framer-motion": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.6.0.tgz", - "integrity": "sha512-91XLZ3VwDlXe9u2ABhTzYBiFQ/qdoiqyTiTCQDDJ4es5/5lzp76hdB+WG7gcNklcQlOmfDZQqVO48tqzY9Z/bQ==", - "license": "MIT", + "version": "12.23.6", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.23.6.tgz", + "integrity": "sha512-dsJ389QImVE3lQvM8Mnk99/j8tiZDM/7706PCqvkQ8sSCnpmWxsgX+g0lj7r5OBVL0U36pIecCTBoIWcM2RuKw==", "dependencies": { - "motion-dom": "^12.6.0", - "motion-utils": "^12.5.0", + "motion-dom": "^12.23.6", + "motion-utils": "^12.23.6", "tslib": "^2.4.0" }, "peerDependencies": { @@ -5122,19 +5121,17 @@ } }, "node_modules/motion-dom": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.6.0.tgz", - "integrity": "sha512-1s/+/V0ny/gfhocSSf0qhkspZK2da7jrwGw7xHzgiQPcimdHaPRcRCoJ3OxEZYBNzy3ma1ERUD+eUStk6a9pQw==", - "license": "MIT", + "version": "12.23.6", + "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.23.6.tgz", + "integrity": "sha512-G2w6Nw7ZOVSzcQmsdLc0doMe64O/Sbuc2bVAbgMz6oP/6/pRStKRiVRV4bQfHp5AHYAKEGhEdVHTM+R3FDgi5w==", "dependencies": { - "motion-utils": "^12.5.0" + "motion-utils": "^12.23.6" } }, "node_modules/motion-utils": { - "version": "12.5.0", - "resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-12.5.0.tgz", - "integrity": "sha512-+hFFzvimn0sBMP9iPxBa9OtRX35ZQ3py0UHnb8U29VD+d8lQ8zH3dTygJWqK7av2v6yhg7scj9iZuvTS0f4+SA==", - "license": "MIT" + "version": "12.23.6", + "resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-12.23.6.tgz", + "integrity": "sha512-eAWoPgr4eFEOFfg2WjIsMoqJTW6Z8MTUCgn/GZ3VRpClWBdnbjryiA3ZSNLyxCTmCQx4RmYX6jX1iWHbenUPNQ==" }, "node_modules/ms": { "version": "2.1.3", diff --git a/Frontend/package.json b/Frontend/package.json index 1f4ad6f..b0e598b 100644 --- a/Frontend/package.json +++ b/Frontend/package.json @@ -30,7 +30,7 @@ "clsx": "^2.1.1", "date-fns": "^4.1.0", "dotenv": "^16.4.7", - "framer-motion": "^12.5.0", + "framer-motion": "^12.23.6", "lucide-react": "^0.477.0", "react": "^19.0.0", "react-day-picker": "^8.10.1", diff --git a/Frontend/src/components/TiltedCard.tsx b/Frontend/src/components/TiltedCard.tsx new file mode 100644 index 0000000..e9dd141 --- /dev/null +++ b/Frontend/src/components/TiltedCard.tsx @@ -0,0 +1,56 @@ +import { ReactNode, useRef } from "react"; +import { motion, useMotionValue, useSpring, useTransform } from "framer-motion"; + +interface TiltedCardProps { + children: ReactNode; + className?: string; +} + +const TiltedCard = ({ children, className = "" }: TiltedCardProps) => { + const ref = useRef(null); + const x = useMotionValue(0); + const y = useMotionValue(0); + + const rotateX = useTransform(y, [-0.5, 0.5], [8, -8]); + const rotateY = useTransform(x, [-0.5, 0.5], [-8, 8]); + + const springX = useSpring(rotateX, { stiffness: 100, damping: 10 }); + const springY = useSpring(rotateY, { stiffness: 100, damping: 10 }); + + const handleMouseMove = (e: React.MouseEvent) => { + const rect = ref.current?.getBoundingClientRect(); + if (!rect) return; + + const offsetX = e.clientX - rect.left; + const offsetY = e.clientY - rect.top; + + const dx = offsetX / rect.width - 0.5; + const dy = offsetY / rect.height - 0.5; + + x.set(dx); + y.set(dy); + }; + + const handleMouseLeave = () => { + x.set(0); + y.set(0); + }; + + return ( + + {children} + + ); +}; + +export default TiltedCard; diff --git a/Frontend/src/pages/HomePage.tsx b/Frontend/src/pages/HomePage.tsx index 011641d..8fd79d9 100644 --- a/Frontend/src/pages/HomePage.tsx +++ b/Frontend/src/pages/HomePage.tsx @@ -1,4 +1,5 @@ import { useEffect, useRef, useState } from "react"; +import TiltedCard from '../components/TiltedCard'; // adjust the path if needed import { Link } from "react-router-dom"; import { ArrowRight, @@ -333,47 +334,111 @@ function TrendingNichesSection() { ); } - +{/* Edited the cards for "why choose inpact ai? " */} +{/* added under glow and 28 tiled hover effect*/} function WhyChooseSection() { return ( -
-
-

Why Choose Inpact AI?

-

- Powerful tools for both brands and creators to connect, collaborate, and grow. -

-
- {/* Brands Column */} -
-
- - For Brands -
-
    -
  • AI-driven creator matching for your campaigns
  • -
  • Real-time performance analytics & ROI tracking
  • -
  • Smart pricing & budget optimization
  • -
  • Streamlined communication & contract management
  • -
-
- {/* Creators Column */} -
-
- - For Creators -
-
    -
  • Get discovered by top brands in your niche
  • -
  • Fair sponsorship deals & transparent payments
  • -
  • AI-powered content & contract assistant
  • -
  • Grow your audience & track your impact
  • -
+
+
+

+ Why Choose Inpact AI? +

+

+ Powerful tools for both brands and creators to connect, collaborate, and grow. +

+ +
+ {/* Tilted Card for Brands */} + +
+ + {/* Under Glow */} +
+ + {/* Content */} +
+ + For Brands +
+
    +
  • + + AI-driven creator matching for your campaigns +
  • +
  • + + Real-time performance analytics & ROI tracking +
  • +
  • + + Smart pricing & budget optimization +
  • +
  • + + Streamlined communication & contract management +
  • +
+
+ + + {/* Tilted Card for Creators */} + +
+ + {/* Under Glow */} +
+ + {/* Content */} +
+ + For Creators +
+
    +
  • + + Get discovered by top brands in your niche +
  • +
  • + + Fair sponsorship deals & transparent payments +
  • +
  • + + AI-powered content & contract assistant +
  • +
  • + + Grow your audience & track your impact +
  • +
+
+
-
-
+
); } +{/* Edited the cards for "why choose inpact ai? " */} export default function HomePage() { const { isAuthenticated, user } = useAuth(); @@ -896,42 +961,44 @@ export default function HomePage() { {/* Footer */} + {/* Changed the footer all text with glow elements , for proper visibility------- By Praneet " */} + ); -} \ No newline at end of file +} diff --git a/Frontend/tsconfig.json b/Frontend/tsconfig.json index fec8c8e..a8d3cb5 100644 --- a/Frontend/tsconfig.json +++ b/Frontend/tsconfig.json @@ -7,7 +7,7 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "@/*": ["./src/*"] + "@/*": ["src/*"] } } }