From 1d9cf63ee52e913f88c5e43a64f883128acb4b37 Mon Sep 17 00:00:00 2001 From: areebsattar Date: Mon, 26 Feb 2024 01:20:32 +0000 Subject: [PATCH 01/28] created footer and rendered it to the bottom of the page --- src/components/App/App.jsx | 9 +++++++++ src/components/App/App.scss | 18 ++++++++++++++++-- src/components/Footer/Footer.jsx | 16 ++++++++++++++++ src/components/Footer/Footer.scss | 5 +++++ src/main.jsx | 3 +++ 5 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 src/components/Footer/Footer.jsx create mode 100644 src/components/Footer/Footer.scss diff --git a/src/components/App/App.jsx b/src/components/App/App.jsx index 7035044..f6dd53f 100644 --- a/src/components/App/App.jsx +++ b/src/components/App/App.jsx @@ -1,5 +1,6 @@ import Bookings from "@/components/Bookings/Bookings.jsx"; import "./App.scss"; +import Footer from "../Footer/Footer"; const App = () => (
@@ -7,6 +8,14 @@ const App = () => (

CYF Hotel

+
); diff --git a/src/components/App/App.scss b/src/components/App/App.scss index 69b6530..9ef363d 100644 --- a/src/components/App/App.scss +++ b/src/components/App/App.scss @@ -1,8 +1,22 @@ -.app { -} .app { display: grid; + grid-template-rows: auto 1fr auto; /* Set up three rows - header, content, footer */ max-width: var(--space--container); margin: auto; padding: var(--space--gap); + min-height: 100vh; /* Ensure the container takes at least the full height of the viewport */ +} + +.app__header { + background-color: var(--color--paper); + padding: var(--space--m); +} + +.app__heading { + margin: 0; +} + +.footer { + background-color: var(--color--paper); + padding: var(--space--m); } diff --git a/src/components/Footer/Footer.jsx b/src/components/Footer/Footer.jsx new file mode 100644 index 0000000..83a8357 --- /dev/null +++ b/src/components/Footer/Footer.jsx @@ -0,0 +1,16 @@ +import React from "react"; +import "./Footer.scss" + +export default function Footer(props) { + return ( + <> + + + ); +} diff --git a/src/components/Footer/Footer.scss b/src/components/Footer/Footer.scss new file mode 100644 index 0000000..0348a0d --- /dev/null +++ b/src/components/Footer/Footer.scss @@ -0,0 +1,5 @@ +.footer { + margin-top: auto; + background-color: var(--color--paper); + padding: var(--space--m); +} \ No newline at end of file diff --git a/src/main.jsx b/src/main.jsx index 1e57698..811364e 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -3,6 +3,9 @@ import ReactDOM from "react-dom/client"; import App from "@/components/App/App.jsx"; import "./index.css"; + + + ReactDOM.createRoot(document.getElementById("root")).render( From bfa8acaf4e05655ca15f3b400f682c159ffd446e Mon Sep 17 00:00:00 2001 From: OrlandoMoralesKuan Date: Mon, 26 Feb 2024 16:53:10 +0000 Subject: [PATCH 02/28] Import the SearchButton component into Search file --- src/components/Search/Search.jsx | 4 +++- src/components/SearchButton/SearchButton.jsx | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/Search/Search.jsx b/src/components/Search/Search.jsx index eb19775..e77485c 100644 --- a/src/components/Search/Search.jsx +++ b/src/components/Search/Search.jsx @@ -1,4 +1,5 @@ import "./Search.scss"; +import SearchButton from "../SearchButton/SearchButton"; const Search = () => (
@@ -15,7 +16,8 @@ const Search = () => ( className="search__input" placeholder="Customer name" /> - + + {SearchButton}
); diff --git a/src/components/SearchButton/SearchButton.jsx b/src/components/SearchButton/SearchButton.jsx index 8b13789..1284b96 100644 --- a/src/components/SearchButton/SearchButton.jsx +++ b/src/components/SearchButton/SearchButton.jsx @@ -1 +1,7 @@ +import React from "react"; +const SearchButton = () => { + return ; +}; + +export default SearchButton; From 33c1cce66cc3b408a9ffeb6cda372b114aa827f6 Mon Sep 17 00:00:00 2001 From: Sabella-8 Date: Mon, 26 Feb 2024 21:10:43 +0000 Subject: [PATCH 03/28] feature card --- src/components/App/App.jsx | 3 ++- src/components/Card/Card.jsx | 20 +++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/components/App/App.jsx b/src/components/App/App.jsx index 7035044..2220914 100644 --- a/src/components/App/App.jsx +++ b/src/components/App/App.jsx @@ -1,12 +1,13 @@ import Bookings from "@/components/Bookings/Bookings.jsx"; import "./App.scss"; - +import Deck from "../Deck/Deck"; const App = () => (

CYF Hotel

+
); diff --git a/src/components/Card/Card.jsx b/src/components/Card/Card.jsx index b93f799..a3dff1a 100644 --- a/src/components/Card/Card.jsx +++ b/src/components/Card/Card.jsx @@ -1,9 +1,15 @@ -// import "./Card.scss"; +import React from "react"; +import "./Card.scss"; -// const Card = ({ title, url, image }) => { -// return ( +const Card = (props) => { + const { title, url, image } = props; + return ( +
+

{title}

+ {title} + Visit {title} +
+ ); +}; -// ); -// }; - -// export default Card; +export default Card; From 205be4521c3b708f61488ef93a34b41687068c4d Mon Sep 17 00:00:00 2001 From: Sabella-8 Date: Mon, 26 Feb 2024 21:15:24 +0000 Subject: [PATCH 04/28] feature-deck --- src/components/Deck/Deck.jsx | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/components/Deck/Deck.jsx b/src/components/Deck/Deck.jsx index 9760d2b..c9215bc 100644 --- a/src/components/Deck/Deck.jsx +++ b/src/components/Deck/Deck.jsx @@ -1,11 +1,20 @@ -// import Card from "@/components/Card/Card"; -// import "./Deck.scss"; -// import cardsData from "@/data/fakeCards.json"; +import Card from "@/components/Card/Card"; +import "./Deck.scss"; +import cardsData from "@/data/fakeCards.json"; -// const Deck = () => { -// you will need to map over the cardsData array and render a Card component for each card object -// how will you pass props to the Card component? +const Deck = (props) => { + return ( +
+ {cardsData.map((city, index) => ( + + ))} +
+ ); +}; -// }; - -// export default Deck; +export default Deck; From 8e63c3919374e09455b55d5f8fcdf1ea24e5602a Mon Sep 17 00:00:00 2001 From: Sabella-8 Date: Mon, 26 Feb 2024 21:33:56 +0000 Subject: [PATCH 05/28] card --- src/components/Card/Card.jsx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/components/Card/Card.jsx b/src/components/Card/Card.jsx index b93f799..a3dff1a 100644 --- a/src/components/Card/Card.jsx +++ b/src/components/Card/Card.jsx @@ -1,9 +1,15 @@ -// import "./Card.scss"; +import React from "react"; +import "./Card.scss"; -// const Card = ({ title, url, image }) => { -// return ( +const Card = (props) => { + const { title, url, image } = props; + return ( +
+

{title}

+ {title} + Visit {title} +
+ ); +}; -// ); -// }; - -// export default Card; +export default Card; From 6219d16d85be8eab6411f9c7ca133dbb9a1739e9 Mon Sep 17 00:00:00 2001 From: Sabella-8 Date: Mon, 26 Feb 2024 21:42:37 +0000 Subject: [PATCH 06/28] feature-card --- src/components/App/App.jsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/App/App.jsx b/src/components/App/App.jsx index 2220914..4ce89ab 100644 --- a/src/components/App/App.jsx +++ b/src/components/App/App.jsx @@ -1,13 +1,11 @@ import Bookings from "@/components/Bookings/Bookings.jsx"; import "./App.scss"; -import Deck from "../Deck/Deck"; const App = () => (

CYF Hotel

-
); From 747b76a4a85822ec5c73d14523acf528b0f1f7d2 Mon Sep 17 00:00:00 2001 From: Sabella-8 Date: Tue, 27 Feb 2024 11:52:29 +0000 Subject: [PATCH 07/28] feature-deck --- src/components/App/App.jsx | 3 ++- src/components/Card/Card.jsx | 2 +- src/data/fakeCards.json | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/App/App.jsx b/src/components/App/App.jsx index 7035044..2220914 100644 --- a/src/components/App/App.jsx +++ b/src/components/App/App.jsx @@ -1,12 +1,13 @@ import Bookings from "@/components/Bookings/Bookings.jsx"; import "./App.scss"; - +import Deck from "../Deck/Deck"; const App = () => (

CYF Hotel

+
); diff --git a/src/components/Card/Card.jsx b/src/components/Card/Card.jsx index a3dff1a..c9de6f9 100644 --- a/src/components/Card/Card.jsx +++ b/src/components/Card/Card.jsx @@ -7,7 +7,7 @@ const Card = (props) => {

{title}

{title} - Visit {title} + {title}
); }; diff --git a/src/data/fakeCards.json b/src/data/fakeCards.json index f8e5dfa..e29dfec 100644 --- a/src/data/fakeCards.json +++ b/src/data/fakeCards.json @@ -2,16 +2,16 @@ { "title": "Glasgow", "url": "https://peoplemakeglasgow.com", - "image": "placeholderImage.svg" + "image": "https://2f1a7f9478.visitscotland.net/binaries/content/gallery/visitscotland/cms-images/2023/04/06/queens-park" }, { "title": "Manchester", "url": "https://visitmanchester.com", - "image": "placeholderImage.svg" + "image": "https://media.wired.co.uk/photos/6357b98e09e6f1942a2a8a9a/16:9/w_1920,c_limit/HSBC%20MANCHESTER.jpeg" }, { "title": "London", "url": "https://visitlondon.com", - "image": "placeholderImage.svg" + "image": "https://media.istockphoto.com/id/1347665170/photo/london-at-sunset.jpg?s=1024x1024&w=is&k=20&c=ogVKCS26t23fSvgCO77CC_6mhtxMDk2cmBOUQ9VamYo=" } ] From d35bbef202a49a34de244e32fc2cdc7680f3725d Mon Sep 17 00:00:00 2001 From: OrlandoMoralesKuan Date: Tue, 27 Feb 2024 20:19:29 +0000 Subject: [PATCH 08/28] fixing the SearchButton component --- src/components/Search/Search.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/Search/Search.jsx b/src/components/Search/Search.jsx index e77485c..9ee9aff 100644 --- a/src/components/Search/Search.jsx +++ b/src/components/Search/Search.jsx @@ -17,7 +17,6 @@ const Search = () => ( placeholder="Customer name" /> - {SearchButton} ); From f2268afaf020cbf17bab2e3a01b6a192278e588c Mon Sep 17 00:00:00 2001 From: Sabella-8 Date: Tue, 27 Feb 2024 22:28:53 +0000 Subject: [PATCH 09/28] MERGINING DECK --- src/components/App/App.jsx | 3 ++- src/components/Deck/Deck.jsx | 27 ++++++++++++++++++--------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/components/App/App.jsx b/src/components/App/App.jsx index f6dd53f..70dd9e7 100644 --- a/src/components/App/App.jsx +++ b/src/components/App/App.jsx @@ -1,13 +1,14 @@ import Bookings from "@/components/Bookings/Bookings.jsx"; import "./App.scss"; import Footer from "../Footer/Footer"; - +import Deck from "../Deck/Deck"; const App = () => (

CYF Hotel

+