Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
867726a
Install gh-pages to run app on website
patrickkok Oct 18, 2023
e7babe7
Add pages, add navbar, add router, add template sections
patrickkok Oct 21, 2023
9f71a7a
Create Book page, add QR code and links, add banner to mon main
patrickkok Oct 22, 2023
56e4f54
Add welcome note, add min-height to section image, create component f…
patrickkok Oct 24, 2023
4a0440e
Add current menu carousel, add current menu text
patrickkok Oct 27, 2023
b3ee3da
Reduce size of telegram channel QR code relative to booking code, Fix…
patrickkok Oct 27, 2023
3c418f0
Changed about us text, remove welcome message, reduced banner height
patrickkok Oct 27, 2023
2eaee35
Add FAQ section
patrickkok Oct 27, 2023
b10a393
Add margin below faq header, change Contact to Follow
patrickkok Oct 27, 2023
c446539
Adjust margins, add logo to navbar
patrickkok Oct 27, 2023
d2109b1
Adjust marigins on logo in navbar
patrickkok Oct 27, 2023
a12fa30
Update README with user stories and wireframe
patrickkok Oct 31, 2023
3d9762d
Fix width of page being more than 100% of viewport, Adjust margin and…
patrickkok Oct 31, 2023
24ddbcf
Add subheader to FAQ section
patrickkok Oct 31, 2023
4a6db3b
Edit alt text in booking page
patrickkok Oct 31, 2023
69add4b
Adjust margins in navbar dropdown menu, change carousel items to be g…
patrickkok Nov 1, 2023
cf13fb7
Edit comment in PastMenus, add Celina to user stories
patrickkok Nov 4, 2023
63f32fe
Edit user stories to correct spelling and include contact use case
patrickkok Nov 4, 2023
b5b6592
Add detailed past menu with carousel and item decriptions
patrickkok Nov 7, 2023
7427e73
Change Navbar background colour to match logo, change other greys to …
patrickkok Nov 7, 2023
295dc3e
Change past menu, add image sto past menu carousel
patrickkok Nov 7, 2023
ea8f049
Change end to flex-end
patrickkok Nov 9, 2023
3d69343
Add footer component, add missing images to past menus and remove pla…
patrickkok Nov 10, 2023
ce7aba4
Add css to center icons, change class to className in icons
patrickkok Nov 14, 2023
2df0c0f
Add key prop to components to fix error message
patrickkok Nov 14, 2023
d455ac6
Add book button to past menus page
patrickkok Nov 14, 2023
c34c1ba
Shift css from js file to css file
patrickkok Nov 14, 2023
c2f214b
Add background to book page
patrickkok Nov 14, 2023
4607a72
Fix padding on about text container
patrickkok Nov 18, 2023
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
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,15 @@ Open [http://localhost:3000](http://localhost:3000) to view it in your browser.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also include how to install your dependencies to get the project going

The page will reload when you make changes.\
You may also see any lint errors in the console.

### User stories
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really nice user stories and wireframe


Kayla - A working woman in her 40s wanting to find a place to host her husband's 50th birthday at someplace special. She likes asian food and is adventerous when it comes to trying new things. She wants to determine whether initmatesuppers is a good place to host her husband's 50th birthday party and if she decides she likes the place, she will contact intimatesuppers for further enquiries.

Mike - A working adult who has found out about initmatesuppers from a friend, he wants to know more about how this private dining operates. He wants to determine if he can host his family there for dinner with 3 children below 5 years old for his family's Christmas dinner on the 25th of December.

Celina - The owner of intimatesuppers, she gets asked many questions about similar topics. She would like a place where she can refer potential customers to view information about the private dining and see answers to frequently asked questions.

### Wireframe

https://www.figma.com/file/uBQ9qzYkmOFW529FQ53qDu/Bootcamp-Project-1-Idea?type=design&node-id=0%3A1&mode=design&t=p8Z5vPbbR15g5LX6-1
19,269 changes: 4,924 additions & 14,345 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
{
"name": "project1-bootcamp",
"version": "0.1.0",
"homepage": "https://patrickkok.github.io/project1-bootcamp",
"private": true,
"dependencies": {
"bootstrap": "^5.3.2",
"react": "^18.1.0",
"react-bootstrap": "^2.9.0",
"react-dom": "^18.1.0",
"react-router-dom": "^6.17.0",
"react-scripts": "5.0.1"
},
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
"start": "react-scripts start",
"build": "react-scripts build"
},
Expand All @@ -27,5 +33,8 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"gh-pages": "^6.0.0"
}
}
Binary file added public/favicon-is.ico
Binary file not shown.
6 changes: 5 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="%PUBLIC_URL%/favicon-is.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
Expand All @@ -25,6 +25,10 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Rocket Bootcamp Project</title>
<script
src="https://kit.fontawesome.com/6bd3daa2d2.js"
crossorigin="anonymous"
></script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
74 changes: 66 additions & 8 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,76 @@
text-align: center;
}

.App-logo {
height: 40vmin;
pointer-events: none;
.row {
margin-left: 0;
margin-right: 0;
}

.App-header {
background-color: #282c34;
min-height: 100vh;
.collapsed,
.navbar-toggler {
margin-right: 20px;
}

.dropdown-item {
text-align: center;
}

.navbar-brand {
margin-left: 20px;
}

.welcome {
height: 50vh;
display: flex;
justify-content: center;
align-items: center;
}

.section-text-container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100%;
padding: 20px;
}

.welcome-msg {
background-color: #ffffff;
border-radius: 15px;
padding: 30px 50px;
}

.about {
padding-left: 3%;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is 3% padding? I think using percentages here can be confusing. I would rather use pixels

padding-right: 3%;
}

.curr-menu {
min-height: 600px;
}

.car-item {
background-size: cover;
background-position: center;
}

.car-caption {
background-color: rgba(0, 0, 0, 0.5);
padding: 10px 40px;
}

.date-container {
width: 100%;
display: flex;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
.date-col {
width: 50%;
}

.follow {
background-color: #a6a6a6;
padding: 30px 0;
margin-bottom: -10px;
}
112 changes: 104 additions & 8 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,113 @@
//React Components
import React from "react";
import logo from "./logo.png";
import OurNav from "./Components/OurNav.js";
import About from "./Components/About.js";
import ImgDivider from "./Components/ImgDivider.js";
import CurrMenu from "./Components/CurrMenu.js";
import { Link } from "react-router-dom";
import FAQ from "./Components/FAQ.js";
import Follow from "./Components/Follow.js";

//Images
import backgroundWide1 from "./images/backgroundWide1.jpg";
import rendangCrostini from "./images/rendangCrostini.jpg";

//CSS
import "./App.css";

class App extends React.Component {
componentDidMount = () => {
// get id from URL
if (window.location.href.includes("#")) {
const urlList = window.location.href.split("#");
const id = urlList[urlList.length - 1];

document.querySelector(`#${id}`).scrollIntoView();
}
};

moveTo = (id) => {
document.querySelector(`#${id}`).scrollIntoView();
};
Comment on lines +21 to +31
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice hack you found here. However, for react, we don't want to directly select the DOM elements. Since we work with a shadow DOM, we want to work on that one instead. To do that, we can use a reference, short Ref

https://stackoverflow.com/questions/43441856/how-to-scroll-to-an-element


currDates = (
<div className="section-text-container">
<h1>Our Current Menu</h1>
<p>
It's the festive season! checkout our upcoming menu{" "}
{window.innerWidth < 992 ? "below the dates" : "to the left"}
</p>
<h3>Dinner dates:</h3>
<div className="date-container">
<div className="date-col">
<h4>Nov:</h4>
<p>8 to 11 (Wed to Sat)</p>
<p>15 to 18 (Wed to Sat)</p>
<p>22 to 25 (Wed to Sat)</p>
Comment on lines +44 to +46
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoding this is fine for now. Later it would be good to make this dynamic! Maybe have a calendar of sorts, and print the Wed to Saturday dates there for whichever months you are listing here. Maybe you could also make it the whole year with a collapsible to show everything beyond the current 2 months? You can probably achieve this with the library datefns or moment :)

</div>
<div className="date-col">
<h4>Dec:</h4>
<p>6 to 9 (Wed to Sat)</p>
<p>13 to 16 (Wed to Sat)</p>
<p>22 & 23 (Fri & Sat)</p>
<p>29 & 30 (Fri & Sat)</p>
</div>
</div>
<p>
$148/pax, BYOB no corkage charges! Reservations in groups of 6 to 12 pax
from 7pm till 10.30pm
</p>
<p>
for 8pax or more, additional mains will be served as indicated in the
menu
</p>

<Link to="/project1-bootcamp/book" className="btn btn-dark">
Book Now!
</Link>
</div>
);

render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
</header>
<div className="App container-fluid p-0 m-0">
<div className="row">
<OurNav />
</div>
<div className="row">
<div
className="col-12 welcome"
style={{
backgroundImage: `url(${backgroundWide1})`,
backgroundSize: "cover",
backgroundPosition: "center",
}}
></div>
</div>
<div className="row" id="about">
<div className="col-lg-6 p-0">
<About />
</div>
<ImgDivider img={rendangCrostini} />
</div>
<div className="row" id="curr-menu">
<div className="col-lg-6 col-sm-12 d-lg-none p-0">
{this.currDates}
</div>
<div className="col-lg-6 p-0">
<CurrMenu />
</div>
<div className="col-lg-6 col-sm-12 d-lg-block d-none p-0">
{this.currDates}
</div>
</div>
<div className="row" id="faq">
<FAQ />
</div>

<div id="follow" className="follow">
<Follow />
</div>
</div>
);
}
Expand Down
35 changes: 35 additions & 0 deletions src/Components/About.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//React Components
import React from "react";

class About extends React.Component {
render() {
return (
<div className="section-text-container about">
<h1>About Us</h1>
<p>
Welcome to our home in Upper Thomson where I, Celina and my Hubs, Kok
will cook for you! Our food is inspired by the big bold flavours of
Asia, and fueled by our passion for cooking and creating.
</p>
<p>
Each menu is designed to highlight specific regions in Asia like
Indonesia, South Asia, Indochina and North Asia. The process starts
with researching the cuisine, then cooking, adapting and reinventing
the dish to a version we like. There is a large variety and abundance
of fresh Asian herbs and spices in our local markets and it’s a joy
finding new ways of using them. We focus on dishes less common among
the local restaurants, so that your experience here can be a
refreshing, food adventure!
</p>
<p>
We host intimatesuppers in our home near Old Upper Thomson Road, among
the lush greenery of Pierce Reservoir. Guests can sit out on our patio
to enjoy their drinks before dinner begins.
</p>
<p>We hope to see you here soon!</p>
</div>
);
}
}

export default About;
60 changes: 60 additions & 0 deletions src/Components/CurrMenu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
//React components
import React from "react";
import Carousel from "react-bootstrap/Carousel";

//images
import festMenu from "../images/current-menu/festive-menu.png";
import bruleePork from "../images/current-menu/brulee-pork-belly.jpg";
import yellowCurryBakedFish from "../images/current-menu/yellow-curry-baked-fish.jpg";
import asianTrifle from "../images/current-menu/asian-trifle.jpg";

class CurrMenu extends React.Component {
currMenuTitleList = [
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice use of a data structure. Since this is all static information though, I would define it outside of the component so it doesn't need to get redefined on every re-render

{
image: festMenu, //image item here
caption: false,
},
{
image: bruleePork, //image item here
caption: true,
title: "Brulee Pork Belly",
description:
"Plump pork belly with brule skin, served with homemade kimchi.",
},
{
image: yellowCurryBakedFish, //image item here
caption: true,
title: "yellow Curry Baked Fish",
description:
"This fish is backed to lock in the flavours and moisture resulting in a juicy and flavourful fish each time.",
},
{
image: asianTrifle, //image item here
caption: true,
title: "Asian Trifle",
description: "Our unique asian style trifle to finish of the meal.",
},
];
render() {
return (
<Carousel interval={10000}>
{this.currMenuTitleList.map((object, index) => (
<Carousel.Item key={index}>
<div
className="curr-menu car-item"
style={{ backgroundImage: `url(${object.image})` }}
></div>
Comment on lines +43 to +46
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use <img> here? :) Not wrong, just a question

{object.caption && (
<Carousel.Caption className="car-caption">
<h3>{object.title}</h3>
<p>{object.description}</p>
</Carousel.Caption>
)}
</Carousel.Item>
))}
</Carousel>
);
}
}

export default CurrMenu;
Loading