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

Added Fade Up animation for contributors page and Bog Page #500

Open
wants to merge 1 commit into
base: dev
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
30 changes: 30 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"bootstrap": "^4.6.2",
"custom-react-inner-image-zoom": "^3.0.6",
"firebase": "^9.23.0",
"framer-motion": "^11.3.18",
"leaflet": "^1.9.4",
"nanoid": "^5.0.7",
"otp-input-react": "^0.3.0",
Expand Down
17 changes: 16 additions & 1 deletion src/pages/Contributors/Contributors.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ import React, { useEffect, useState } from 'react';
import './style.css';
import axios from 'axios';
import { Card, CardContent, CardMedia, Grid, Typography } from '@mui/material';
import { color, motion } from "framer-motion";

function Contributors() {
const [contributors, setContributors] = useState([]);

const eventVariants = {
hidden: { opacity: 0, y: 40 },
visible: { opacity: 1, y: 0 },
};
useEffect(() => {
window.scrollTo(0, 0);
async function fetchContributors() {
Expand All @@ -27,6 +31,16 @@ function Contributors() {
<h1 className="contributor-text">Our Contributors</h1>
<Grid className="container-grid">
{contributors.map((contributor) => (
<motion.div
initial="hidden"
whileInView="visible"
// whileHover={{ scale: 1.10 }}
viewport={{ once: true }}
variants={eventVariants}
transition={{ duration: 0.9, ease: "easeInOut" }}


>
<Grid item key={contributor.id}>
<Card className="card">
<a
Expand Down Expand Up @@ -70,6 +84,7 @@ function Contributors() {
</CardContent>
</Card>
</Grid>
</motion.div>
))}
</Grid>
</div>
Expand Down
16 changes: 16 additions & 0 deletions src/pages/blog/blog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ import { categories, blogs } from './data';
import { ArrowRightAltRounded } from '@mui/icons-material';
import Slider from 'react-slick';
import { MyContext } from '../../App';
import { color, motion } from "framer-motion";

function Blog() {
const eventVariants = {
hidden: { opacity: 0, y: 40 },
visible: { opacity: 1, y: 0 },
};
return (
<>
<section class="top">
Expand All @@ -20,11 +25,22 @@ function Blog() {
/>
{categories.map((cat) => {
return (
<motion.div
initial="hidden"
whileInView="visible"
// whileHover={{ scale: 1.10 }}
viewport={{ once: true }}
variants={eventVariants}
transition={{ duration: 0.5, ease: "easeInOut" }}


>
<StoriesList
title={cat.name}
categoryId={cat.id}
list={blogs.filter((blog) => blog.category === cat.id).slice(0, 4)}
/>
</motion.div>
);
})}
</>
Expand Down