Skip to content

Commit

Permalink
added scroll animations in the website
Browse files Browse the repository at this point in the history
  • Loading branch information
yashi-15 committed May 20, 2024
1 parent beb354d commit a658a85
Show file tree
Hide file tree
Showing 13 changed files with 239 additions and 2 deletions.
194 changes: 194 additions & 0 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@emotion/react": "^11.11.4",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-awesome-reveal": "^4.2.11",
"react-dom": "^18.2.0",
"react-icons": "^5.0.1",
"react-router-dom": "^6.16.0",
Expand Down
5 changes: 5 additions & 0 deletions src/Components/CartItems/CartItems.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import "./CartItems.css";
import { ShopContext } from "../../Context/ShopContext";
import remove_icon from "../Assets/cart_cross_icon.png";
import placeholder_image from "../Assets/empty-cart.png";
import { Fade } from "react-awesome-reveal";

const CartItems = () => {
const { cartItems, removeFromCart, getTotalCartAmount, theme } =
Expand All @@ -19,14 +20,17 @@ const CartItems = () => {
return (
<div className="cartitems">
<div className={`cartitems-format-main ci_${theme}`}>
<Fade direction="down">
<p>Products</p>
<p>Title</p>
<p>Price</p>
<p>Size</p>
<p>Quantity</p>
<p>Total</p>
<p>Remove</p>
</Fade>
</div>
<Fade>
{isEmptyCart && (
<div className="empty-cart">
<img
Expand Down Expand Up @@ -105,6 +109,7 @@ const CartItems = () => {
</div>
</div>
</div>
</Fade>
</div>
);
};
Expand Down
5 changes: 5 additions & 0 deletions src/Components/Footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import pintester_icon from "../Assets/pintester_icon.png";
import whatsapp_icon from "../Assets/whatsapp_icon.png";
import { Link } from "react-router-dom";
import { ShopContext } from "../../Context/ShopContext";
import { Fade } from "react-awesome-reveal";

const Footer = () => {
const { theme } = useContext(ShopContext);
return (
<div className="footer">
<Fade delay={3}>
<div className="footer-logo">
<img src={footer_logo} alt="" />
<p className={`footer_${theme}`}>ShopNex</p>
Expand Down Expand Up @@ -45,8 +47,11 @@ const Footer = () => {
</div>
<div className={`footer-copyright_${theme}`}>
<hr className={`hr_${theme}`} />
<Fade direction="up">
<p>Copyright @ {new Date().getFullYear()} - All Rights Reserved</p>
</Fade>
</div>
</Fade>
</div>
);
};
Expand Down
9 changes: 9 additions & 0 deletions src/Components/Hero/Hero.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,39 @@ import arrow_icon from "../Assets/arrow.png";
import hero_image from "../Assets/hero_image.png";
import { ShopContext } from "../../Context/ShopContext";
import { Link } from "react-router-dom";
import { Fade, Slide } from "react-awesome-reveal";

const Hero = () => {
const { theme } = useContext(ShopContext);
return (
<div className={"hero_" + theme}>
<div className="hero-left">
<Fade direction="down">
<h2 className={"h2h_" + theme}>NEW ARRIVALS ONLY</h2>
</Fade>
<div>
<Fade>
<div className="hero-hand-icon">
<p className={"ph_" + theme}>New</p>
<img src={hand_icon} alt="" />
</div>
<p className={"ph_" + theme}>Collections</p>
<p className={"ph_" + theme}>For Everyone</p>
</Fade>
</div>
<Link className="link" to={"/collections"}>
<Slide direction="up">
<div className="hero-latest-btn">
<div className={"div_" + theme}>Latest Collection</div>
<img src={arrow_icon} alt="" />
</div>
</Slide>
</Link>
</div>
<div className="hero-right">
<Fade>
<img src={hero_image} alt="" />
</Fade>
</div>
</div>
);
Expand Down
3 changes: 3 additions & 0 deletions src/Components/Item/Item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import React, { useContext } from 'react'
import './Item.css'
import { Link } from 'react-router-dom'
import { ShopContext } from '../../Context/ShopContext'
import { Fade } from "react-awesome-reveal";

const Item = (props) => {
const {theme}=useContext(ShopContext);
return (
<Fade>
<div className='item'>
<Link to={`/product/${props.id}`}> <img onClick={window.scrollTo(0,0)} src={props.image} alt="" /></Link>
<p className={`pit_${theme}`}>{props.name}</p><p className={`pit_${theme}`}>{props.id}</p>
Expand All @@ -14,6 +16,7 @@ const Item = (props) => {
<div className={`item-price-old_${theme}`}>${props.old_price}</div>
</div>
</div>
</Fade>
)
}

Expand Down
Loading

0 comments on commit a658a85

Please sign in to comment.