-
+
{image.headline}
-
+
{image.body}
diff --git a/package-lock.json b/package-lock.json
index f7e6e41..3b922d6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12,6 +12,7 @@
"@prisma/client": "^4.12.0",
"@reduxjs/toolkit": "^1.9.3",
"@stripe/stripe-js": "^1.52.1",
+ "aos": "^2.3.4",
"axios": "^1.4.0",
"date-fns": "^2.30.0",
"eslint": "8.37.0",
@@ -24,6 +25,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-icons": "^4.8.0",
+ "react-parallax": "^3.5.1",
"react-redux": "^8.0.5",
"react-responsive-carousel": "^3.2.23",
"react-toastify": "^9.1.2",
@@ -631,6 +633,16 @@
"node": ">= 8"
}
},
+ "node_modules/aos": {
+ "version": "2.3.4",
+ "resolved": "https://registry.npmjs.org/aos/-/aos-2.3.4.tgz",
+ "integrity": "sha512-zh/ahtR2yME4I51z8IttIt4lC1Nw0ktsFtmeDzID1m9naJnWXhCoARaCgNOGXb5CLy3zm+wqmRAEgMYB5E2HUw==",
+ "dependencies": {
+ "classlist-polyfill": "^1.0.3",
+ "lodash.debounce": "^4.0.6",
+ "lodash.throttle": "^4.0.1"
+ }
+ },
"node_modules/arg": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
@@ -997,6 +1009,11 @@
"node": ">= 6"
}
},
+ "node_modules/classlist-polyfill": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/classlist-polyfill/-/classlist-polyfill-1.2.0.tgz",
+ "integrity": "sha512-GzIjNdcEtH4ieA2S8NmrSxv7DfEV5fmixQeyTmqmRmRJPGpRBaSnA2a0VrCjyT8iW8JjEdMbKzDotAJf+ajgaQ=="
+ },
"node_modules/classnames": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz",
@@ -2778,11 +2795,21 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/lodash.debounce": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
+ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow=="
+ },
"node_modules/lodash.merge": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="
},
+ "node_modules/lodash.throttle": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz",
+ "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ=="
+ },
"node_modules/loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
@@ -3639,6 +3666,15 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
},
+ "node_modules/react-parallax": {
+ "version": "3.5.1",
+ "resolved": "https://registry.npmjs.org/react-parallax/-/react-parallax-3.5.1.tgz",
+ "integrity": "sha512-p5zPsPsqELlIOGaPS01O0IRx8R2bxcBAtrdF/RHf9nIxxk5hijbM2y89tk4rJQBcNH6ESSLe7J2NV4/ms7FLFw==",
+ "peerDependencies": {
+ "react": "16.x.x || 17.x.x || 18.x.x",
+ "react-dom": "16.x.x || 17.x.x || 18.x.x"
+ }
+ },
"node_modules/react-redux": {
"version": "8.0.5",
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.0.5.tgz",
diff --git a/package.json b/package.json
index a41ad8c..3047768 100644
--- a/package.json
+++ b/package.json
@@ -13,6 +13,7 @@
"@prisma/client": "^4.12.0",
"@reduxjs/toolkit": "^1.9.3",
"@stripe/stripe-js": "^1.52.1",
+ "aos": "^2.3.4",
"axios": "^1.4.0",
"date-fns": "^2.30.0",
"eslint": "8.37.0",
@@ -25,6 +26,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-icons": "^4.8.0",
+ "react-parallax": "^3.5.1",
"react-redux": "^8.0.5",
"react-responsive-carousel": "^3.2.23",
"react-toastify": "^9.1.2",
diff --git a/pages/about.js b/pages/about.js
index 97b2d28..173b091 100644
--- a/pages/about.js
+++ b/pages/about.js
@@ -1,6 +1,7 @@
import { ImageAbout } from "@/components/ImageAbout";
import LogoItemForAbout from "@/components/LogoItemForAbout";
import Image from "next/image";
+import { Parallax } from "react-parallax";
const AboutPage = () => {
const logos = [
@@ -39,24 +40,17 @@ const AboutPage = () => {
return (
-
- "https://images.pexels.com/photos/242829/pexels-photo-242829.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1"
- }
- src={
- "https://images.pexels.com/photos/242829/pexels-photo-242829.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1"
- }
- width={50}
- height={25}
- alt={"Man Riding on Motorcycle"}
- className="w-full h-[48rem] object-cover brightness-50"
- />
-
-
- About Euphoria
-
+
+
+
diff --git a/pages/contact.js b/pages/contact.js
index e627fb7..2308e59 100644
--- a/pages/contact.js
+++ b/pages/contact.js
@@ -47,7 +47,7 @@ const ContactPage = () => {
};
return (
-
+
Contact Us
diff --git a/pages/index.js b/pages/index.js
index 324d2fe..d77c020 100644
--- a/pages/index.js
+++ b/pages/index.js
@@ -19,10 +19,10 @@ const HomePage = ({ products }) => {
);
diff --git a/pages/products/[productId].js b/pages/products/[productId].js
index 8c99a55..ce13201 100644
--- a/pages/products/[productId].js
+++ b/pages/products/[productId].js
@@ -1,12 +1,18 @@
-import { useCallback, useState } from "react";
+import { useCallback, useState, useEffect } from "react";
import { getProduct } from "@/prisma/products";
import { addToCart } from "@/store/productSlice";
import { useDispatch } from "react-redux";
import { formatCurrency } from "@/utils/formatCurrency";
import Image from "next/image";
import Link from "next/link";
+import AOS from "aos";
+import "aos/dist/aos.css";
const ProductDetails = ({ product }) => {
+ useEffect(() => {
+ AOS.init();
+ }, []);
+
const [quantity, setQuantity] = useState(1);
const handleDecrease = useCallback(() => {
@@ -20,55 +26,74 @@ const ProductDetails = ({ product }) => {
const dispatch = useDispatch();
return (
-
-
product.imageUrl}
- src={product.imageUrl}
- width={500}
- height={500}
- alt={product.title}
- className="w-full h-full object-cover"
- />
+
+
+
product.imageUrl}
+ src={product.imageUrl}
+ width={500}
+ height={500}
+ alt={product.title}
+ className="w-full h-full object-cover"
+ />
-
-
- {product.category}
-
-
{product.title}
-
-
- {formatCurrency(product.price * quantity)}
-
-
-
-
- {quantity}
-
-
+
+
+ {product.category}
+
+
+ {product.title}
+
+
+
+ {formatCurrency(product.price * quantity)}
+
+
+
+
+ {quantity}
+
+
+
+
+
dispatch(addToCart({ ...product, quantity }))}
+ href="/cart"
+ className="bg-cyan-500 text-center py-3 text-white text-xl font-medium hover:bg-cyan-600 duration-300 mt-5"
+ data-aos="zoom-in"
+ data-aos-duration="1000"
+ data-aos-delay="800"
+ >
+ Add to Cart
+
+
+
Description:
+
{product.description}
-
-
dispatch(addToCart({ ...product, quantity }))}
- href="/cart"
- className="bg-cyan-500 text-center py-3 text-white text-xl font-medium hover:bg-cyan-600 duration-300 mt-5"
- >
- Add to Cart
-
-
-
Description:
-
{product.description}
diff --git a/pages/products/index.js b/pages/products/index.js
index 94ee3bb..78d740e 100644
--- a/pages/products/index.js
+++ b/pages/products/index.js
@@ -1,15 +1,17 @@
import ProductItem from "@/components/ProductItem";
import { getAllProducts } from "@/prisma/products";
-const ProductsPage = ({ products }) => {
+const ProductsPage = ({ products, isAddedInHomepage }) => {
+ const marginClass = `${isAddedInHomepage ? "mt-20" : "mt-40"}`;
return (
-
-
Browse all products
-
-
- {products.map((product) => (
-
- ))}
+
+
+
Browse all products
+
+ {products.map((product) => (
+
+ ))}
+
);
diff --git a/pages/products/men.js b/pages/products/men.js
index d6f1dcc..fb8d28a 100644
--- a/pages/products/men.js
+++ b/pages/products/men.js
@@ -1,15 +1,18 @@
import ProductItem from "@/components/ProductItem";
import { getAllProducts } from "@/prisma/products";
-const MenProductsPage = ({ products }) => {
+const MenProductsPage = ({ products, isAddedInHomepage }) => {
+ const marginClass = `${isAddedInHomepage ? "mt-20" : "mt-40"}`;
return (
-
-
Browse all mens wear
+
+
+
Browse all mens wear
-
- {products.map((product) => (
-
- ))}
+
+ {products.map((product) => (
+
+ ))}
+
);
diff --git a/pages/products/women.js b/pages/products/women.js
index 9aa5123..31bf7e4 100644
--- a/pages/products/women.js
+++ b/pages/products/women.js
@@ -1,15 +1,18 @@
import ProductItem from "@/components/ProductItem";
import { getAllProducts } from "@/prisma/products";
-const WomenProductsPage = ({ products }) => {
+const WomenProductsPage = ({ products, isAddedInHomepage }) => {
+ const marginClass = `${isAddedInHomepage ? "mt-20" : "mt-40"}`;
return (
-
-
Browse all womens wear
+
+
+
Browse all womens wear
-
- {products.map((product) => (
-
- ))}
+
+ {products.map((product) => (
+
+ ))}
+
);