Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into fix/card-css-issue-12
Browse files Browse the repository at this point in the history
  • Loading branch information
yashpandav committed Jan 1, 2025
2 parents 6993530 + 59ab937 commit 6505c91
Show file tree
Hide file tree
Showing 18 changed files with 1,234 additions and 171 deletions.
6 changes: 6 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Poppins:wght@400;500;600&display=swap" rel="stylesheet" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
Expand All @@ -24,7 +25,11 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<link href="./App.css" rel="stylesheet">
<link href="./index.css" rel="stylesheet">
<title>MsCafe</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
</head>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand All @@ -39,5 +44,6 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
</body>
</html>
3 changes: 3 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
.App {
text-align: center;
}
Expand Down
9 changes: 9 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,22 @@ import Navbar from './componets/Navbar';
import Footer from './componets/footer';
import Home from './Pages/Home';
import Login from './Pages/login';
import Register from './Pages/Register';
import Shop from './Pages/Shop';
import Cart from './Pages/cart';
import About from './Pages/About';
import Contact from './Pages/contact';
import Profile from './Pages/profile';
import Checkout from './Pages/checkOut';
import Testimonial from './Pages/Testimonial';



const AppContainer = styled.div`
display: flex;
flex-direction: column;
min-height: 100vh;
color: #7c2214;
`;

const ContentContainer = styled.div`
Expand All @@ -34,14 +39,18 @@ function App() {
<Routes>
<Route path="/" element={<Home />} />
<Route path="/login" element={<Login />} />
<Route path="/register" element={<Register />} />
<Route path="/home" element={<Home />} />
<Route path="/shop" element={<Shop />} />
<Route path="/cart" element={<Cart />} />
<Route path="/about" element={<About />} />
<Route path="/testimonial" element={<Testimonial/>} />
<Route path="/contact" element={<Contact />} />
<Route path="/profile" element={<Profile />} />
<Route path="/checkout" element={<Checkout />} />
</Routes>
</ContentContainer>

<Footer />
</AppContainer>
</Router>
Expand Down
31 changes: 24 additions & 7 deletions src/Pages/About.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,56 @@ import { motion } from 'framer-motion';
import Button from '../componets/Button';

const AboutContainer = styled.div`
padding: 4rem 2rem;
padding: 6rem 2rem 4rem 2rem;
max-width: 1200px;
margin: 0 auto;
background-color: #fffbeb;
`;

const Title = styled(motion.h1)`
font-size: 2.5rem;
margin-bottom: 2rem;
margin-bottom: 3rem;
text-align: center;
color: #78350f;
font-weight: bold;
`;

const Content = styled(motion.div)`
display: flex;
flex-direction: column;
gap: 2rem;
gap: 3rem;
max-width: 1100px;
margin: 0 auto;
@media (min-width: 768px) {
flex-direction: row;
align-items: center;
}
`;

const TextContent = styled(motion.div)`
flex: 1;
p {
color: #92400e;
font-size: 1.1rem;
line-height: 1.8;
margin-bottom: 1.5rem;
}
`;

const ImageContent = styled(motion.div)`
flex: 1;
display: flex;
justify-content: center;
align-items: center;
padding: 1rem;
`;

const Image = styled(motion.img)`
max-width: 100%;
height: auto;
border-radius: 8px;
border-radius: 12px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
`;

function About() {
Expand All @@ -50,7 +64,7 @@ function About() {
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
>
About MsCafe
About MsCafe
</Title>
<Content>
<TextContent
Expand All @@ -71,7 +85,10 @@ function About() {
animate={{ opacity: 1, x: 0 }}
transition={{ duration: 0.5, delay: 0.4 }}
>
<Image src="https://img.freepik.com/free-photo/digital-lavender-style-interior-design_23-2151561226.jpg?t=st=1727763316~exp=1727766916~hmac=621a2fad85c2229414cc73a6d1c40e4525802c326c6494db624ca97d2fda6bc2&w=1380" alt="Zumar Cafe Interior" />
<Image
src="https://img.freepik.com/free-photo/digital-lavender-style-interior-design_23-2151561226.jpg?t=st=1727763316~exp=1727766916~hmac=621a2fad85c2229414cc73a6d1c40e4525802c326c6494db624ca97d2fda6bc2&w=1380"
alt="Zumar Cafe Interior"
/>
</ImageContent>
</Content>
</AboutContainer>
Expand Down
98 changes: 98 additions & 0 deletions src/Pages/Home.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/* CafeHome.css */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Poppins:wght@300;400;500;600&display=swap');

:root {
--primary-coffee: #8B4513;
--secondary-coffee: #D2691E;
--cream: #FFE4B5;
--light-cream: #FDF5E6;
--dark-coffee: #2C130B;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
width: 10px;
}

::-webkit-scrollbar-track {
background: var(--light-cream);
}

::-webkit-scrollbar-thumb {
background: var(--primary-coffee);
border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
background: var(--secondary-coffee);
}

/* Smooth Scroll Behavior */
html {
scroll-behavior: smooth;
}

/* Coffee Steam Animation */
@keyframes steam {
0% {
transform: translateY(0) translateX(-50%) scale(1);
opacity: 0.8;
}
50% {
transform: translateY(-20px) translateX(-50%) scale(1.2);
opacity: 0.4;
}
100% {
transform: translateY(-40px) translateX(-50%) scale(1);
opacity: 0;
}
}

.steam {
position: absolute;
top: -20px;
left: 50%;
transform: translateX(-50%);
font-size: 1.5rem;
color: var(--cream);
pointer-events: none;
animation: steam 3s infinite;
}

/* Feature Card Hover Effect */
.feature-card:hover .steam {
opacity: 1;
}

/* Image Loading Animation */
.lazy-image {
opacity: 0;
transition: opacity 0.3s ease-in-out;
}

.lazy-image.loaded {
opacity: 1;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
.hero-section {
background-attachment: scroll;
}

.feature-card {
margin: 1rem;
}

.specialty-image {
width: 250px;
height: 250px;
margin: 1rem;
}
}

/* Text Selection Color */
::selection {
background: var(--secondary-coffee);
color: var(--cream);
}
Loading

0 comments on commit 6505c91

Please sign in to comment.