Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' into message-attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
pjsilvestre committed Dec 7, 2019
2 parents 5c2df6c + b3efcbd commit 7204071
Show file tree
Hide file tree
Showing 22 changed files with 558 additions and 130 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@ express-app/node_modules
express-app/secrets
.vscode/launch.json
.vscode/settings.json
express-app/.vscode/launch.json
13 changes: 10 additions & 3 deletions express-app/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 express-app/package.json
Expand Up @@ -7,6 +7,7 @@
"devstart": "nodemon -e js,mjs,json ./bin/www"
},
"dependencies": {
"acorn": "^7.1.0",
"cookie-parser": "~1.4.4",
"debug": "~2.6.9",
"express": "~4.16.1",
Expand Down
34 changes: 31 additions & 3 deletions express-app/public/stylesheets/donation-board.css
@@ -1,8 +1,36 @@
div.card-deck {
display: grid;
grid-template-columns: auto;
display: grid;
grid-template-columns: auto;
}

div.card-deck div.card {
margin: 25px 0 25px;
margin: 25px 0 25px;
}

.text-center {
border-color: deepskyblue;
border-width: 4px;
color: #fd3ca4;
background-color: midnightblue;
text-align: center;
margin-bottom: 2%;
font-size: large;
}

.card-header {
border-color: deepskyblue;
border-width: 4px;
font-size: xx-large;
}

body > div.container > div > * > ul {
font-size: x-large;
}

body > div.container > div > * > div > form > button {
font-size: x-large;
}

body > div.container > div > * > div > button {
font-size: x-large;
}
60 changes: 51 additions & 9 deletions express-app/public/stylesheets/donation-form.css
@@ -1,21 +1,63 @@
#labels {
color: deeppink;
color: #fd3ca4;
font-size: x-large;
}

#label-border {
border-color: deepskyblue;
border-width: 4px;
}

#expiration-date {
.form-control {
border-color: deepskyblue;
border-width: 4px;
}

#publish-button {
font-size: auto;
color: deeppink;
font-size: x-large;
color: #fd3ca4;
background-color: midnightblue;
border-width: 4px;
border-color: deepskyblue;
}

#food_item {
font-size: x-large;
}

#amount {
font-size: x-large;
}

#meeting_point {
font-size: x-large;
}

#pickup_date {
font-size: x-large;
}

#expiration_date {
font-size: x-large;
}

/* https://stackoverflow.com/questions/48293920/change-bootstrap-4-checkbox-size? */

.custom-control-label::before,
.custom-control-label::after {
top: 0.8rem;
width: 1.25rem;
height: 1.25rem;
}

.custom-control-lg .custom-control-label {
margin-left: 0.5rem !important;
font-size: xx-large;
}

body
> div.container
> form
> div
> *
> div.custom-control.form-control-lg.custom-checkbox
> label {
padding-top: 2px;
padding-left: 10px;
font-size: x-large;
}
12 changes: 9 additions & 3 deletions express-app/public/stylesheets/login.css
Expand Up @@ -10,16 +10,18 @@
margin-bottom: 2%;
}

#login-email{
#login-email {
border-color: deepskyblue;
border-width: 4px;
width: 100%;
font-size: x-large;
}

#login-password{
#login-password {
border-color: deepskyblue;
border-width: 4px;
width: 100%;
font-size: x-large;
}

#card {
Expand All @@ -34,8 +36,12 @@
#card_header {
border-color: deepskyblue;
border-width: 4px;
color: deeppink;
color: #fd3ca4;
background-color: midnightblue;
text-align: center;
margin-bottom: 2%;
}

body {
font-size: x-large;
}
28 changes: 28 additions & 0 deletions express-app/public/stylesheets/my-donations.css
@@ -1,3 +1,13 @@
.text-center {
border-color: deepskyblue;
border-width: 4px;
color: #fd3ca4;
background-color: midnightblue;
text-align: center;
margin-bottom: 2%;
font-size: large;
}

div.card-deck {
display: grid;
grid-template-columns: auto;
Expand All @@ -7,7 +17,25 @@ div.card-deck div.card {
margin: 25px 0 25px;
}

.card-header {
border-color: deepskyblue;
border-width: 4px;
font-size: xx-large;
}

div.card-deck div.card div.card-footer {
display: grid;
grid-template-columns: auto auto;
}

body > div.container > div > * > ul {
font-size: x-large;
}

body > div.container > div > div > div > * > button {
font-size: x-large;
}

body>div.container > div > div > div > * > button {
font-size: x-large;
}
28 changes: 28 additions & 0 deletions express-app/public/stylesheets/my-requests.css
@@ -1,3 +1,13 @@
.text-center {
border-color: deepskyblue;
border-width: 4px;
color: #fd3ca4;
background-color: midnightblue;
text-align: center;
margin-bottom: 2%;
font-size: large;
}

div.card-deck {
display: grid;
grid-template-columns: auto;
Expand All @@ -7,7 +17,25 @@ div.card-deck div.card {
margin: 25px 0 25px;
}

.card-header {
border-color: deepskyblue;
border-width: 4px;
font-size: xx-large;
}

div.card-deck div.card div.card-footer {
display: grid;
grid-template-columns: auto auto;
}

body > div.container > div > * > ul {
font-size: x-large;
}

body > div.container > div > div > div > * > button {
font-size: x-large;
}

body>div.container > div > div > div > * > button {
font-size: x-large;
}
12 changes: 10 additions & 2 deletions express-app/public/stylesheets/navbar.css
@@ -1,9 +1,17 @@
/* Foodshare */
#brand {
color: deeppink;
color: #fd3ca4;
font-size: xx-large;
}

/* Navbar links */
#navbarSupportedContent > ul > li > a {
color: deeppink;
color: #fd3ca4;
font-size: x-large;
margin-right: 25px;
}

#login_register_button {
color: #fd3ca4;
font-size: x-large;
}
10 changes: 9 additions & 1 deletion express-app/public/stylesheets/register.css
Expand Up @@ -14,18 +14,22 @@
border-color: deepskyblue;
border-width: 4px;
width: 100%;
font-size: x-large;
}

#register-email{
border-color: deepskyblue;
border-width: 4px;
width: 100%;
font-size: x-large;
}

#register-password{
border-color: deepskyblue;
border-width: 4px;
width: 100%;
font-size: x-large;

}

#card {
Expand All @@ -40,8 +44,12 @@
#card_header {
border-color: deepskyblue;
border-width: 4px;
color: deeppink;
color: #fd3ca4;
background-color: midnightblue;
text-align: center;
margin-bottom: 2%;
}

body {
font-size: x-large;
}
17 changes: 12 additions & 5 deletions express-app/public/stylesheets/style.css
@@ -1,11 +1,13 @@
html {
font-size: 18px;
font-family: "Oswald", sans-serif;
html, body {
background-color: '#F7EBE8'
}

body {
font-family: 'Oswald', sans-serif !important;
}

h1 {
color: deeppink;
font-size: 25px;
color: #fd3ca4;
padding-top: 1%;
}

Expand All @@ -14,3 +16,8 @@ h1 {
padding: 0px;
margin-bottom: 25px;
}

.jumbotron {
text-align: center;
background-color: #191970;
}
3 changes: 2 additions & 1 deletion express-app/routes/donation-board.js
Expand Up @@ -19,8 +19,9 @@ router.use(async (req, res, next) => {

let currentDate = new Date(Date.now());
let expiration_date = donation.expiration_date.toDate();
let pickup_date = donation.pickup_date.toDate();

if (expiration_date < currentDate) {
if (expiration_date < currentDate || pickup_date < currentDate) {
database
.collection('donations')
.doc(donation_id)
Expand Down
2 changes: 1 addition & 1 deletion express-app/routes/login.js
Expand Up @@ -18,7 +18,7 @@ router.post('/', async (req, res) => {
res.render('login', { errorMessage: error });
});

res.redirect('/');
res.redirect('/donation-map');
});

module.exports = router;
3 changes: 2 additions & 1 deletion express-app/routes/my-donations.js
Expand Up @@ -19,8 +19,9 @@ router.use(async (req, res, next) => {

let currentDate = new Date(Date.now());
let expiration_date = donation.expiration_date.toDate();
let pickup_date = donation.pickup_date.toDate();

if (expiration_date < currentDate) {
if (expiration_date < currentDate || pickup_date < currentDate) {
database
.collection('donations')
.doc(donation_id)
Expand Down

0 comments on commit 7204071

Please sign in to comment.