+ Cold Beverages
+
handleItemsNo()}
- style={{ width: '100%', marginLeft: '0px' }}
+ onClick={() => setCategory("food")}
+ style={{
+ width: "200px",
+ backgroundColor: category === "food" ? "#f0efdc" : "#7c2414",
+ color: category === "food" ? "black" : "white",
+ }}
>
- {itemsNo === products.length ? "See Less" : "See More"}
+ Food
+
+
+ {/* Dynamically render sections */}
+
+ {Object.keys(groupedProducts).map((section) => {
+ const sectionProducts = groupedProducts[section];
+
+ // Only display the section if it matches the search query or if the search query is empty
+ const matchesSearchQuery = sectionProducts.some((product) =>
+ product.name.toLowerCase().includes(searchQuery.toLowerCase())
+ );
+
+ // Skip section if no products match the search query and the search query is not empty
+ if (searchQuery && !matchesSearchQuery) {
+ return null;
+ }
+
+ return (
+
+
+ {section === "hot" ? "Our Hot Beverages" : section === "cold" ? "Our Cold Beverages" : section === "food" ? "Our Food Selection" : ""}
+
+
+ {sectionProducts.map((product) => {
+ // If there's a search query, only show products that match
+ if (searchQuery && !product.name.toLowerCase().includes(searchQuery.toLowerCase())) {
+ return null;
+ }
+ return (
+
+
+
+
+
toggleHeart(product.id)}
+ style={{
+ position: 'absolute',
+ top: '10px',
+ right: '10px',
+ cursor: 'pointer',
+ fontSize: '24px',
+ color: likedProducts[product.id] ? 'red' : 'gray',
+ zIndex: 2,
+ }}
+ >
+
+
+
+
+ {product.description}
+
+
+
+ {product.name}
+ ${product.price.toFixed(2)}
+ handleAddToCart(product)}>
+ Add to Cart
+
+ handleAddToCart(product)}>
+ Buy Now
+
+
+
+ );
+ })}
+
+
+ );
+ })}
-
-
-
- {[product1, product2, product3, product4].map((productList, index) => (
-
-
- {index === 0
- ? "Our Tea Selection"
- : index === 1
- ? "Our Smoothie and Milkshake Selection"
- : index === 2
- ? "Our Cake Selection"
- : "Our Soup and Salad Selection"}
-
-
- {productList.map((product) => (
-
-
-
-
- {product.description}
-
-
-
- {product.name}
- ${product.price.toFixed(2)}
- handleAddToCart(product)}>
- Add to Cart
-
- handleAddToCart(product)}>
- Buy Now
-
-
-
- ))}
-
-
- ))}
-
-);
+
+
+ );
}
-export default Shop;
+export default Shop;
\ No newline at end of file
diff --git a/src/Pages/Terms.js b/src/Pages/Terms.js
new file mode 100644
index 0000000..4777a1f
--- /dev/null
+++ b/src/Pages/Terms.js
@@ -0,0 +1,94 @@
+import React from "react";
+
+function Terms() {
+ return (
+
+
+
Terms and Conditions
+
+
+
+ Introduction
+ Welcome to MsCafe. By accessing or using our website, you agree to be bound by these Terms and conditions. If you do not agree with these Terms, please do not use our website.
+
+
+
+ Use of the Website
+
+ Prohibited Activities: You agree not to engage in any of the following prohibited activities:
+
+ Using the website for any unlawful purpose.
+ Introducing viruses, malware, or other harmful code to the website.
+ Attempting to gain unauthorized access to our systems or networks.
+ Using the website to harass, abuse, or harm others.
+
+
+ Account Security: If you create an account on our website, you are responsible for maintaining the confidentiality of your login information and for all activities that occur under your account.
+
+
+
+
+ Product Information
+
+ Accuracy: We strive to provide accurate product descriptions, prices, and availability. However, errors may occur, and we reserve the right to correct any errors or inaccuracies at any time.
+ Product Changes: We reserve the right to modify or discontinue any product at any time without prior notice.
+
+
+
+
+ Payment and Billing
+
+ Payment Methods: We accept credit cards, debit cards and PayPal.
+ Order Acceptance: Your order is an offer to purchase our products. We reserve the right to accept or reject any order at our discretion.
+ Billing Information: You agree to provide accurate and complete billing information. If there are any issues with your payment, we may contact you for verification purposes.
+ Payment Security: We use secure payment processing systems to protect your financial information. However, we are not responsible for any unauthorized access or use of your payment information.
+
+
+
+
+ Shipping and Delivery
+
+ Shipping Methods: We offer various shipping options. Please refer to our Shipping Policy for details on available shipping methods and estimated delivery times.
+ Delivery Times: Delivery times are estimates and may vary based on factors beyond our control, such as shipping carrier delays or customs processing.
+ Shipping Fees: Shipping fees are calculated based on the shipping method and destination. These fees will be displayed during the checkout process.
+ Order Tracking: Once your order is shipped, you will receive a tracking number to monitor the status of your shipment.
+
+
+
+
+ Returns and Refunds
+
+ Return Policy: You may return unused and unopened products within 30 days of purchase for a full refund. To initiate a return, please contact our customer service team.
+ Refund Process: Refunds will be processed within 7-10 business days after we receive the returned product. Refunds will be issued to the original payment method.
+ Exchanges: If you wish to exchange a product, please contact us to arrange the exchange. Exchanges are subject to product availability.
+ Damaged or Defective Products: If you receive a damaged or defective product, please contact us immediately. We will provide a replacement or refund at no additional cost.
+
+
+
+
+ Intellectual Property
+
+ Ownership: All content on this website, including text, graphics, logos, images, and software, is the property of MsCafe and is protected by copyright, trademark, and other intellectual property laws.
+ Use of Content: You may not use, reproduce, distribute, or create derivative works from any content on this website without our prior written permission.
+ Third-Party Content: Our website may contain content provided by third parties. We do not endorse or assume responsibility for any third-party content.
+
+
+
+
+ Limitation of Liability
+ Disclaimer: Our website and products are provided "as is" and "as available" without warranties of any kind, either express or implied. We disclaim all warranties, including but not limited to, implied warranties of merchantability and fitness for a particular purpose.
+ Limitation: MsCafe is not liable for any direct, indirect, incidental, or consequential damages arising from the use or inability to use our website or products. This limitation applies to any damages or injury caused by any failure of performance, error, omission, interruption, defect, delay in operation or transmission, computer virus, or line failure.
+
+
+
+ Changes to Terms and Conditions
+ Modifications: We reserve the right to modify these Terms at any time. Any changes will be effective immediately upon posting on our website. Your continued use of the website constitutes acceptance of the updated Terms.
+ Notification: We may provide notice of changes to these Terms by email or through other reasonable means.
+
+
+
+
+ );
+}
+
+export default Terms;
diff --git a/src/Pages/Testimonial.css b/src/Pages/Testimonial.css
index 54d8be5..cc06d94 100644
--- a/src/Pages/Testimonial.css
+++ b/src/Pages/Testimonial.css
@@ -1,4 +1,4 @@
-
+/* General Reset */
* {
margin: 0;
padding: 0;
@@ -54,8 +54,48 @@ h1 {
background: white;
border-radius: 10px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
- animation: fadeInUp 1s ease-in-out;
- transition: all 0.3s ease-in-out;
+ perspective: 1000px; /* Add perspective */
+}
+
+/* Inner card container for flipping */
+.card-inner {
+ position: relative;
+ width: 100%;
+ height: 100%;
+ transition: transform 0.6s;
+ transform-style: preserve-3d;
+}
+
+/* Flip effect on hover */
+.single:hover .card-inner {
+ transform: rotateY(180deg);
+}
+
+/* Front and Back Styling */
+.front, .back {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ backface-visibility: hidden;
+ top: 0;
+ left: 0;
+}
+
+/* Front Styling */
+.front {
+ transform: rotateY(0deg);
+}
+
+/* Back Styling */
+.back {
+ transform: rotateY(180deg);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background-color: white;
+ border-radius: 10px;
+ padding: 20px;
+ box-sizing: border-box;
}
/* Image Styling */
@@ -96,7 +136,7 @@ h1 {
}
/* Review Text Styling */
-.image-text p {
+.image-text p, .back p {
font-size: 1rem;
color: #333;
}
@@ -110,86 +150,94 @@ h1 {
/* Keyframe Animations */
@keyframes fadeIn {
0% {
- opacity: 0;
- transform: translateY(-20px);
+ opacity: 0;
+ transform: translateY(-20px);
}
100% {
- opacity: 1;
- transform: translateY(0);
+ opacity: 1;
+ transform: translateY(0);
}
}
@keyframes fadeInUp {
0% {
- opacity: 0;
- transform: translateY(20px);
+ opacity: 0;
+ transform: translateY(20px);
}
100% {
- opacity: 1;
- transform: translateY(0);
+ opacity: 1;
+ transform: translateY(0);
}
}
/* Responsive Styling for Tablets */
@media (max-width: 768px) {
h1 {
- font-size: 2rem;
+ font-size: 2rem;
}
.testimonial-row {
- flex-direction: column;
- align-items: center;
- gap: 1.5rem;
- padding: 3rem 0;
+ flex-direction: column;
+ align-items: center;
+ gap: 1.5rem;
+ padding: 3rem 0;
}
.single {
- max-width: 90%; /* Adjust card width */
- height: auto;
+ max-width: 90%; /* Adjust card width */
+ height: auto;
}
.image {
- width: 100px;
- height: 100px;
- top: -50px;
+ width: 100px;
+ height: 100px;
+ top: -50px;
}
.image-text h2 {
- font-size: 1.3rem;
+ font-size: 1.3rem;
}
.image-text p {
- font-size: 0.9rem;
+ font-size: 0.9rem;
}
}
/* Responsive Styling for Mobile Devices */
@media (max-width: 480px) {
h1 {
- font-size: 1.8rem;
+ font-size: 1.8rem;
}
.testimonial-row {
- flex-direction: column;
- gap: 1rem;
+ flex-direction: column;
+ gap: 1rem;
}
.single {
- max-width: 95%; /* Adjust card width */
- height: auto;
+ max-width: 95%; /* Adjust card width */
+ height: auto;
}
.image {
- width: 80px;
- height: 80px;
- top: -40px;
+ width: 80px;
+ height: 80px;
+ top: -40px;
}
.image-text h2 {
- font-size: 1.1rem;
+ font-size: 1.1rem;
}
.image-text p {
- font-size: 0.8rem;
+ font-size: 0.8rem;
}
}
+.heading{
+ font-weight: 1000;
+ font-size: 50px;
+ text-shadow: 4px 4px 4px rgba(0, 0, 0, 0.5);
+}
+.name{
+ font-weight: 500;
+}
diff --git a/src/Pages/Testimonial.js b/src/Pages/Testimonial.js
index b201855..2c0118b 100644
--- a/src/Pages/Testimonial.js
+++ b/src/Pages/Testimonial.js
@@ -6,12 +6,29 @@ function Testimonial() {
<>
-
What Our Customers Say
+
What Our Customers Say
-
+
-
-
+
+
@@ -59,11 +76,19 @@ function Testimonial() {
-
+
Previous
-
+
Next
@@ -78,20 +103,26 @@ function Testimonial() {
function TestimonialCard({ name, image, rating, text }) {
return (
-
-
-
-
-
{name}
-
{rating}
-
{text}
+
+
+
+
+
+
+
+
+
{name}
+
+
{rating}
+
+
+
);
}
-export default Testimonial;
-
-
-
+export default Testimonial;
diff --git a/src/Pages/cake.js b/src/Pages/cake.js
index b9e8f15..f5cfe16 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;
@@ -115,10 +120,55 @@ const QuantityDisplay = styled.span`
min-width: 20px;
text-align: center;
`;
+const SearchFilterContainer = styled.div`
+ display: flex;
+ justify-content: center;
+
+ margin-bottom: 2rem;
+
+`;
+const SearchInput = styled.input`
+ padding: 0.5rem;
+ font-size: 1rem;
+ border: 1px solid #ddd;
+ border-radius: 4px 0 0 4px;
+ outline: none;
+ width: 300px;
+
+ &:focus {
+ border-color: #6b4f4f;
+ }
+`;
+
+const SearchButton = styled.button`
+ padding: 0.5rem 1rem;
+ font-size: 1rem;
+ background: linear-gradient(145deg, #6b4f4f, #7d5858);
+ color: white;
+ border: none;
+ border-radius: 0 4px 4px 0;
+ cursor: pointer;
+ transition: background 0.3s ease;
+
+
+
+ &:hover {
+ background: linear-gradient(145deg, #7d5858, #8e6a6a);
+ }
+`;
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]) {
@@ -202,13 +252,54 @@ function Cake() {
return (
+
+
+ Our Cake Selection
+
+
Our Cake Selection
+
+
+ setSearchQuery(e.target.value)}
+ />
+ console.log("Search clicked!")}>
+ Search
+
+
+
+
{products.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)}
@@ -232,4 +323,5 @@ function Cake() {
);
}
+
export default Cake;
diff --git a/src/Pages/coffee.js b/src/Pages/coffee.js
index 99ed796..ffb6277 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
@@ -136,6 +137,15 @@ const QuantityDisplay = styled.span`
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]) {
@@ -357,7 +367,26 @@ function Coffee() {
{products.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)}
@@ -365,7 +394,7 @@ function Coffee() {
handleAddToCart(product)}>
Add to Cart
-
+
) : (
handleDecrement(product)}>-
diff --git a/src/Pages/contributor.js b/src/Pages/contributor.js
new file mode 100644
index 0000000..1f57095
--- /dev/null
+++ b/src/Pages/contributor.js
@@ -0,0 +1,189 @@
+import React, { useEffect, useState } from "react";
+import styled from "styled-components";
+import { motion } from "framer-motion";
+
+// Replace these with your repository details
+const REPO_OWNER = "Mujtabaa07";
+const REPO_NAME = "coffeeShop";
+const GITHUB_TOKEN = ""; // Optional: Add your GitHub personal access token to avoid rate limits
+
+// Function to fetch contributors for a specific page
+const fetchContributors = async (page, setContributors, setError) => {
+ try {
+ const response = await fetch(
+ `https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/contributors?page=${page}&per_page=20`,
+ {
+ headers: GITHUB_TOKEN ? { Authorization: `token ${GITHUB_TOKEN} `} : {},
+ }
+ );
+
+ if (!response.ok) throw new Error("Failed to fetch contributors");
+
+ const contributors = await response.json();
+ setContributors(contributors);
+ setError(false); // No error
+ } catch (error) {
+ console.error("Error fetching contributors:", error);
+ setContributors([]);
+ setError(true); // Set error state
+ }
+};
+
+const ContributorContainer = styled.div`
+ padding: 6rem 2rem;
+ max-width: 1900px;
+ margin: 0 auto;
+ background-color: #fffbeb;
+ background-image: url("https://png.pngtree.com/thumb_back/fh260/background/20231205/pngtree-creamy-textured-milk-colored-background-image_13815875.png");
+ background-size: cover;
+ background-position: center;
+ border-radius: 12px;
+`;
+
+const Title = styled(motion.h1)`
+ font-size: 3rem;
+ margin-bottom: 3rem;
+ text-align: center;
+ color: #7c2214;
+ font-weight: bold;
+ text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
+`;
+
+const ContributorsGrid = styled.div`
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
+ gap: 20px;
+ justify-items: center;
+ align-items: center;
+`;
+
+const ContributorCard = styled.div`
+ align-items: center;
+ justify-content: center;
+ background: #ffffff;
+ color: #333;
+ border-radius: 15px;
+ padding: 20px;
+ width: 250px;
+ box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
+ text-align: center;
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
+
+ &:hover {
+ transform: translateY(-10px);
+ box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
+ }
+
+ img {
+
+ width: 100px;
+ height: 100px;
+ border-radius: 50%;
+ border: 3px solid #ffcc00;
+ margin-bottom: 15px;
+ }
+
+ h3 {
+ font-size: 1.4rem;
+ margin: 10px 0;
+ }
+
+ a {
+ color: #ffcc00;
+ font-weight: bold;
+ text-decoration: none;
+ transition: color 0.3s ease;
+
+ &:hover {
+ color: #004e64;
+ }
+ }
+`;
+
+const PaginationControls = styled.div`
+ display: flex;
+ justify-content: center;
+ margin-top: 20px;
+
+ button {
+ background: #004e64;
+ color: white;
+ padding: 10px 20px;
+ border: none;
+ border-radius: 5px;
+ margin: 0 5px;
+ cursor: pointer;
+ font-size: 1rem;
+ transition: background 0.3s ease;
+
+ &:hover {
+ background: #007f8a;
+ }
+
+ &:disabled {
+ background: #ccc;
+ cursor: not-allowed;
+ }
+ }
+`;
+
+const Contributor = () => {
+ const [contributors, setContributors] = useState([]); // State for contributors
+ const [currentPage, setCurrentPage] = useState(1); // State for current page
+ const [error, setError] = useState(false); // Error state
+
+ useEffect(() => {
+ fetchContributors(currentPage, setContributors, setError);
+ }, [currentPage]); // Re-fetch contributors when the page changes
+
+ const handleNextPage = () => setCurrentPage((prev) => prev + 1);
+ const handlePrevPage = () => setCurrentPage((prev) => (prev > 1 ? prev - 1 : 1));
+
+ return (
+
+
+ Meet Our Contributors
+
+ {error ? (
+
+ Failed to load contributors. Please try again later.
+
+ ) : (
+ <>
+
+ {contributors.map((contributor) => (
+
+
+ {contributor.login}
+
+ GitHub Profile
+
+
+ ))}
+
+
+
+ Previous
+
+
+ Next
+
+
+ >
+ )}
+
+ );
+};
+
+export default Contributor;
\ No newline at end of file
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 */}
+
+
-
- Login
-
- {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 c05a732..d822729 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
@@ -132,10 +133,55 @@ const QuantityDisplay = styled.span`
min-width: 20px;
text-align: center;
`;
+const SearchFilterContainer = styled.div`
+ display: flex;
+ justify-content: center;
+
+ margin-bottom: 2rem;
+ gap: 5rem;
+`;
+const SearchInput = styled.input`
+ padding: 0.5rem;
+ font-size: 1rem;
+ border: 1px solid #ddd;
+ border-radius: 4px 0 0 4px;
+ outline: none;
+ width: 300px;
+
+ &:focus {
+ border-color: #6b4f4f;
+ }
+`;
+
+const SearchButton = styled.button`
+ padding: 0.5rem 1rem;
+ font-size: 1rem;
+ background: linear-gradient(145deg, #6b4f4f, #7d5858);
+ color: white;
+ border: none;
+ border-radius: 0 4px 4px 0;
+ cursor: pointer;
+ transition: background 0.3s ease;
+
+ &:hover {
+ background: linear-gradient(145deg, #7d5858, #8e6a6a);
+ }
+`;
+
+
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]) {
@@ -278,7 +324,26 @@ function Milkshake() {
{products.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)}
@@ -286,7 +351,7 @@ function Milkshake() {
handleAddToCart(product)}>
Add to Cart
-
+
) : (
handleDecrement(product)}>-
@@ -303,4 +368,5 @@ function Milkshake() {
);
}
+
export default Milkshake;
diff --git a/src/Pages/soup.js b/src/Pages/soup.js
index 26706a0..521ef31 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
@@ -136,6 +137,15 @@ const QuantityDisplay = styled.span`
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]) {
@@ -243,7 +253,26 @@ function Soup() {
{products.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)}
@@ -251,7 +280,7 @@ function Soup() {
handleAddToCart(product)}>
Add to Cart
-
+
) : (
handleDecrement(product)}>-
@@ -268,4 +297,5 @@ function Soup() {
);
}
+
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 3d4edbc..c26d3f9 100644
--- a/src/componets/Navbar.js
+++ b/src/componets/Navbar.js
@@ -129,7 +129,7 @@ const NavLink = styled(motion.div)`
font-size: 1.1rem;
transition: all 0.3s ease;
font-family: "Poppins", sans-serif;
- padding: 25px;
+padding: 20px;
&:hover {
color: #ffe4b5;
@@ -344,7 +344,7 @@ function Navbar() {
);
}
-
+
if (items.title === "User") {
return (
@@ -364,6 +364,18 @@ function Navbar() {
);
}
+
+ if(items.title === "Feedback"){
+ return(
+
+
+
+ {items.title}
+
+
+
+ );
+ }
return (
@@ -490,6 +502,11 @@ function Navbar() {
Contact
+
+
+ Feedback
+
+
{isLoggedIn ? (
<>
diff --git a/src/componets/Navitems.js b/src/componets/Navitems.js
index bad558d..5edd863 100644
--- a/src/componets/Navitems.js
+++ b/src/componets/Navitems.js
@@ -1,3 +1,4 @@
+
export const navItems = [
{
id: 1,
@@ -29,6 +30,13 @@ export const navItems = [
path: "./user",
cName: "nav-item",
},
+ {
+ id: 7,
+ title: "Feedback",
+ path: "./feedback",
+ cName: "nav-item",
+ },
+
];
export const productDropdown =[
@@ -98,10 +106,13 @@ export const userLoginDropdown = [
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 d4a983d..8b83975 100644
--- a/src/componets/footer.js
+++ b/src/componets/footer.js
@@ -1,117 +1,165 @@
-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
const FooterContainer = styled.footer`
- background-color: #78350f;
- color: #fffbeb;
- padding: 2rem 3rem 2rem;
- text-align: center;
- position: relative;
- bottom: 0;
- width: 100%;
- box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
-
+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;
+width: 100%;
+box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
`;
const FooterContent = styled.div`
- max-width: 1200px;
- margin: 0 auto;
-
- p {
- margin: 0.5rem 0;
- font-size: 1rem;
- line-height: 1.5rem;
-
- &:first-child {
- font-weight: 500;
- }
- }
+max-width: 1200px;
+margin: 0 auto;
+
+p {
+ margin: 0.5rem 0;
+ font-size: 1rem;
+ line-height: 1.5;
- @media (max-width:768px){
- display:flex;
- flex-direction:column;
+ &:first-child {
+ font-weight: 500;
}
+}
+
+@media (max-width: 768px) {
+ text-align: center;
+ padding: 1rem;
+}
`;
const InfoSection = styled.div`
- display: flex;
- justify-content: space-between;
- margin-top: 1.3rem;
- margin-bottom: 1.3rem;
- // text-align: left;
+display: flex;
+justify-content: space-between;
+align-items: flex-start;
+margin: 2rem 0;
+flex-wrap: wrap; /* Allow columns to wrap on smaller screens */
- @media (max-width: 768px) {
- flex-direction: column;
- gap:1.5rem;
+.infoimg {
+ height: auto;
+ max-height: 10rem;
+ width: 100%;
+ max-width: 10rem; /* Restrict size for smaller devices */
+ margin-bottom: 1rem;
+}
- }
-`;
+.info-wrapper {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 1rem;
+ width: 100%; /* Ensure it adapts to smaller devices */
+}
-const InfoColumn = styled.div`
- flex: 1;
- margin: 0 1rem;
+@media (max-width: 768px) {
+ flex-direction: column;
+ align-items: center;
- h3 {
- font-size: 1.2rem;
- margin-bottom: 1rem;
+ .infoimg {
+ max-width: 8rem;
+ max-height: auto;
}
- p, a {
- font-size: 0.9rem;
- color:rgb(255, 255, 255);
- text-decoration: none;
- display: block;
- margin-bottom: 0.5rem;
+ .info-wrapper {
+ justify-content: center;
+ gap: 2rem;
}
+}
+`;
- a:hover {
- color: #fbbf24;
- }
+const InfoColumn = styled.div`
+flex: 1 1 calc(25% - 2rem); /* Flexible width with margin space */
+margin: 0 1rem;
+text-align: left;
- @media (max-width:768px){
- h3{
- font-size:1.2rem;
- margin-bottom:0rem;
- }
+h3 {
+ font-size: 1.2rem;
+ margin-bottom: 1rem;
+ color: #ffd6a5;
+}
+
+p,
+a {
+ font-size: 0.9rem;
+ color: #fffbeb;
+ text-decoration: none;
+ margin-bottom: 0.5rem;
+ display: block;
+}
- p{
- font-size:1rem;
- margin:0rem;
- }
+a:hover {
+ color: #fbbf24;
+ text-decoration: underline;
+}
+@media (max-width: 768px) {
+ flex: 1 1 100%; /* Full width on smaller devices */
+ text-align: center;
+}
`;
const SocialIcons = styled.div`
- display: flex;
- justify-content: center;
- gap: 1rem; //additional gap removed.
- margin-top: 1rem;
+display: flex;
+justify-content: center;
+gap: 1rem;
+margin-top: 1.5rem;
- @media (max-width: 768px) {
- gap: 1.2rem;
- }
+@media (max-width: 768px) {
+ gap: 1.2rem;
+}
`;
const SocialIcon = styled(motion.a)`
- color: #fffbeb;
- font-size: 1.5rem;
- text-decoration: none;
- padding: 0.5rem;
- border-radius: 50%;
- transition: color 0.3s ease;
-
- &:hover {
- color: #fbbf24;
- transform: scale(1.2);
- }
+color: #fffbeb;
+font-size: 1.8rem;
+text-decoration: none;
+padding: 0.5rem;
+border-radius: 50%;
+transition: color 0.3s ease, transform 0.3s ease;
- @media (max-width: 768px) {
- font-size: 1.3rem;
- }
+&:hover {
+ transform: scale(1.2);
+ 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) {
+ font-size: 1.3rem;
+}
`;
+const Divider = styled.hr`
+border: none;
+height: 2px;
+background: #ffd6a5;
+margin: 2rem auto;
+width: 80%; /* Adjust width for responsiveness */
+`;
+
+
+
function Footer() {
return (
@@ -119,43 +167,75 @@ function Footer() {
{/* Social Icons */}
+
-
+ aria-label="Facebook">
+ {/* Facebook icon */}
+
- {/* 'className' should've been used instead of 'class'. */}
+ aria-label="LinkedIn"
+ role="link">
+ {/* LinkedIn icon */}
+
+
+
+ {/* Twitter icon */}
+
+
+
+ {/* Instagram icon */}
+
+
+
-
+ {/* GitHub icon */}
+
-
+
+ {/* Divider */}
+
+
{/* Informational Sections */}
-
+
+
+
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.
+
Quick Links
@@ -164,24 +244,80 @@ function Footer() {
About
Contact
Testimonial
+ Contributors
-
Contact Us
- Email: contact@mscafe.com
- Phone: (123) 456-7890
+ ✉️ contact@mscafe.com
+ ☎️ (123) 456-7890
+ We Accept
+
+
+ {/* applePay icon */}
+
+
+ {/* GPay icon */}
+
+
+ {/* Mastercard icon */}
+
+
+ {/* Visa icon */}
+
+
-
Location
123 Coffee St, Bean Town, USA
- View on Map
+
+
+ View on Map
+
+
+
+
+ {/* Footer Text */}
© {new Date().getFullYear()} MsCafe. All rights reserved.
- Made with ♥ by Mscoder
-
+ Made with ♥ by MsCoder
);