Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve UI interactivity on home page with responsive animations #138 #153

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions eduaid_web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 28 additions & 11 deletions eduaid_web/src/pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,25 @@ import starsImg from "../assets/stars.png";
import arrow from "../assets/arrow.png";
import gitStar from "../assets/gitStar.png";
import { FaGithub } from "react-icons/fa";
import {motion} from 'framer-motion'

const Home = () => {

const variants = {
initial: {
opacity: 0,
x: '100%'
},
animate: {
opacity: 1,
x: 0,
transition:{
duration: 0.5,
ease: 'easeInOut',
staggerChildren: 0.3
}
}
}
const [stars, setStars] = useState(null);
const [error, setError] = useState("");

Expand Down Expand Up @@ -68,28 +85,28 @@ const Home = () => {
<img src={starsImg} width={32} height={12} alt="" />
</div>
</div>
<div className="flex flex-col items-end">
<div className="my-6">
<motion.div className="flex flex-col items-end" variants={variants} initial='initial' animate='animate'>
<motion.div className="my-6" variants={variants} whileHover={{scale:1.1}}>
<div className="flex items-center rounded-l-2xl w-fit px-6 py-3 bg-gradient-to-r from-[#FF005C] via-[#7600F2] to-[#00CBE7] justify-center gap-4">
<img src={starsImg} width={32} height={16} alt="" />
<div className="text-white text-xl">Doc/Audio Input</div>
<div className="text-white text-xl" >Doc/Audio Input</div>
</div>
</div>
<div className="my-4">
</motion.div>
<motion.div className="my-4" variants={variants} whileHover={{scale:1.1}}>
<div className="flex items-center rounded-l-2xl w-fit px-6 py-3 bg-gradient-to-r from-[#FF005C] via-[#7600F2] to-[#00CBE7] justify-center gap-4">
<img src={starsImg} width={32} height={16} alt="" />
<div className="text-white text-xl">In-depth questions gen</div>
<div className="text-white text-xl" >In-depth questions gen</div>
</div>
</div>
<div className="my-4">
</motion.div>
<motion.div className="my-4" variants={variants} whileHover={{scale:1.1}}>
<div className="flex items-center rounded-l-2xl w-fit px-6 py-3 bg-gradient-to-r from-[#FF005C] via-[#7600F2] to-[#00CBE7] justify-center gap-4">
<img src={starsImg} width={32} height={16} alt="" />
<div className="text-white text-xl">
<div className="text-white text-xl" >
Dynamic Google Form Integration
</div>
</div>
</div>
</div>
</motion.div>
</motion.div>
<div className="flex justify-center gap-6">
<div className="mt-8 rounded-2xl">
<a href="question-type">
Expand Down