Skip to content

Commit

Permalink
adding front end
Browse files Browse the repository at this point in the history
  • Loading branch information
vsteere committed Oct 10, 2020
1 parent beb9b56 commit d3370a7
Show file tree
Hide file tree
Showing 24 changed files with 306 additions and 129 deletions.
2 changes: 1 addition & 1 deletion controllers/meally_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ router.get("/", function (req, res) {
});
});

//this will write the new burger to the database
//this will write the new order to the database
router.post("/api/orders", function (req, res) {
db.exportsmeally.createOne([
"new_order"
Expand Down
77 changes: 62 additions & 15 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"dependencies": {
"bcryptjs": "2.4.3",
"express": "^4.17.0",
"express-handlebars": "^5.1.0",
"express-session": "^1.16.1",
"mysql2": "^1.6.5",
"passport": "^0.4.0",
Expand Down
Binary file added public/images/meal.ly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/onepage_restaurant.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions public/js/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ $(document).ready(() => {
passwordInput.val("");
});

// loginUser does a post to our "api/login" route and if successful, redirects us the the members page
// loginUser does a post to our "api/login" route and if successful, redirects us the the orders page
function loginUser(email, password) {
$.post("/api/login", {
email: email,
password: password
})
.then(() => {
window.location.replace("/members");
window.location.replace("/orders");
// If there's an error, log the error
})
.catch(err => {
Expand Down
1 change: 1 addition & 0 deletions public/js/moment.min.js

Large diffs are not rendered by default.

File renamed without changes.
2 changes: 1 addition & 1 deletion public/js/signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $(document).ready(() => {
password: password
})
.then(() => {
window.location.replace("/members");
window.location.replace("/orders");
// If there's an error, handle it by throwing up a bootstrap alert
})
.catch(handleLoginErr);
Expand Down
45 changes: 0 additions & 45 deletions public/login.html

This file was deleted.

35 changes: 0 additions & 35 deletions public/members.html

This file was deleted.

5 changes: 5 additions & 0 deletions public/stylesheets/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@


h1 {
color: red;
}
23 changes: 23 additions & 0 deletions public/stylesheets/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="/index.css">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>

<body>
<h1>Hello</h1>
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action active">
Cras justo odio
</a>
<a href="#" class="list-group-item list-group-item-action">Dapibus ac facilisis in</a>
<a href="#" class="list-group-item list-group-item-action">Morbi leo risus</a>
<a href="#" class="list-group-item list-group-item-action">Porta ac consectetur ac</a>
<a href="#" class="list-group-item list-group-item-action disabled" tabindex="-1" aria-disabled="true">Vestibulum at eros</a>
</div>
</body>

</html>
20 changes: 20 additions & 0 deletions public/stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,23 @@ form.signup,
form.login {
margin-top: 50px;
}

body,h1,h5 {font-family: "Raleway", sans-serif}
body, html {height: 100%}
.bgimg {
background-image: url('/Images/onepage_restaurant.jpg');
min-height: 100%;
background-position: center;
background-size: cover;
}

#btn-form {
display: inline-block;
}

.para-place-order {
padding-top: 15px;
}



Loading

0 comments on commit d3370a7

Please sign in to comment.