Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 70 additions & 2 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"@reduxjs/toolkit": "^2.2.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^9.1.1"
"react-redux": "^9.1.1",
"react-router-dom": "^7.10.1"
},
"devDependencies": {
"@types/react": "^18.2.66",
Expand Down
22 changes: 19 additions & 3 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,28 @@
margin: 0;
padding: 0;
box-sizing: border-box;
overflow: hidden;
}

body {
overflow-x: hidden;
}

.app-container {
min-height: 100vh;
}

.main-content {
padding-top: 0;
min-height: calc(100vh - 100px);
overflow-y: auto;
}

.landing-page {
position: relative;
width: 100vw;
height: 100vh;
background-color: #f8f8f8;
overflow: hidden;
}

.background-image {
Expand All @@ -24,20 +38,21 @@
background-position: center;
filter: brightness(0.8);
}

.content {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
width: 100vw;
top: 100px;
top: 100px;
backdrop-filter: blur(4px);
background-color: rgba(0,0,0,0.5);
gap: 20px;
}

.landing_content {
margin-top: 430px;
margin-top: 430px;
margin-left: 100px;
transform: translate(-50%, -50%);
z-index: 1;
Expand Down Expand Up @@ -113,6 +128,7 @@
.product-list-container.visible {
top: 0;
}

/* LandingPage.css */
@media screen and (max-width: 768px) {
.content {
Expand Down
115 changes: 74 additions & 41 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,49 +1,82 @@

import React, { useState } from 'react';
import ProductList from './ProductList';
import './App.css';
import AboutUs from './AboutUs';
import React from "react";
import { BrowserRouter as Router, Routes, Route, Link } from "react-router-dom";
import ProductList from "./ProductList";
import CartItem from "./CartItem";
import Header from "./Header";
import "./App.css";

function App() {

const [showProductList, setShowProductList] = useState(false);

const handleGetStartedClick = () => {
setShowProductList(true);
};

const handleHomeClick = () => {
setShowProductList(false);
};

return (
<div className="app-container">
<div className={`landing-page ${showProductList ? 'fade-out' : ''}`}>
<div className="background-image"></div>
<div className="content">
<div className="landing_content">
<h1>Welcome To Paradise Nursery</h1>
<div className="divider"></div>
<p>Where Green Meets Serenity</p>

<button className="get-started-button" onClick={handleGetStartedClick}>
Get Started
</button>
</div>
<div className="aboutus_container">
<AboutUs/>
</div>
</div>

<Router>
<div className="app-container">
<Routes>
<Route
path="/"
element={
<div className="landing-page">
<div className="background-image"></div>
<div className="content">
<div className="landing_content">
<h1>Welcome To Paradise Nursery</h1>
<div className="divider"></div>
<p>Where Green Meets Serenity</p>
<Link to="/plants">
<button className="get-started-button">
Get Started
</button>
</Link>
</div>
<div className="aboutus_container">
<div className="about-us-container">
<p className="about-us-description">
Welcome to Paradise Nursery, where green meets serenity!
</p>
<p className="about-us-content">
At Paradise Nursery, we are passionate about bringing
nature closer to you. Our mission is to provide a wide
range of high-quality plants that not only enhance the
beauty of your surroundings but also contribute to a
healthier and more sustainable lifestyle.
</p>
<p className="about-us-content">
Our team of experts is dedicated to ensuring that each
plant meets our strict standards of quality and care.
Whether you're a seasoned gardener or just starting your
green journey, we're here to support you every step of
the way.
</p>
</div>
</div>
</div>
</div>
}
/>
<Route
path="/plants"
element={
<>
<Header />
<div className="main-content">
<ProductList />
</div>
</>
}
/>
<Route
path="/cart"
element={
<>
<Header />
<div className="main-content">
<CartItem />
</div>
</>
}
/>
</Routes>
</div>
<div className={`product-list-container ${showProductList ? 'visible' : ''}`}>
<ProductList onHomeClick={handleHomeClick}/>
</div>
</div>
</Router>
);
}

export default App;



Loading