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
28,618 changes: 28,618 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
"@testing-library/user-event": "^14.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-scripts": "5.0.1"
"react-icons": "^4.6.0",
"react-router-dom": "^6.4.3",
"react-scripts": "5.0.1",
"reactstrap": "^9.1.5"
},
"scripts": {
"start": "react-scripts start",
Expand Down
308 changes: 281 additions & 27 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,38 +1,292 @@
.App {
text-align: center;
body {
font-size: 20px;
font-family: Montserrat, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
line-height: 1.5;
color: #575757;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: rgb(223, 223, 223);
}

.App-logo {
height: 40vmin;
pointer-events: none;
.mainDiv {
display: flex;
flex-direction: column;
width: 90vw;
padding: 20px 10px;
}

@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
@media (min-width: 600px) {
.mainDiv {
width: 50vw;
}
}

.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
@media (min-width: 992px) {
.mainDiv {
width: 26vw;
}
}

.App-link {
color: #61dafb;
.mainTitle {
font-size: 40px;
font-weight: bold;
margin-bottom: 25px;
text-align: center;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
.mainSubtitle {
margin-bottom: 20px;
}

.emptySpace {
height: 20vh;
}

.mainDivButton {
padding: 8px 12px;
margin-top: 10px;
cursor: pointer;
border-radius: 6px;
border: none;
line-height: 1.5;
}

#pickupButton {
color: white;
background-color: #3498ff;
-webkit-transition: all 0.25s;
-moz-transition: all 0.25s;
-ms-transition: all 0.25s;
-o-transition: all 0.25s;
transition: all 0.25s;
}

#pickupButton:active,
#pickupButton:hover {
background-color: #0e87ff;
outline: none;
}

#deliveryButton {
color: white;
background-color: #26be3a;
-webkit-transition: all 0.25s;
-moz-transition: all 0.25s;
-ms-transition: all 0.25s;
-o-transition: all 0.25s;
transition: all 0.25s;
}

#deliveryButton:active,
#deliveryButton:hover {
background-color: #019e0e;
outline: none;
}

.mainDivTitle {
width: 100%;
display: flex;
justify-content: center;
font-size: 24px;
font-weight: bold;
margin-bottom: 5px;
}

.pizzaDiv {
border: 1px solid grey;
border-radius: 6px;
display: flex;
padding: 8px 12px;
margin-top: 15px;
font-size: 25px;
z-index: 1;
}

.pizzaImage {
width: 100px;
height: 100px;
object-fit: cover;
margin-right: 10px;
}

.pizzaDescription {
width: 100%;
}

.choiceDiv {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
line-height: 1em;
margin-top: 5px;
}

.select {
height: 1.8rem;
box-sizing: border-box;
width: 40%;
cursor: pointer;
margin-left: 10px;
}

select:focus {
outline: 0px !important;
}

.input {
height: 1.8rem;
box-sizing: border-box;
width: 50%;
cursor: pointer;
}

input:focus {
outline: 0px !important;
}

#individualPizzaCostDiv {
font-size: 20px;
font-weight: bold;
}

.pizzaButtonDiv {
width: 100%;
margin-top: 15px;
display: flex;
justify-content: end;
}

.pizzaButton {
padding: 5px 10px;
cursor: pointer;
border-radius: 6px;
border: none;
line-height: 1.5;
color: white;
}

#addButton {
background-color: #26be3a;
-webkit-transition: all 0.25s;
-moz-transition: all 0.25s;
-ms-transition: all 0.25s;
-o-transition: all 0.25s;
transition: all 0.25s;
}

#addButton:active,
#addButton:hover {
background-color: #019e0e;
outline: none;
}

#removeButton {
background-color: #be2626;
-webkit-transition: all 0.25s;
-moz-transition: all 0.25s;
-ms-transition: all 0.25s;
-o-transition: all 0.25s;
transition: all 0.25s;
}

#removeButton:active,
#removeButton:hover {
background-color: #9e0101;
outline: none;
}

.grandTotalDiv {
display: flex;
justify-content: space-between;
font-size: 25px;
font-weight: bold;
padding: 20px 5px;
}

#confirmationDiv {
width: 100%;
margin-bottom: 10px;
}

.confirmButton {
width: 100%;
padding: 8px 12px;
font-size: 16px;
margin-bottom: 10px;
background-color: #26be3a;
-webkit-transition: all 0.25s;
-moz-transition: all 0.25s;
-ms-transition: all 0.25s;
-o-transition: all 0.25s;
transition: all 0.25s;
}

.confirmButton:active,
.confirmButton:hover {
background-color: #019e0e;
outline: none;
}

.backButton {
width: 100%;
padding: 8px 12px;
font-size: 16px;
background-color: #be2626;
-webkit-transition: all 0.25s;
-moz-transition: all 0.25s;
-ms-transition: all 0.25s;
-o-transition: all 0.25s;
transition: all 0.25s;
}

.backButton:active,
.backButton:hover {
background-color: #9e0101;
outline: none;
}

.checkoutChoiceSubDiv {
margin-top: 5px;
}

#checkoutPizzaCostDiv {
font-size: 20px;
font-weight: bold;
margin-bottom: 10px;
}

.noItemsDiv {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: 50px;
font-size: 25px;
}

.noItemsSubDiv {
margin-bottom: 20px;
}

.deliveryMethodDiv {
display: flex;
justify-content: space-between;
font-size: 20px;
font-weight: bold;
padding-left: 5px;
padding-right: 5px;
margin-bottom: 20px;
}

.pageNotFoundDiv {
display: flex;
flex-direction: column;
height: 100vh;
justify-content: center;
align-items: center;
font-size: 35px;
color: black;
}
45 changes: 24 additions & 21 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
import React from 'react';
import logo from './logo.svg';
import { React, Component } from 'react';
import './App.css';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'

function App() {
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>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
);
import MainPage from './pages/mainpage'
import PizzaCustomisationPage from './pages/pizzacustomisation'
import CheckoutPage from './pages/checkout'
import PageNotFound from './pages/pagenotfound'

class App extends Component {
render() {
return (
<div id="mainDiv">
<Router>
<Routes>
<Route path='/' element={<MainPage />} />
<Route path='/pizzacustomisation' element={<PizzaCustomisationPage />} />
<Route path='/checkout' element={<CheckoutPage />} />

{/* 404 page not found */}
<Route path='*' element={<PageNotFound />} />
</Routes>
</Router>
</div>
);
}
}

export default App;
9 changes: 0 additions & 9 deletions src/App.test.js

This file was deleted.

Binary file added src/assets/pagenotfound/sad_face.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading