diff --git a/.github/workflows/auto-comment.yml b/.github/workflows/auto-comment.yml new file mode 100644 index 0000000..11d42c5 --- /dev/null +++ b/.github/workflows/auto-comment.yml @@ -0,0 +1,75 @@ +name: Automate Issue and PR Responses + +on: + issues: + types: + - opened + - closed + pull_request: + types: + - opened + - closed + +jobs: + respond-to-events: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Respond to new issues + - name: Respond to new issues + if: ${{ github.event_name == 'issues' && github.event.action == 'opened' }} + run: | + echo "Hey @${{ github.actor }}, Welcome to 💖coffeeShop! 🎊" > comment.txt + echo "Thanks for opening an issue! 🙌 Please wait for the issue to be assigned." >> comment.txt + echo "Happy Coding!! ✨" >> comment.txt + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: peter-evans/create-or-update-comment@v3 + with: + issue-number: ${{ github.event.issue.number }} + body-path: comment.txt + + # Respond to closed issues + - name: Respond to closed issues + if: ${{ github.event_name == 'issues' && github.event.action == 'closed' }} + run: | + echo "Hello @${{ github.event.issue.user.login }}! Your issue #${{ github.event.issue.number }} has been closed." > comment.txt + echo "Thank you for your contribution to 💖coffeeShop!!! 🙌" >> comment.txt + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: peter-evans/create-or-update-comment@v3 + with: + issue-number: ${{ github.event.issue.number }} + body-path: comment.txt + + # Respond to new PRs + - name: Respond to new PRs + if: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }} + run: | + echo "Hey @${{ github.actor }}, Welcome to 💖coffeeShop 🎊" > comment.txt + echo "Thanks for your contribution! Your effort makes this project better. Keep it up! 🙌" >> comment.txt + echo "Please wait for the PR to be reviewed." >> comment.txt + echo "Happy Coding!! ✨" >> comment.txt + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: peter-evans/create-or-update-comment@v3 + with: + issue-number: ${{ github.event.pull_request.number }} + body-path: comment.txt + + # Respond to merged PRs + - name: Respond to merged PRs + if: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged }} + run: | + echo "@${{ github.event.pull_request.user.login }} Congrats, Your pull request has been successfully merged 🥳🎉" > comment.txt + echo "Thank you for your contribution to 💖coffeeShop!!" >> comment.txt + echo "Happy coding 🎊, Keep Contributing 🙌 !!!" >> comment.txt + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: peter-evans/create-or-update-comment@v3 + with: + issue-number: ${{ github.event.pull_request.number }} + body-path: comment.txt diff --git a/package-lock.json b/package-lock.json index 873ade6..c57441a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,7 @@ "@emotion/styled": "^11.14.0", "@eslint/config-array": "^0.19.1", "@eslint/object-schema": "^2.1.5", + "@fortawesome/fontawesome-free": "^6.7.2", "@headlessui/react": "^2.1.8", "@heroicons/react": "^2.1.5", "@jridgewell/sourcemap-codec": "^1.5.0", @@ -41,6 +42,7 @@ "openai": "^4.78.0", "react": "^18.3.1", "react-dom": "^18.3.1", + "react-icons": "^5.4.0", "react-locomotive-scroll": "^0.2.2", "react-redux": "^9.1.2", "react-router-dom": "^6.26.2", @@ -2622,6 +2624,14 @@ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.9.tgz", "integrity": "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==" }, + "node_modules/@fortawesome/fontawesome-free": { + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.7.2.tgz", + "integrity": "sha512-JUOtgFW6k9u4Y+xeIaEiLr3+cjoUPiAuLXoyKOJSia6Duzb7pq+A76P9ZdPDoAoxHdHzq6gE9/jKBGXlZT8FbA==", + "engines": { + "node": ">=6" + } + }, "node_modules/@headlessui/react": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-2.2.0.tgz", @@ -16356,6 +16366,14 @@ "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.11.tgz", "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==" }, + "node_modules/react-icons": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.4.0.tgz", + "integrity": "sha512-7eltJxgVt7X64oHh6wSWNwwbKTCtMfK35hcjvJS0yxEAhPM8oUKdS3+kqaW1vicIltw+kR2unHaa12S9pPALoQ==", + "peerDependencies": { + "react": "*" + } + }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -22185,6 +22203,11 @@ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.9.tgz", "integrity": "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==" }, + "@fortawesome/fontawesome-free": { + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.7.2.tgz", + "integrity": "sha512-JUOtgFW6k9u4Y+xeIaEiLr3+cjoUPiAuLXoyKOJSia6Duzb7pq+A76P9ZdPDoAoxHdHzq6gE9/jKBGXlZT8FbA==" + }, "@headlessui/react": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-2.2.0.tgz", @@ -31926,6 +31949,12 @@ "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.11.tgz", "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==" }, + "react-icons": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.4.0.tgz", + "integrity": "sha512-7eltJxgVt7X64oHh6wSWNwwbKTCtMfK35hcjvJS0yxEAhPM8oUKdS3+kqaW1vicIltw+kR2unHaa12S9pPALoQ==", + "requires": {} + }, "react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", diff --git a/package.json b/package.json index a90c085..5ff7236 100644 --- a/package.json +++ b/package.json @@ -12,14 +12,12 @@ "@babel/plugin-transform-private-property-in-object": "^7.25.9", "@babel/preset-env": "^7.26.0", "@babel/preset-react": "^7.26.3", - - "@dotlottie/react-player": "^1.6.19", - "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.0", "@eslint/config-array": "^0.19.1", "@eslint/object-schema": "^2.1.5", + "@fortawesome/fontawesome-free": "^6.7.2", "@headlessui/react": "^2.1.8", "@heroicons/react": "^2.1.5", "@jridgewell/sourcemap-codec": "^1.5.0", @@ -36,11 +34,10 @@ "glob": "^11.0.0", "gsap": "^3.12.5", "lottie-react": "^2.4.0", - "openai": "^4.78.0", - "react": "^18.3.1", "react-dom": "^18.3.1", + "react-icons": "^5.4.0", "react-locomotive-scroll": "^0.2.2", "react-redux": "^9.1.2", "react-router-dom": "^6.26.2", diff --git a/src/Pages/Faq.js b/src/Pages/Faq.js index 1a0eae0..38dc287 100644 --- a/src/Pages/Faq.js +++ b/src/Pages/Faq.js @@ -1,6 +1,7 @@ -import React from 'react'; -import styled from 'styled-components'; -import { motion } from 'framer-motion'; +import React, { useState } from "react"; +import styled from "styled-components"; +import { motion } from "framer-motion"; +import { FaChevronDown, FaChevronUp } from "react-icons/fa"; // Importing arrows from react-icons const FAQContainer = styled.div` padding: 6rem 2rem 4rem 2rem; @@ -15,7 +16,7 @@ const FAQHeading = styled(motion.h1)` margin-bottom: 2rem; text-align: center; color: #78350f; - font-family: 'Playfair Display', serif; + font-family: "Playfair Display", serif; display: flex; flex-wrap: wrap; flex-direction: column; @@ -54,7 +55,7 @@ const FAQItem = styled(motion.div)` &:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2); - background-color:rgb(241, 224, 198)/* Coffee color */ + background-color: rgb(241, 224, 198); /* Coffee color */ } `; @@ -62,22 +63,44 @@ const Question = styled(motion.h3)` font-size: 1.5rem; margin-bottom: 1rem; color: #78350f; - font-family: 'Playfair Display', serif; + font-family: "Playfair Display", serif; cursor: pointer; font-weight: 550; + display: flex; + align-items: center; /* Aligns text and arrow horizontally */ + justify-content: space-between; /* Distributes space between question text and arrow */ + width: 100%; /* Ensure the question occupies full width */ `; const Answer = styled(motion.p)` font-size: 1.1rem; color: #6b4423; line-height: 1.6; - font-family: 'Poppins', sans-serif; + font-family: "Poppins", sans-serif; max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; `; +const ArrowIcon = styled.div` + font-size: 2rem; /* Ensures arrow is large enough */ + transition: transform 1s ease; + transform: ${({ isOpen }) => (isOpen ? "rotate(180deg)" : "rotate(180deg)")}; + margin-left: 1rem; + display: inline-block; + vertical-align: middle; +`; + function FAQ() { + const [isOpen, setIsOpen] = useState({}); // state to track which FAQ is open + + const toggleAnswer = (index) => { + setIsOpen((prevState) => ({ + ...prevState, + [index]: !prevState[index], + })); + }; + return ( - { - const answer = document.getElementById('answer1'); - if (answer.style.maxHeight) { - answer.style.maxHeight = null; - } else { - answer.style.maxHeight = answer.scrollHeight + 'px'; - } - }} - > - - How do I place an order? - - - To place an order, browse our collection and click the 'Add to Cart' button. When you're ready, proceed to checkout. - - - { - const answer = document.getElementById('answer2'); - if (answer.style.maxHeight) { - answer.style.maxHeight = null; - } else { - answer.style.maxHeight = answer.scrollHeight + 'px'; - } - }} - > - - Can I modify my order after placing it? - - - Unfortunately, once an order is placed, it cannot be modified. However, you can cancel it and place a new one if needed. - - - { - const answer = document.getElementById('answer3'); - if (answer.style.maxHeight) { - answer.style.maxHeight = null; - } else { - answer.style.maxHeight = answer.scrollHeight + 'px'; - } - }} - > - ( + toggleAnswer(index)} > - What payment methods do you accept? - - - We accept various payment methods including credit cards, PayPal, and bank transfers. - - - { - const answer = document.getElementById('answer4'); - if (answer.style.maxHeight) { - answer.style.maxHeight = null; - } else { - answer.style.maxHeight = answer.scrollHeight + 'px'; - } - }} - > - - How can I track my order? - - - After your order is shipped, you will receive a tracking number via email to monitor your shipment. - - + + {index === 1 && "How do I place an order?"} + {index === 2 && "Can I modify my order after placing it?"} + {index === 3 && "What payment methods do you accept?"} + {index === 4 && "How can I track my order?"} + + {isOpen[index] ? : } + + + + {index === 1 && + 'To place an order, browse our collection and click the "Add to Cart" button. When you\'re ready, proceed to checkout.'} + {index === 2 && + "Unfortunately, once an order is placed, it cannot be modified. However, you can cancel it and place a new one if needed."} + {index === 3 && + "We accept various payment methods including credit cards, PayPal, and bank transfers."} + {index === 4 && + "After your order is shipped, you will receive a tracking number via email to monitor your shipment."} + + + ))} ); } -export default FAQ; \ No newline at end of file +export default FAQ; diff --git a/src/Pages/Home.js b/src/Pages/Home.js index bc26bb4..244be45 100644 --- a/src/Pages/Home.js +++ b/src/Pages/Home.js @@ -7,7 +7,7 @@ import styled from "styled-components"; import Button from "../componets/Button"; import Faq from "../componets/faq"; import "./Home.css"; -import DynamicText from "./dynamicText"; + gsap.registerPlugin(ScrollTrigger); const HomeContainer = styled.div` @@ -19,9 +19,9 @@ const HomeContainer = styled.div` const HeroSection = styled.section` display: flex; - padding: 0; - margin: 0; - top: -2rem; + padding:0; + margin:0; + top:-2rem; flex-direction: column; align-items: center; justify-content: center; @@ -30,7 +30,7 @@ const HeroSection = styled.section` width: 100%; - gap: -0.5rem; + gap:-0.5rem; background-image: linear-gradient( rgba(44, 19, 11, 0.7), @@ -56,7 +56,8 @@ const HeroSection = styled.section` const Title = styled(motion.h1)` font-size: 5rem; - + + font-family: "Playfair Display", serif; color: #ffe4b5; @@ -67,20 +68,22 @@ const Title = styled(motion.h1)` const Subtitle = styled(motion.p)` font-size: 1.8rem; - + font-family: "Poppins", sans-serif; color: #deb887; max-width: 600px; + @media (max-width: 768px) { font-size: 1.4rem; + } `; const StyledButton = styled(Button)` background: #d2691e; color: #ffe4b5; - padding: 0.8rem; + padding:0.8rem; font-size: 1.2rem; border-radius: 30px; border: 2px solid #8b4513; @@ -96,9 +99,8 @@ const StyledButton = styled(Button)` } @media (min-width: 783px) { - font-size: 0.8rem; - padding: 0.5rem; - } + font-size:0.8rem; + padding: 0.5rem} `; const FeaturesSection = styled.section` @@ -110,6 +112,8 @@ const FeaturesSection = styled.section` position: relative; overflow: visible; + + @media (max-width: 768px) { padding: 4rem 2rem; gap: 2rem; @@ -179,9 +183,9 @@ const SpecialtySection = styled.section` background: #2c130b; position: relative; - & h1 { - width: 100%; - text-align: center; + &::before { + content: "Our Specialties"; + position: absolute; top: 2rem; left: 50%; transform: translateX(-50%); @@ -298,7 +302,7 @@ function Home() { animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.8, ease: "easeOut" }} > - + Welcome to MsCafe - Premium Beans @@ -350,22 +353,36 @@ function Home() { -

Our Specialities

- - - +
+ + + + Premium Beans +
+
+ + + + Special Flat White +
+
+ + + + Nitro Cold Brew +
+ ); } - export default Home; diff --git a/src/Pages/Register.js b/src/Pages/Register.js index 278deed..8e1cd81 100644 --- a/src/Pages/Register.js +++ b/src/Pages/Register.js @@ -1,211 +1,85 @@ -import React, { useState } from "react"; -import styled from "styled-components"; -import { motion } from "framer-motion"; -import { Link, useNavigate } from "react-router-dom"; -import { useDispatch } from "react-redux"; -import { login } from "../Store/authSlice"; - -const RegisterBackGround = styled.section` - background-image: url("https://img.freepik.com/free-photo/hot-latte-art-coffee-cup-wood-table-coffee-shop_1150-8937.jpg"); - background-size: cover; - background-position: center; - height: 100vh; -`; - -const RegisterContainer = styled.div` - display: flex; - justify-content: center; - align-items: center; - height: 100vh; - padding: 0 1rem; - backdrop-filter: blur(8px); - background: rgba(0, 0, 0, 0.6); -`; - -const RegisterForm = styled(motion.form)` - background-color: rgba(255, 255, 255, 0.9); - padding: 2.5rem; - border-radius: 12px; - box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); - width: 350px; - max-width: 90%; - text-align: center; - opacity: 1; - transition: opacity 0.6s ease-in-out; -`; - -const Heading = styled.h2` - margin-bottom: 1.5rem; - color: #7c2214; - font-size: 1.8rem; - font-weight: bold; -`; - -const Input = styled(motion.input)` - width: 100%; - padding: 0.8rem; - margin-bottom: 1.2rem; - border: 1px solid #ddd; - border-radius: 8px; - font-size: 1rem; - transition: all 0.3s ease; - - &:focus { - border-color: #7c2214; - outline: none; - box-shadow: 0 0 5px rgba(124, 34, 20, 0.5); - } - &:hover { - border-color: #aaa; - } -`; - -const Button = styled(motion.button)` - width: 100%; - padding: 0.8rem; - background-color: #7c2214; - color: white; - border: none; - border-radius: 8px; - font-size: 1rem; - font-weight: bold; - cursor: pointer; - transition: background-color 0.3s; - - &:hover { - background-color: #5b190f; - } -`; - -const LoginLink = styled(Link)` - display: block; - margin-top: 1.5rem; - font-size: 0.9rem; - color: #7c2214; - text-decoration: underline; - - &:hover { - text-decoration: none; - color: #5b190f; - } -`; - -const SuccessMessage = styled.div` - margin-top: 1.5rem; - color: green; - text-align: center; - font-weight: bold; -`; - -const ErrorMessage = styled.div` - margin-top: 1.5rem; - color: red; - text-align: center; - font-weight: bold; -`; - -const Register = () => { - const [formData, setFormData] = useState({ - username: "", - email: "", - password: "", - confirmPassword: "", - }); - - const [isSubmitted, setIsSubmitted] = useState(false); - const [error, setError] = useState(""); - const dispatch = useDispatch(); - const navigate = useNavigate(); - - const handleChange = (e) => { - const { name, value } = e.target; - setFormData({ - ...formData, - [name]: value, - }); - }; - - const handleSubmit = (e) => { - e.preventDefault(); - if(formData.password.length < 9){ - setError("Password must have a minimum of 8 characters"); - return; - } - else if (formData.password !== formData.confirmPassword) { - setError("Passwords do not match"); - return; - } - localStorage.setItem("user", JSON.stringify(formData)); - dispatch(login({ username: formData.username, email: formData.email })); - setIsSubmitted(true); - setError(""); - setTimeout(() => { - navigate("/"); - }, 2000); - }; +import React from "react"; +function SignupPage() { return ( - - - - Register - - - - +
+ {/* Left Side: Image */} +
+ Coffee - - {error && {error}} - {isSubmitted && ( - Registration successful! - )} - Already have an account? Login - - - +
+ {/* Right Side: Signup Form */} +
+

+ Create an Account +

+
+
+ + +
+
+ + +
+
+ + +
+ +
+

+ Already have an account?{" "} + + Log In + +

+
+
+ ); -}; +} -export default Register; +export default SignupPage; diff --git a/src/Pages/Shop.js b/src/Pages/Shop.js index 01cfaa8..1d772a2 100644 --- a/src/Pages/Shop.js +++ b/src/Pages/Shop.js @@ -5,11 +5,13 @@ import { useDispatch } from 'react-redux'; import styled from 'styled-components'; import { motion } from 'framer-motion'; import { addToCart } from '../Store/cartSlice'; -import { useState } from 'react'; +import { useState } from 'react'; import Button from '../componets/Button'; import { toast, ToastContainer } from 'react-toastify'; // Add this import import 'react-toastify/dist/ReactToastify.css'; import DynamicText from "./dynamicText"; +import "@fortawesome/fontawesome-free/css/all.min.css"; + import ButtonGroup from '@mui/material/ButtonGroup'; @@ -188,7 +190,7 @@ const products = [ { id: 32, name: 'Oreo Milkshake', price: 5.2, image: 'https://www.solara.in/cdn/shop/articles/Oreo_Milkshake.jpg?v=1715757748&width=2048', description: 'Creamy and delicious, blended with Oreo cookies, ice cream, and milk.', type: 'cold' }, { id: 33, name: 'Strawberry Oreo Milkshake', price: 2.6, image: 'https://marleysmenu.com/wp-content/uploads/2021/08/Strawberry-Oreo-Milkshake-Featured-Image.jpg', description: 'A sweet blend of strawberries, Oreo cookies, and ice cream, perfect for dessert lovers.', type: 'cold' }, { id: 34, name: 'Mixed Nut and Fruit Milkshake', price: 8.2, image: 'https://images.mrcook.app/recipe-image/018d50f7-344f-7744-97e3-1f89e5a3cf29', description: 'A nutritious blend of mixed nuts, fruits, and milk, creamy and satisfying.', type: 'cold' }, - { id: 35, name: 'Peanut Butter Milkshake', price: 5.8, image: 'https://www.julieseatsandtreats.com/wp-content/uploads/2021/08/Peanut-Butter-Milkshake-Square.jpg', description: "Rich and creamy, made with peanut butter, ice cream, and milk, a peanut butter lover's dream.", type: 'cold'}, + { id: 35, name: 'Peanut Butter Milkshake', price: 5.8, image: 'https://www.julieseatsandtreats.com/wp-content/uploads/2021/08/Peanut-Butter-Milkshake-Square.jpg', description: "Rich and creamy, made with peanut butter, ice cream, and milk, a peanut butter lover's dream.", type: 'cold' }, { id: 36, name: 'Oreo cheese cake', price: 9.2, image: 'https://handletheheat.com/wp-content/uploads/2015/11/oreo-cheesecake-recipe-SQUARE.jpg', description: 'Creamy cheesecake with an Oreo crust and topping, rich and indulgent.', type: 'food' }, { id: 37, name: 'Chocolate cake', price: 7.2, image: 'https://img.freepik.com/free-photo/chocolate-cake_1203-8942.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid', description: 'Moist and decadent, a classic chocolate cake perfect for any celebration.', type: 'food' }, { id: 38, name: 'Red velvet cake', price: 4.2, image: 'https://img.freepik.com/free-photo/top-view-red-strawberry-cake-delicious-with-tea-table-fruit-color-cake-biscuit-sweet_140725-28319.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid', description: 'Rich and velvety, a moist red cake with cream cheese frosting, elegant and delicious.', type: 'food' }, @@ -363,7 +365,7 @@ const products = [ description: "Espresso served with sweetened condensed milk, creating a layered effect.", }, - + { id: 25, name: "Irish Coffee", @@ -373,269 +375,269 @@ const products = [ description: "Coffee with Irish whiskey, sugar, and cream, a warm and boozy treat.", }, - + ]; - // Tea Section - const product1=[{ - id: 19, - name: "Chai", - price: 7.3, - image: - "https://img.freepik.com/free-photo/frappe-glass-slices-bread-with-seeds_23-2148623233.jpg?ga=GA1.1.1542821208.1727756299&semt=ais_hybrid", - description: - "Spiced black tea brewed with milk and sweetened, aromatic and comforting.", - }, - { - id: 20, - name: "Lemon Tea", - price: 4.1, - image: - "https://img.freepik.com/free-photo/cup-hot-mint-tea_144627-34462.jpg?ga=GA1.1.1542821208.1727756299&semt=ais_hybrid ", - description: - "Refreshing black tea infused with lemon, perfect for a soothing experience.", - }, - { - id: 21, - name: "Green Tea", - price: 3.4, - image: - "https://img.freepik.com/free-photo/cup-green-tea_144627-34463.jpg?ga=GA1.1.1542821208.1727756299&semt=ais_hybrid ", - description: - "Light and delicate, made from unfermented tea leaves, rich in antioxidants.", - }, - { - id: 22, - name: "Black Tea", - price: 4.5, - image: - "https://img.freepik.com/free-photo/cup-black-tea_144627-34464.jpg?ga=GA1.1.1542821208.1727756299&semt=ais_hybrid ", - description: - "Strong and full-bodied, made from fully oxidized tea leaves, classic and robust.", - }, - { - id: 23, - name: "Herbal Tea", - price: 5.5, - image: - "https://img.freepik.com/premium-photo/black-tea-cup-glass-mint-tea-leaves-white-isolated_127657-17608.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid ", - description: - "Caffeine-free tea made from herbs, fruits, or spices, naturally soothing.", - }, - { - id: 24, - name: "Iced Tea", - price: 5.6, - image: - "https://img.freepik.com/free-vector/long-island-ice-tea-cocktail-realistic_1284-3888.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid ", - description: - "Refreshing chilled tea, often sweetened and served with lemon, perfect for hot days.", - }, +// Tea Section +const product1 = [{ + id: 19, + name: "Chai", + price: 7.3, + image: + "https://img.freepik.com/free-photo/frappe-glass-slices-bread-with-seeds_23-2148623233.jpg?ga=GA1.1.1542821208.1727756299&semt=ais_hybrid", + description: + "Spiced black tea brewed with milk and sweetened, aromatic and comforting.", +}, +{ + id: 20, + name: "Lemon Tea", + price: 4.1, + image: + "https://img.freepik.com/free-photo/cup-hot-mint-tea_144627-34462.jpg?ga=GA1.1.1542821208.1727756299&semt=ais_hybrid ", + description: + "Refreshing black tea infused with lemon, perfect for a soothing experience.", +}, +{ + id: 21, + name: "Green Tea", + price: 3.4, + image: + "https://img.freepik.com/free-photo/cup-green-tea_144627-34463.jpg?ga=GA1.1.1542821208.1727756299&semt=ais_hybrid ", + description: + "Light and delicate, made from unfermented tea leaves, rich in antioxidants.", +}, +{ + id: 22, + name: "Black Tea", + price: 4.5, + image: + "https://img.freepik.com/free-photo/cup-black-tea_144627-34464.jpg?ga=GA1.1.1542821208.1727756299&semt=ais_hybrid ", + description: + "Strong and full-bodied, made from fully oxidized tea leaves, classic and robust.", +}, +{ + id: 23, + name: "Herbal Tea", + price: 5.5, + image: + "https://img.freepik.com/premium-photo/black-tea-cup-glass-mint-tea-leaves-white-isolated_127657-17608.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid ", + description: + "Caffeine-free tea made from herbs, fruits, or spices, naturally soothing.", +}, +{ + id: 24, + name: "Iced Tea", + price: 5.6, + image: + "https://img.freepik.com/free-vector/long-island-ice-tea-cocktail-realistic_1284-3888.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid ", + description: + "Refreshing chilled tea, often sweetened and served with lemon, perfect for hot days.", +}, ]; - // Milkshake and Smothiee - const product2=[{ - id: 26, - name: "Strawberry smoothie", - price: 6.2, - image: - "https://www.eatingwell.com/thmb/TBp6lbiwoYPhRP4N__4sROiUDhA=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/mixed-berry-breakfast-smoothie-7959466-1x1-e0ad2304222e49508cda7b73b21de921.jpg", - description: - "Creamy and sweet, made with fresh strawberries, yogurt, and a touch of honey.", - }, - { - id: 27, - name: "Mango smoothie", - price: 3.2, - image: - "https://cdn.loveandlemons.com/wp-content/uploads/2023/05/mango-smoothie.jpg", - description: - "Tropical and refreshing, blended with ripe mangoes, banana, and coconut milk.", - }, - { - id: 28, - name: "Strawberry banana smoothie", - price: 6.45, - image: - "https://www.purelykaylie.com/wp-content/uploads/2023/07/strawberry-banana-smoothie-bowl-5.jpg", - description: - "A classic combination of strawberries and bananas, creamy and naturally sweet.", - }, - { - id: 29, - name: "Creamy, Nutty Coffee Smoothie", - price: 7.2, - image: - "https://www.seriouseats.com/thmb/dwKjOOPQu1ki3pSf1M4eB7FGVzI=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/20240206-SEA-Coffee-Smoothie-hero-27d1864a41cc411ea7ff0c64ada77a2e.jpg", - description: - "A rich blend of coffee, nuts, and cream, perfect for a morning energy boost.", - }, - { - id: 30, - name: "Coffee Smoothie", - price: 6.3, - image: - "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT-Y9in1wQf-XCl9sdyuw5pXWT_CrYn8P5j7A&s", - description: - "Creamy and caffeinated, made with cold brew, banana, and almond milk.", - }, - { - id: 31, - name: "Chocolate Milkshake", - price: 5.2, - image: - "https://www.sharmispassions.com/wp-content/uploads/2012/07/chocolate-milkshake1.jpg", - description: - "Rich and indulgent, made with chocolate ice cream, milk, and whipped cream.", - }, - { - id: 32, - name: "Oreo Milkshake", - price: 5.2, - image: - "https://www.solara.in/cdn/shop/articles/Oreo_Milkshake.jpg?v=1715757748&width=2048", - description: - "Creamy and delicious, blended with Oreo cookies, ice cream, and milk.", - }, - { - id: 33, - name: "Strawberry Oreo Milkshake", - price: 2.6, - image: - "https://marleysmenu.com/wp-content/uploads/2021/08/Strawberry-Oreo-Milkshake-Featured-Image.jpg", - description: - "A sweet blend of strawberries, Oreo cookies, and ice cream, perfect for dessert lovers.", - }, - { - id: 34, - name: "Mixed Nut and Fruit Milkshake", - price: 8.2, - image: - "https://images.mrcook.app/recipe-image/018d50f7-344f-7744-97e3-1f89e5a3cf29", - description: - "A nutritious blend of mixed nuts, fruits, and milk, creamy and satisfying.", - }, - { - id: 35, - name: "Peanut Butter Milkshake", - price: 5.8, - image: - "https://www.julieseatsandtreats.com/wp-content/uploads/2021/08/Peanut-Butter-Milkshake-Square.jpg", - description: - "Rich and creamy, made with peanut butter, ice cream, and milk, a peanut butter lover's dream.", - }, +// Milkshake and Smothiee +const product2 = [{ + id: 26, + name: "Strawberry smoothie", + price: 6.2, + image: + "https://www.eatingwell.com/thmb/TBp6lbiwoYPhRP4N__4sROiUDhA=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/mixed-berry-breakfast-smoothie-7959466-1x1-e0ad2304222e49508cda7b73b21de921.jpg", + description: + "Creamy and sweet, made with fresh strawberries, yogurt, and a touch of honey.", +}, +{ + id: 27, + name: "Mango smoothie", + price: 3.2, + image: + "https://cdn.loveandlemons.com/wp-content/uploads/2023/05/mango-smoothie.jpg", + description: + "Tropical and refreshing, blended with ripe mangoes, banana, and coconut milk.", +}, +{ + id: 28, + name: "Strawberry banana smoothie", + price: 6.45, + image: + "https://www.purelykaylie.com/wp-content/uploads/2023/07/strawberry-banana-smoothie-bowl-5.jpg", + description: + "A classic combination of strawberries and bananas, creamy and naturally sweet.", +}, +{ + id: 29, + name: "Creamy, Nutty Coffee Smoothie", + price: 7.2, + image: + "https://www.seriouseats.com/thmb/dwKjOOPQu1ki3pSf1M4eB7FGVzI=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/20240206-SEA-Coffee-Smoothie-hero-27d1864a41cc411ea7ff0c64ada77a2e.jpg", + description: + "A rich blend of coffee, nuts, and cream, perfect for a morning energy boost.", +}, +{ + id: 30, + name: "Coffee Smoothie", + price: 6.3, + image: + "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT-Y9in1wQf-XCl9sdyuw5pXWT_CrYn8P5j7A&s", + description: + "Creamy and caffeinated, made with cold brew, banana, and almond milk.", +}, +{ + id: 31, + name: "Chocolate Milkshake", + price: 5.2, + image: + "https://www.sharmispassions.com/wp-content/uploads/2012/07/chocolate-milkshake1.jpg", + description: + "Rich and indulgent, made with chocolate ice cream, milk, and whipped cream.", +}, +{ + id: 32, + name: "Oreo Milkshake", + price: 5.2, + image: + "https://www.solara.in/cdn/shop/articles/Oreo_Milkshake.jpg?v=1715757748&width=2048", + description: + "Creamy and delicious, blended with Oreo cookies, ice cream, and milk.", +}, +{ + id: 33, + name: "Strawberry Oreo Milkshake", + price: 2.6, + image: + "https://marleysmenu.com/wp-content/uploads/2021/08/Strawberry-Oreo-Milkshake-Featured-Image.jpg", + description: + "A sweet blend of strawberries, Oreo cookies, and ice cream, perfect for dessert lovers.", +}, +{ + id: 34, + name: "Mixed Nut and Fruit Milkshake", + price: 8.2, + image: + "https://images.mrcook.app/recipe-image/018d50f7-344f-7744-97e3-1f89e5a3cf29", + description: + "A nutritious blend of mixed nuts, fruits, and milk, creamy and satisfying.", +}, +{ + id: 35, + name: "Peanut Butter Milkshake", + price: 5.8, + image: + "https://www.julieseatsandtreats.com/wp-content/uploads/2021/08/Peanut-Butter-Milkshake-Square.jpg", + description: + "Rich and creamy, made with peanut butter, ice cream, and milk, a peanut butter lover's dream.", +}, ]; - // Cake Section - const product3=[ { - id: 36, - name: "Oreo cheese cake", - price: 9.2, - image: - "https://handletheheat.com/wp-content/uploads/2015/11/oreo-cheesecake-recipe-SQUARE.jpg", - description: - "Creamy cheesecake with an Oreo crust and topping, rich and indulgent.", - }, - { - id: 37, - name: "Chocolate cake", - price: 7.2, - image: - "https://img.freepik.com/free-photo/chocolate-cake_1203-8942.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", - description: - "Moist and decadent, a classic chocolate cake perfect for any celebration.", - }, - { - id: 38, - name: "Red velvet cake", - price: 4.2, - image: - "https://img.freepik.com/free-photo/top-view-red-strawberry-cake-delicious-with-tea-table-fruit-color-cake-biscuit-sweet_140725-28319.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", - description: - "Rich and velvety, a moist red cake with cream cheese frosting, elegant and delicious.", - }, - { - id: 39, - name: "Cheese cake", - price: 8.2, - image: - "https://img.freepik.com/premium-photo/citrus-cheesecake-cake-with-kumquats_82780-1574.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", - description: - "Creamy and smooth, a classic cheesecake with a graham cracker crust, perfect for dessert.", - }, - { - id: 40, - name: "Blueberry cake", - price: 3.2, - image: - "https://img.freepik.com/premium-photo/pieces-pie-from-cottage-cheese-blueberries_116441-1516.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", - description: - "Moist and bursting with blueberries, a sweet and tangy cake perfect for any occasion.", - }, - { - id: 41, - name: "Strawberry cake", - price: 6, - image: - "https://img.freepik.com/free-photo/delicious-cake-with-strawberries_23-2150797874.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", - description: - "Light and fluffy, a sweet strawberry cake with creamy frosting, perfect for summer.", - }, +// Cake Section +const product3 = [{ + id: 36, + name: "Oreo cheese cake", + price: 9.2, + image: + "https://handletheheat.com/wp-content/uploads/2015/11/oreo-cheesecake-recipe-SQUARE.jpg", + description: + "Creamy cheesecake with an Oreo crust and topping, rich and indulgent.", +}, +{ + id: 37, + name: "Chocolate cake", + price: 7.2, + image: + "https://img.freepik.com/free-photo/chocolate-cake_1203-8942.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", + description: + "Moist and decadent, a classic chocolate cake perfect for any celebration.", +}, +{ + id: 38, + name: "Red velvet cake", + price: 4.2, + image: + "https://img.freepik.com/free-photo/top-view-red-strawberry-cake-delicious-with-tea-table-fruit-color-cake-biscuit-sweet_140725-28319.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", + description: + "Rich and velvety, a moist red cake with cream cheese frosting, elegant and delicious.", +}, +{ + id: 39, + name: "Cheese cake", + price: 8.2, + image: + "https://img.freepik.com/premium-photo/citrus-cheesecake-cake-with-kumquats_82780-1574.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", + description: + "Creamy and smooth, a classic cheesecake with a graham cracker crust, perfect for dessert.", +}, +{ + id: 40, + name: "Blueberry cake", + price: 3.2, + image: + "https://img.freepik.com/premium-photo/pieces-pie-from-cottage-cheese-blueberries_116441-1516.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", + description: + "Moist and bursting with blueberries, a sweet and tangy cake perfect for any occasion.", +}, +{ + id: 41, + name: "Strawberry cake", + price: 6, + image: + "https://img.freepik.com/free-photo/delicious-cake-with-strawberries_23-2150797874.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", + description: + "Light and fluffy, a sweet strawberry cake with creamy frosting, perfect for summer.", +}, ]; - // Soup Section - const product4=[{ - id: 42, - name: "Salad", - price: 7.3, - image: - "https://img.freepik.com/free-photo/dietary-salad-with-tomatoes-feta-lettuce-spinach-pine-nuts_2829-20128.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", - description: - "Fresh and healthy, a mix of greens, vegetables, and a tangy dressing, perfect for a light meal.", - }, - { - id: 43, - name: "Tomato soup", - price: 6.7, - image: - "https://img.freepik.com/free-photo/portrait-shooting-tomato-soup-with-crackers-cheese-tomatoes-bread-table_141793-2858.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", - description: - "Warm and comforting, a classic tomato soup perfect for a cozy meal, often served with grilled cheese.", - }, - { - id: 44, - name: "Chicken Noodle soup", - price: 8.2, - image: - "https://img.freepik.com/free-photo/delicious-noodle-soup-with-chicken-uncooked-pasta-small-brown-bowl-spoon-garlic-dark-background_140725-140085.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", - description: - "Hearty and soothing, a classic soup with chicken, noodles, and vegetables, perfect for cold days.", - }, - { - id: 45, - name: "Miso soup", - price: 7.5, - image: - "https://img.freepik.com/free-photo/top-view-japanese-food-bowls-arrangement_23-2148809848.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", - description: - "Savory and umami-rich, a traditional Japanese soup made with miso paste and dashi broth.", - }, - { - id: 46, - name: "Cold cucumber soup", - price: 7.34, - image: - "https://img.freepik.com/free-photo/cold-cucumber-soup-with-dried-tomatoes-mozzarella_2829-14287.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", - description: - "Refreshing and cool, a chilled soup made with cucumbers, yogurt, and herbs, perfect for summer.", - }, - { - id: 47, - name: "Tom Yum Soup", - price: 9.2, - image: - "https://img.freepik.com/free-photo/tom-yum-kung-thai-hot-spicy-soup-shrimp-with-lemon-grass-lemon-galangal-chilli-wooden-table-thailand-food_1150-21078.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", - description: - "Spicy and aromatic, a Thai soup with lemongrass, kaffir lime leaves, and chilies, often with shrimp.", - }, +// Soup Section +const product4 = [{ + id: 42, + name: "Salad", + price: 7.3, + image: + "https://img.freepik.com/free-photo/dietary-salad-with-tomatoes-feta-lettuce-spinach-pine-nuts_2829-20128.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", + description: + "Fresh and healthy, a mix of greens, vegetables, and a tangy dressing, perfect for a light meal.", +}, +{ + id: 43, + name: "Tomato soup", + price: 6.7, + image: + "https://img.freepik.com/free-photo/portrait-shooting-tomato-soup-with-crackers-cheese-tomatoes-bread-table_141793-2858.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", + description: + "Warm and comforting, a classic tomato soup perfect for a cozy meal, often served with grilled cheese.", +}, +{ + id: 44, + name: "Chicken Noodle soup", + price: 8.2, + image: + "https://img.freepik.com/free-photo/delicious-noodle-soup-with-chicken-uncooked-pasta-small-brown-bowl-spoon-garlic-dark-background_140725-140085.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", + description: + "Hearty and soothing, a classic soup with chicken, noodles, and vegetables, perfect for cold days.", +}, +{ + id: 45, + name: "Miso soup", + price: 7.5, + image: + "https://img.freepik.com/free-photo/top-view-japanese-food-bowls-arrangement_23-2148809848.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", + description: + "Savory and umami-rich, a traditional Japanese soup made with miso paste and dashi broth.", +}, +{ + id: 46, + name: "Cold cucumber soup", + price: 7.34, + image: + "https://img.freepik.com/free-photo/cold-cucumber-soup-with-dried-tomatoes-mozzarella_2829-14287.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", + description: + "Refreshing and cool, a chilled soup made with cucumbers, yogurt, and herbs, perfect for summer.", +}, +{ + id: 47, + name: "Tom Yum Soup", + price: 9.2, + image: + "https://img.freepik.com/free-photo/tom-yum-kung-thai-hot-spicy-soup-shrimp-with-lemon-grass-lemon-galangal-chilli-wooden-table-thailand-food_1150-21078.jpg?ga=GA1.1.900909129.1729318722&semt=ais_hybrid", + description: + "Spicy and aromatic, a Thai soup with lemongrass, kaffir lime leaves, and chilies, often with shrimp.", +}, ]; const SearchFilterContainer = styled.div` @@ -648,23 +650,26 @@ const SearchFilterContainer = styled.div` const SearchInput = styled.input` padding: 0.5rem; font-size: 1rem; - border: 1px solid #ddd; - border-radius: 4px 0 0 4px; + border: 2px solid brown; /* Updated border width and color */ + border-radius: 20px; /* Increased roundness */ outline: none; width: 300px; + margin-right: 1rem; /* Added margin on the right */ &:focus { - border-color: #6b4f4f; + border-color: #6b4f4f; /* Focus state border color */ } `; + const SearchButton = styled.button` padding: 0.5rem 1rem; font-size: 1rem; + font-weight: bold; background: linear-gradient(145deg, #6b4f4f, #7d5858); color: white; border: none; - border-radius: 0 4px 4px 0; + border-radius: 15px 15px 15px 15px; cursor: pointer; transition: background 0.3s ease; @@ -702,9 +707,18 @@ function Shop() { const [itemsNo, setItemsNo] = useState(9); + const [likedProducts, setLikedProducts] = useState({}); + + const toggleHeart = (productId) => { + setLikedProducts((prevState) => ({ + ...prevState, + [productId]: !prevState[productId], + })); + }; + const handleItemsNo = () => { const s = products.length; - if (s === itemsNo) { + if (s == itemsNo) { setItemsNo(9); } else { setItemsNo(Math.min(itemsNo + 9, s)); @@ -724,7 +738,7 @@ function Shop() { initial={{ opacity: 0, y: -50 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.8, ease: "easeOut" }} - text-weight="extrabold" + text-weight="bold-800" > @@ -825,7 +839,30 @@ function Shop() { >
- + +
toggleHeart(product.id)} + style={{ + position: 'absolute', + top: '10px', + right: '10px', + cursor: 'pointer', + fontSize: '24px', + color: likedProducts[product.id] ? 'red' : 'gray', + zIndex: 2, + }} + > + +
+ + {product.description}
diff --git a/src/Pages/Testimonial.js b/src/Pages/Testimonial.js index b201855..043ce63 100644 --- a/src/Pages/Testimonial.js +++ b/src/Pages/Testimonial.js @@ -8,10 +8,27 @@ function Testimonial() {

What Our Customers Say

-
+
- - + +
@@ -59,11 +76,20 @@ function Testimonial() {
- - @@ -76,7 +102,9 @@ function Testimonial() { } function TestimonialCard({ name, image, rating, text }) { + return ( +
{name} diff --git a/src/Pages/cake.js b/src/Pages/cake.js index 8cc9e9f..6f879c6 100644 --- a/src/Pages/cake.js +++ b/src/Pages/cake.js @@ -3,9 +3,14 @@ import { useDispatch } from 'react-redux'; import { addToCart, removeFromCart } from '../Store/cartSlice'; import styled from 'styled-components'; import { motion } from 'framer-motion'; +import "@fortawesome/fontawesome-free/css/all.min.css"; const CakeContainer = styled.div` + + padding: 6rem 2rem 4rem 2rem; // Added top padding for navbar + padding: 6rem 2rem 4rem 2rem; + max-width: 1200px; margin: 0 auto; background-color: #fffbeb; @@ -147,6 +152,8 @@ const SearchButton = styled.button` cursor: pointer; transition: background 0.3s ease; + + &:hover { background: linear-gradient(145deg, #7d5858, #8e6a6a); } @@ -156,6 +163,14 @@ function Cake() { const dispatch = useDispatch(); const [quantities, setQuantities] = useState({}); const [searchQuery, setSearchQuery] = useState(''); + const [likedProducts, setLikedProducts] = useState({}); + + const toggleHeart = (productId) => { + setLikedProducts((prevState) => ({ + ...prevState, + [productId]: !prevState[productId], + })); + }; const handleAddToCart = (product) => { if (!quantities[product.id]) { @@ -242,6 +257,15 @@ function Cake() { return ( + + + Our Cake Selection + + Our Cake Selection @@ -258,10 +282,29 @@ function Cake() { + {filteredProducts.map((product) => ( - +
+ +
toggleHeart(product.id)} + style={{ + position: 'absolute', + top: '10px', + right: '10px', + cursor: 'pointer', + fontSize: '24px', + color: likedProducts[product.id] ? 'red' : 'gray', + }} + > + +
+
{product.name} ${product.price.toFixed(2)} @@ -285,4 +328,5 @@ function Cake() { ); } + export default Cake; diff --git a/src/Pages/coffee.js b/src/Pages/coffee.js index 81566c1..3b62449 100644 --- a/src/Pages/coffee.js +++ b/src/Pages/coffee.js @@ -3,6 +3,7 @@ import { useDispatch } from 'react-redux'; import { addToCart, removeFromCart } from '../Store/cartSlice'; import styled from 'styled-components'; import { motion } from 'framer-motion'; +import "@fortawesome/fontawesome-free/css/all.min.css"; const CoffeeContainer = styled.div` padding: 6rem 2rem 4rem 2rem; // Added top padding for navbar @@ -173,6 +174,14 @@ function Coffee() { const dispatch = useDispatch(); const [quantities, setQuantities] = useState({}); const [searchQuery, setSearchQuery] = useState(''); + const [likedProducts, setLikedProducts] = useState({}); + + const toggleHeart = (productId) => { + setLikedProducts((prevState) => ({ + ...prevState, + [productId]: !prevState[productId], + })); + }; const handleAddToCart = (product) => { if (!quantities[product.id]) { @@ -410,7 +419,26 @@ const filteredProducts = products.filter((product) => {filteredProducts.map((product) => ( - +
+ + +
toggleHeart(product.id)} + style={{ + position: 'absolute', + top: '10px', + right: '10px', + cursor: 'pointer', + fontSize: '24px', + color: likedProducts[product.id] ? 'red' : 'gray', + }} + > + +
+
{product.name} ${product.price.toFixed(2)} @@ -418,7 +446,7 @@ const filteredProducts = products.filter((product) => - + ) : ( handleDecrement(product)}>- diff --git a/src/Pages/login.js b/src/Pages/login.js index 4ff9da4..d651251 100644 --- a/src/Pages/login.js +++ b/src/Pages/login.js @@ -1,189 +1,71 @@ -import React, { useState } from "react"; -import { useDispatch } from "react-redux"; -import { login } from "../Store/authSlice"; -import styled from "styled-components"; -import { motion } from "framer-motion"; -import { Link, useNavigate } from "react-router-dom"; -const LoginBackGround = styled.section` - background-image: url('https://img.freepik.com/free-photo/hot-latte-art-coffee-cup-wood-table-coffee-shop_1150-8937.jpg'); - background-size: cover; - background-position: center; - height: 100vh; -`; - -const LoginContainer = styled.div` - display: flex; - justify-content: center; - align-items: center; - height: 100vh; - padding: 0 1rem; - backdrop-filter: blur(8px); - background: rgba(0, 0, 0, 0.6); -`; - -const LoginForm = styled(motion.form)` - background-color: rgba(255, 255, 255, 0.9); - padding: 2.5rem; - border-radius: 12px; - box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); - width: 350px; - max-width: 90%; - text-align: center; - opacity: 1; - transition: opacity 0.6s ease-in-out; -`; - -const Heading = styled.h2` - margin-bottom: 1.5rem; - color: #7c2214; - font-size: 1.8rem; - font-weight: bold; -`; - -const Input = styled.input` - width: 100%; - padding: 0.75rem; - margin-bottom: 1.2rem; - border: 1px solid #ddd; - border-radius: 8px; - font-size:1rem; - transition: border-color 0.3s ease,box-shadow 0.3s ease; - - &:focus{ - border-color: #7c2214; - box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px; - outline:none; - } - - &:hover { - border-color: #aaa; - } - - &::placeholder{ - color:#999; - } -`; - -const Button = styled(motion.button)` - width: 100%; - padding: 0.75rem; - background-color: #7c2214; - color: white; - border: none; - border-radius: 8px; - cursor: pointer; - font-size: 1rem; - font-weight: bold; - transition: background 0.3s ease, transform 0.2s ease; - - &:hover{ - background-color: #6c1a1a; - color: white; - text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6); - transform: translateY(-2px); - } - - &:active{ - transform: translateY(0); - } - -`; - -const RegisterLink = styled(Link)` - display: block; - margin-top: 1rem; - text-align: center; - color: #7c2214; - text-decoration: none; -`; - -const ForgetPasswordLink = styled(Link)` - display: block; - margin-top: 0.5rem; - text-align: center; - color: #7c2214; - text-decoration: none; -`; - -const ErrorMessage = styled.div` - margin-top: 1rem; - color: red; - text-align: center; -`; - -function Login() { - const [username, setUsername] = useState(""); - const [email, setEmail] = useState(""); - const [password, setPassword] = useState(""); - const [error, setError] = useState(""); - const dispatch = useDispatch(); - const navigate = useNavigate(); - - const handleSubmit = (e) => { - e.preventDefault(); - const storedUser = JSON.parse(localStorage.getItem("user")); - if ( - storedUser && - storedUser.username === username && - storedUser.email === email && - storedUser.password === password - ) { - dispatch(login({ username, email })); - navigate("/"); // Redirect to home page - } else { - setError("Invalid credentials"); - } - }; +import React from "react"; +function LoginPage() { return ( - - - - Login - setUsername(e.target.value)} - required - /> - setEmail(e.target.value)} - required - /> - setPassword(e.target.value)} - required +
+
+ {/* Left Side: Image */} +
+ Coffee - - {error && {error}} - - Don't have an account? Register - - - Forgot Password? - - - - +
+ {/* Right Side: Login Form */} +
+

+ Welcome Back! +

+
+
+ + +
+
+ + +
+ +
+

+ Don’t have an account?{" "} + + Sign Up + +

+
+
+
); } -export default Login; +export default LoginPage; diff --git a/src/Pages/milkshake.js b/src/Pages/milkshake.js index cc9c099..2172398 100644 --- a/src/Pages/milkshake.js +++ b/src/Pages/milkshake.js @@ -3,6 +3,7 @@ import { useDispatch } from 'react-redux'; import { addToCart, removeFromCart } from '../Store/cartSlice'; import styled from 'styled-components'; import { motion } from 'framer-motion'; +import "@fortawesome/fontawesome-free/css/all.min.css"; const MilkshakeContainer = styled.div` padding: 6rem 2rem 4rem 2rem; // Added top padding for navbar @@ -171,10 +172,19 @@ const SearchButton = styled.button` `; + function Milkshake() { const dispatch = useDispatch(); const [quantities, setQuantities] = useState({}); const [searchQuery, setSearchQuery] = useState(''); + const [likedProducts, setLikedProducts] = useState({}); + + const toggleHeart = (productId) => { + setLikedProducts((prevState) => ({ + ...prevState, + [productId]: !prevState[productId], + })); + }; const handleAddToCart = (product) => { if (!quantities[product.id]) { @@ -334,7 +344,26 @@ const filteredProducts = products.filter((product) => {filteredProducts.map((product) => ( - +
+ + +
toggleHeart(product.id)} + style={{ + position: 'absolute', + top: '10px', + right: '10px', + cursor: 'pointer', + fontSize: '24px', + color: likedProducts[product.id] ? 'red' : 'gray', + }} + > + +
+
{product.name} ${product.price.toFixed(2)} @@ -342,7 +371,7 @@ const filteredProducts = products.filter((product) => - + ) : ( handleDecrement(product)}>- @@ -359,4 +388,5 @@ const filteredProducts = products.filter((product) => ); } + export default Milkshake; diff --git a/src/Pages/soup.js b/src/Pages/soup.js index 7dd3c36..23eaaa1 100644 --- a/src/Pages/soup.js +++ b/src/Pages/soup.js @@ -3,6 +3,7 @@ import { useDispatch } from 'react-redux'; import { addToCart, removeFromCart } from '../Store/cartSlice'; import styled from 'styled-components'; import { motion } from 'framer-motion'; +import "@fortawesome/fontawesome-free/css/all.min.css"; const SoupContainer = styled.div` padding: 6rem 2rem 4rem 2rem; // Added top padding for navbar @@ -174,6 +175,14 @@ function Soup() { const dispatch = useDispatch(); const [quantities, setQuantities] = useState({}); const [searchQuery, setSearchQuery] = useState(''); + const [likedProducts, setLikedProducts] = useState({}); + + const toggleHeart = (productId) => { + setLikedProducts((prevState) => ({ + ...prevState, + [productId]: !prevState[productId], + })); + }; const handleAddToCart = (product) => { if (!quantities[product.id]) { @@ -296,7 +305,26 @@ const filteredProducts = products.filter((product) => {filteredProducts.map((product) => ( - +
+ + +
toggleHeart(product.id)} + style={{ + position: 'absolute', + top: '10px', + right: '10px', + cursor: 'pointer', + fontSize: '24px', + color: likedProducts[product.id] ? 'red' : 'gray', + }} + > + +
+
{product.name} ${product.price.toFixed(2)} @@ -304,7 +332,7 @@ const filteredProducts = products.filter((product) => - + ) : ( handleDecrement(product)}>- @@ -321,4 +349,5 @@ const filteredProducts = products.filter((product) => ); } + export default Soup; diff --git a/src/componets/FooterImg.png b/src/componets/FooterImg.png new file mode 100644 index 0000000..2f1e8f4 Binary files /dev/null and b/src/componets/FooterImg.png differ diff --git a/src/componets/Navbar.js b/src/componets/Navbar.js index 559fc87..7cf2a05 100644 --- a/src/componets/Navbar.js +++ b/src/componets/Navbar.js @@ -150,9 +150,7 @@ const NavLink = styled(motion.div)` font-size: 1.1rem; transition: all 0.3s ease; font-family: "Poppins", sans-serif; - - padding: 20px; - +padding: 20px; &:hover { color: #ffe4b5; @@ -443,7 +441,7 @@ function Navbar() { ); } - + if (items.title === "User") { return ( diff --git a/src/componets/Navitems.js b/src/componets/Navitems.js index d277fd8..7e1d14e 100644 --- a/src/componets/Navitems.js +++ b/src/componets/Navitems.js @@ -1,109 +1,111 @@ + export const navItems = [ - { - id: 1, - title: "Home", - path: "./", - cName: "nav-item", - }, - { - id: 2, - title: "About", - path: "./About", - cName: "nav-item", - }, - { - id: 3, - title: "Product", - path: "./product", - cName: "nav-item", - }, - { - id: 4, - title: "Contact", - path: "./contact", - cName: "nav-item", - }, - { - id: 5, - title: "Stories", - path: "./our-story", - cName: "nav-item", - }, - { - id: 6, - title: "User", - path: "./user", - cName: "nav-item", - }, - - ]; - - export const productDropdown = [ - { - id: 1, - title: "Shop", - path: "./shop", - cName: "submenu-item", - }, - - { - id: 2, - title: "Premium Beans", - path: "./premiumBeans", - cName: "submenu-item", - }, - - { - id: 3, - title: "Expert Baristas", - path: "./expertbaristas", - cName: "submenu-item", - }, - ]; - - export const ourstoryDropdown = [ - { - id: 1, - title: "About", - path: "./about", - cName: "submenu-item", - }, - { - id: 2, - title: "Testimonials", - path: "./testimonial", - cName: "submenu-item", - }, - ]; - - export const userLogoutDropdown = [ - { - id: 1, - title: "Login", - path: "./login", - cName: "submenu-item", - }, - { - id: 2, - title: "Register", - path: "./register", - cName: "submenu-item", - }, - ]; - - export const userLoginDropdown = [ - { - id: 1, - title: "Cart", - path: "./cart", - cName: "submenu-item", - }, - - { - id: 2, - title: "Profile", - path: "./profile", - cName: "submenu-item", - }, - - ]; \ No newline at end of file + { + id: 1, + title: "Home", + path: "./", + cName: "nav-item", + }, + { + id: 2, + title: "About", + path: "./About", + cName: "nav-item", + }, + { + id: 3, + title: "Product", + path: "./product", + cName: "nav-item", + }, + { + id: 4, + title: "Contact", + path: "./contact", + cName: "nav-item", + }, + { + id: 5, + title: "Stories", + path: "./our-story", + cName: "nav-item", + }, + { + id: 6, + title: "User", + path: "./user", + cName: "nav-item", + }, + +]; + +export const productDropdown = [ + { + id: 1, + title: "Shop", + path: "./shop", + cName: "submenu-item", + }, + + { + id: 2, + title: "Premium Beans", + path: "./premiumBeans", + cName: "submenu-item", + }, + + { + id: 3, + title: "Expert Baristas", + path: "./expertbaristas", + cName: "submenu-item", + }, +]; + +export const ourstoryDropdown = [ + { + id: 1, + title: "About", + path: "./about", + cName: "submenu-item", + }, + { + id: 2, + title: "Testimonials", + path: "./testimonial", + cName: "submenu-item", + }, +]; + +export const userLogoutDropdown = [ + { + id: 1, + title: "Login", + path: "./login", + cName: "submenu-item", + }, + { + id: 2, + title: "Register", + path: "./register", + cName: "submenu-item", + }, +]; + +export const userLoginDropdown = [ + { + id: 1, + title: "Cart", + path: "./cart", + cName: "submenu-item", + }, + + { + id: 2, + title: "Profile", + path: "./profile", + cName: "submenu-item", + }, + +]; + diff --git a/src/componets/faq.js b/src/componets/faq.js index 1a0eae0..38dc287 100644 --- a/src/componets/faq.js +++ b/src/componets/faq.js @@ -1,6 +1,7 @@ -import React from 'react'; -import styled from 'styled-components'; -import { motion } from 'framer-motion'; +import React, { useState } from "react"; +import styled from "styled-components"; +import { motion } from "framer-motion"; +import { FaChevronDown, FaChevronUp } from "react-icons/fa"; // Importing arrows from react-icons const FAQContainer = styled.div` padding: 6rem 2rem 4rem 2rem; @@ -15,7 +16,7 @@ const FAQHeading = styled(motion.h1)` margin-bottom: 2rem; text-align: center; color: #78350f; - font-family: 'Playfair Display', serif; + font-family: "Playfair Display", serif; display: flex; flex-wrap: wrap; flex-direction: column; @@ -54,7 +55,7 @@ const FAQItem = styled(motion.div)` &:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2); - background-color:rgb(241, 224, 198)/* Coffee color */ + background-color: rgb(241, 224, 198); /* Coffee color */ } `; @@ -62,22 +63,44 @@ const Question = styled(motion.h3)` font-size: 1.5rem; margin-bottom: 1rem; color: #78350f; - font-family: 'Playfair Display', serif; + font-family: "Playfair Display", serif; cursor: pointer; font-weight: 550; + display: flex; + align-items: center; /* Aligns text and arrow horizontally */ + justify-content: space-between; /* Distributes space between question text and arrow */ + width: 100%; /* Ensure the question occupies full width */ `; const Answer = styled(motion.p)` font-size: 1.1rem; color: #6b4423; line-height: 1.6; - font-family: 'Poppins', sans-serif; + font-family: "Poppins", sans-serif; max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; `; +const ArrowIcon = styled.div` + font-size: 2rem; /* Ensures arrow is large enough */ + transition: transform 1s ease; + transform: ${({ isOpen }) => (isOpen ? "rotate(180deg)" : "rotate(180deg)")}; + margin-left: 1rem; + display: inline-block; + vertical-align: middle; +`; + function FAQ() { + const [isOpen, setIsOpen] = useState({}); // state to track which FAQ is open + + const toggleAnswer = (index) => { + setIsOpen((prevState) => ({ + ...prevState, + [index]: !prevState[index], + })); + }; + return ( - { - const answer = document.getElementById('answer1'); - if (answer.style.maxHeight) { - answer.style.maxHeight = null; - } else { - answer.style.maxHeight = answer.scrollHeight + 'px'; - } - }} - > - - How do I place an order? - - - To place an order, browse our collection and click the 'Add to Cart' button. When you're ready, proceed to checkout. - - - { - const answer = document.getElementById('answer2'); - if (answer.style.maxHeight) { - answer.style.maxHeight = null; - } else { - answer.style.maxHeight = answer.scrollHeight + 'px'; - } - }} - > - - Can I modify my order after placing it? - - - Unfortunately, once an order is placed, it cannot be modified. However, you can cancel it and place a new one if needed. - - - { - const answer = document.getElementById('answer3'); - if (answer.style.maxHeight) { - answer.style.maxHeight = null; - } else { - answer.style.maxHeight = answer.scrollHeight + 'px'; - } - }} - > - ( + toggleAnswer(index)} > - What payment methods do you accept? - - - We accept various payment methods including credit cards, PayPal, and bank transfers. - - - { - const answer = document.getElementById('answer4'); - if (answer.style.maxHeight) { - answer.style.maxHeight = null; - } else { - answer.style.maxHeight = answer.scrollHeight + 'px'; - } - }} - > - - How can I track my order? - - - After your order is shipped, you will receive a tracking number via email to monitor your shipment. - - + + {index === 1 && "How do I place an order?"} + {index === 2 && "Can I modify my order after placing it?"} + {index === 3 && "What payment methods do you accept?"} + {index === 4 && "How can I track my order?"} + + {isOpen[index] ? : } + + + + {index === 1 && + 'To place an order, browse our collection and click the "Add to Cart" button. When you\'re ready, proceed to checkout.'} + {index === 2 && + "Unfortunately, once an order is placed, it cannot be modified. However, you can cancel it and place a new one if needed."} + {index === 3 && + "We accept various payment methods including credit cards, PayPal, and bank transfers."} + {index === 4 && + "After your order is shipped, you will receive a tracking number via email to monitor your shipment."} + + + ))} ); } -export default FAQ; \ No newline at end of file +export default FAQ; diff --git a/src/componets/footer.js b/src/componets/footer.js index d7db706..0142a65 100644 --- a/src/componets/footer.js +++ b/src/componets/footer.js @@ -1,13 +1,16 @@ -import React from 'react'; -import styled from 'styled-components'; -import { motion } from 'framer-motion'; -import { Link } from 'react-router-dom'; +import React from "react"; +import styled from "styled-components"; +import { motion } from "framer-motion"; +import { Link } from "react-router-dom"; +import FooterImg from './FooterImg.png'; -// Styled components for the footer (unchanged) +// Styled components for the footer const FooterContainer = styled.footer` - background-color: #78350f; - color: #fffbeb; - padding: 2rem 3rem 2rem; + background: linear-gradient(90deg, rgba(148, 93, 56, 1), rgba(56, 39, 16, 1)); +-webkit-background: linear-gradient(90deg, rgba(148, 93, 56, 1), rgba(56, 39, 16, 1)); +-moz-background: linear-gradient(90deg, rgba(148, 93, 56, 1), rgba(56, 39, 16, 1)); + color: #fffbeb; + padding: 1.5rem 2rem; text-align: center; position: relative; bottom: 0; @@ -20,7 +23,7 @@ const FooterContent = styled.div` margin: 0 auto; p { - margin: 0.5rem 0; + margin: 0.2rem 0; font-size: 1rem; line-height: 1.5rem; @@ -37,10 +40,19 @@ const FooterContent = styled.div` const InfoSection = styled.div` display: flex; - justify-content: space-between; - margin-top: 1.3rem; - margin-bottom: 1.3rem; - + justify-content:space-between; + align-items:center; + margin: 2rem 0; + text-align: left; + .infoimg + { + height:20rem; + padding-right:1rem; + } + .info-wrapper + { + display:flex; + } @media (max-width: 768px) { flex-direction: column; gap: 1.5rem; @@ -54,39 +66,30 @@ const InfoColumn = styled.div` h3 { font-size: 1.2rem; margin-bottom: 1rem; + color: #ffd6a5; } p, a { font-size: 0.9rem; - color: rgb(255, 255, 255); + color: #fffbeb; text-decoration: none; - display: block; margin-bottom: 0.5rem; + display: block; } a:hover { - color: #fbbf24; - } - - @media (max-width: 768px) { - h3 { - font-size: 1.2rem; - margin-bottom: 0rem; - } - - p { - font-size: 1rem; - margin: 0rem; - } + color: #fbbf24; + + text-decoration: underline; } -`; +` const SocialIcons = styled.div` display: flex; justify-content: center; gap: 1rem; - margin-top: 1rem; + margin-top: 1.5rem; @media (max-width: 768px) { gap: 1.2rem; @@ -95,15 +98,36 @@ const SocialIcons = styled.div` const SocialIcon = styled(motion.a)` color: #fffbeb; - font-size: 1.5rem; + font-size: 1.8rem; text-decoration: none; padding: 0.5rem; border-radius: 50%; - transition: color 0.3s ease; + + transition: color 0.3s ease, transform 0.3s ease; &:hover { - color: #fbbf24; transform: scale(1.2); + transition: all 0.3s ease; + + &:hover { + color: #fbbf24; + + } + + &[href*="facebook.com"]:hover { + color: #3b5998; /* Facebook Blue */ + } + + &[href*="twitter.com"]:hover { + color: #1da1f2; /* Twitter Blue */ + } + + &[href*="instagram.com"]:hover { + color: #e4405f; /* Instagram Pink */ + } + + &[href*="linkedin.com"]:hover { + color: #0077b5; /* LinkedIn Blue */ } @media (max-width: 768px) { @@ -111,6 +135,17 @@ const SocialIcon = styled(motion.a)` } `; + + +const Divider = styled.hr` + border: none; + height: 2px; + background: #ffd6a5; + margin: 2rem auto; + width: 60%; +`; + + function Footer() { return ( @@ -123,19 +158,22 @@ function Footer() { rel="noopener noreferrer" whileHover={{ scale: 1.2 }} aria-label="Facebook" - role="link" > - + {/* Facebook icon */} - {/* Updated Twitter icon */} + + {/* Updated Twitter icon */} + + {/* LinkedIn icon */} + - + {/* Instagram icon */} - {/* LinkedIn icon */} + {/* GitHub icon */} + {/* Divider */} + + {/* Informational Sections */} - + Footer +
+

About Us

- Founded in 2010, MsCafe is dedicated to serving the finest coffee with passion and - expertise. We source our beans from sustainable farms across the globe. + Founded in 2010, MsCafe is dedicated to serving the finest coffee + with passion and expertise. We source our beans from sustainable + farms across the globe.

@@ -177,26 +220,31 @@ function Footer() { Testimonial Contributors -

Contact Us

Email: contact@mscafe.com

Phone: (123) 456-7890

-

Location

123 Coffee St, Bean Town, USA

- + View on Map

+
+
+ {/* Footer Text */}

© {new Date().getFullYear()} MsCafe. All rights reserved.

-

Made with ♥ by Mscoder

+

Made with ♥ by MsCoder

);