Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
2dd6fd5
I made pwa-dev and pwa, new branches which will track my work in conv…
gwild37 Jul 26, 2019
c482249
Adding all glitch changes: fixing some PWA errors in the manifest and…
gwild37 Aug 13, 2019
5b52964
Merge pull request #79 from gaskij/pwa-dev
gwild37 Aug 13, 2019
1e4bf1f
Fixed issues/ renamed files
gwild37 Aug 13, 2019
2530d70
adding commented out attempt at fixing service worker
gwild37 Aug 16, 2019
2e4ac7c
removing glitch changes manually
gwild37 Aug 16, 2019
64d8c5b
removing glitch changes manually
gwild37 Aug 16, 2019
a7493f4
removing glitch changes manually
gwild37 Aug 16, 2019
c5ec738
removing glitch changes manually
gwild37 Aug 16, 2019
c99131f
adding updated offline page
gwild37 Aug 16, 2019
5bc4e54
removing glitch changes manually
gwild37 Aug 16, 2019
e2c8e44
Updated README with license info about PWABuilder
gwild37 Aug 20, 2019
e467b73
added myself as a contributor
gwild37 Aug 29, 2019
9cb5361
Merge pull request #80 from gaskij/pwa-dev
gwild37 Sep 4, 2019
81a54fc
cleaning up unused files
gwild37 Sep 4, 2019
8fc4c0e
cleaning up unused files
gwild37 Sep 4, 2019
6d9da4a
Merge pull request #81 from gaskij/pwa-dev
gwild37 Sep 4, 2019
23587b9
Merge branch 'master' into pwa
gwild37 Sep 4, 2019
5d32406
Merge pull request #82 from gaskij/pwa
gwild37 Sep 4, 2019
84a4c06
cleaning up unused files
gwild37 Sep 4, 2019
448fbf2
cleaning up unused files
gwild37 Sep 4, 2019
88ae49e
cleaning up unused files
gwild37 Sep 4, 2019
cfc7989
cleaning up unused files
gwild37 Sep 4, 2019
de00398
Returned .envTEMPLATE to the repository
gaskij Sep 17, 2019
c33bc9c
Merge branch 'dev' of https://github.com/gaskij/rpicampusmap into dev
gaskij Sep 17, 2019
679c028
Fixed Issue 85 Github Link
JustinM2250 Sep 20, 2019
96570b5
Fixed the footer alignment. Now always at the bottom, even on mobile.
gwild37 Oct 1, 2019
9a55ff4
fixing footer
gwild37 Oct 1, 2019
4ec7069
Adding PWA stuff to dev, fixing footer on searchrResults.html
gwild37 Oct 1, 2019
1a531da
fixed more pwa tags
gwild37 Oct 1, 2019
5d21d40
added pwa tags to index.html
gwild37 Oct 1, 2019
b4fb051
added theme color for all sites
gwild37 Oct 1, 2019
f8c8e90
Add .envTEMPLATE back to the repository
gaskij Oct 4, 2019
026fadc
Merge branch 'master' of https://github.com/gaskij/rpicampusmap
gaskij Oct 4, 2019
bdb4eb7
Myriad of footer adjustments
gwild37 Oct 8, 2019
2b447f4
Updated offline.html
gwild37 Oct 8, 2019
4bdbf32
Merge branch 'master' into recap
gaskij Oct 9, 2019
b6d30b3
bleh
Unachieved Oct 11, 2019
3c3526b
updated
Unachieved Oct 11, 2019
fc879cc
meh
Unachieved Oct 13, 2019
a5b4598
fixed homepage
Unachieved Oct 14, 2019
dd6c804
fixes footer for safari
Unachieved Oct 14, 2019
a3076c4
adjusted footers and change admin click to login
Unachieved Oct 14, 2019
0fbefc0
more footer issues
gwild37 Oct 15, 2019
f076c6d
fix searchController Cross Origin Resource issue
gwild37 Oct 15, 2019
352ced1
slight change
Unachieved Oct 17, 2019
4f1c576
apply pull
Unachieved Oct 17, 2019
f1a3dfc
Updated styling of footer to be less intrusive
gaskij Oct 29, 2019
cd36f0f
Renamed info.html -> mapinfo.html, machine_sites_info -> info.html, r…
gaskij Oct 29, 2019
01608b7
Changed dropdown menu to bootstrap, made photo carousel fixed height
gaskij Oct 29, 2019
9037cef
Fixed tab title of info page
gaskij Nov 1, 2019
733b4c0
Jon_refactored_the_code_and_imp_log_and_register
Unachieved Nov 19, 2019
9eecc53
Refactored dev as farthest development branch, using changes from master
gaskij Nov 19, 2019
7d6ba9e
Jon_welcome_login_register_refactoring
Unachieved Dec 6, 2019
a8df5cd
jon_welcome_login_registration_2
Unachieved Dec 6, 2019
b0853d1
slight changes
Unachieved Dec 6, 2019
c11a932
Started comment functionality
gaskij Jan 15, 2020
7328835
Added eslint to define and enforce style
gaskij Jan 16, 2020
a0ecf65
Update README.md
gaskij Jan 24, 2020
9ad942a
Merge pull request #93 from gaskij/update_readme
gaskij Jan 24, 2020
fbf01f8
Edit eslint config file to target ES6 and change to CRLF line endings
gaskij Jan 26, 2020
da1f8ba
Merge pull request #76 from gaskij/dev
gaskij Jan 26, 2020
90ae5f3
Bump mixin-deep from 1.3.1 to 1.3.2
dependabot[bot] Jan 26, 2020
0439d46
Fixed security vulnerabilites in outdated packages
gaskij Jan 26, 2020
4858f47
Merge pull request #94 from gaskij/dependabot/npm_and_yarn/mixin-deep…
gaskij Jan 26, 2020
fb5bc16
Merge pull request #97 from gaskij/style-update
gaskij Jan 26, 2020
648719b
update
Unachieved Jan 31, 2020
5785dea
info_&_search_fix
Unachieved Feb 4, 2020
d19dd36
Location Database and search fix
Unachieved Feb 12, 2020
f161107
Merge pull request #98 from gaskij/Jon_Dev
Unachieved Feb 14, 2020
05b6361
hot search fix
Unachieved Feb 14, 2020
b791fc9
Merge pull request #100 from gaskij/Jon_Dev
Unachieved Feb 14, 2020
e5600ff
remove_html_files
Unachieved Feb 16, 2020
7c2bcbb
Clean_up-Jon
Unachieved Feb 16, 2020
d0a8132
Merge pull request #101 from gaskij/Jon_Dev
Unachieved Feb 16, 2020
26764d5
mini_commit
Unachieved Feb 21, 2020
0eb475e
Merge pull request #112 from gaskij/Jon_Dev
Unachieved Feb 21, 2020
95f854a
Create pull_request_template.md
gaskij Feb 22, 2020
d274ff8
Merge branch 'master' into dev
gaskij Feb 23, 2020
b95b8b1
Last Conversion fix
Unachieved Feb 23, 2020
df6cfd7
Final conversion fix
Unachieved Feb 23, 2020
a0430c9
Remove buggy service worker code
gaskij Feb 23, 2020
116fafd
Sustainable footer fix without explicit heights
gaskij Feb 23, 2020
09ab493
Change default port to 3000
gaskij Feb 23, 2020
8cfbb6d
Merge branch 'dev' of https://github.com/gaskij/rpicampusmap into dev
gaskij Feb 23, 2020
d335c09
Fix bootstrap not working on pages other than the map
gaskij Feb 23, 2020
87c61e6
Wrap page templates in custom html elements for context
gaskij Feb 23, 2020
28a3d32
Use mapApp.js on root ejs template to have across all pages
gaskij Feb 23, 2020
03b9b05
slight pathing fix
Unachieved Feb 25, 2020
2b2c703
map_position_absolute_else_broken_safari
Unachieved Feb 25, 2020
c60a851
Better Map Boundaries Added
xtreme765 Feb 25, 2020
3d510c9
search_sens
Feb 25, 2020
f7cb263
Merge pull request #117 from Xtreme765/map_layout
Unachieved Feb 25, 2020
f0b3c9f
Merge pull request #118 from gaskij/Search_Sensitivity
Unachieved Feb 25, 2020
02e9e0b
Added missing locations
xtreme765 Feb 28, 2020
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
7 changes: 7 additions & 0 deletions .envTEMPLATE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
NODE_ENV = development

PORT = 3000

# Database Info
DB_USER = <username>
DB_PASS = <password>
38 changes: 38 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2015,
"sourceType": "module"
},
"rules": {
"comma-dangle": [
"error",
"always"
],
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"windows"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
]
}
}
20 changes: 20 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Description
(Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.)

Fixes #(issue name)

## Solution
(What did you do to fix this issue?)

## Known Issues
(Are there any knew issues caused or exposed by your changes, or things you would like clarified before merging?)

## Testing Procedures
(What should reviewers do to validate your changes? What steps should be taken and what is the expected outcome?)

## Checklist for author
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation (if any)
- [ ] My changes generate no new warnings
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
screenshots/

# Ignore the node modules. They will be installed through 'npm install'
node_modules/

# Ignore .env file, to be kept locally on machine running the server for security
.env
.envTEMPLATE
RPI Campus Map Project Proposal Summer 19.pdf
RPI Campus Map Project Proposal Fall 19.pdf
Binary file removed Engineering Resources.pdf
Binary file not shown.
37 changes: 27 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,55 @@ We are currently in the middle of a large refactor, but heavy construction will

### Current Contributors:
* Justin Gaskins
* Jon-Pierre Antoine
* Darrian Gardea
* Aidan Duane
* Cody Messina
* Kristina Adams

### Project Managers:
* Spring 2020: Jon-Pierre Antoine
* Fall 2019: Justin Gaskins

### Founders:
* Justin Gaskins
* Christopher Pence
* Sebastien Boulas

### Version History:
* 2/16/2020 - v0.4.0 Login and registration implemented. Messages are flashed on error state i.e. invalid email,
user not found, login to see admin page etc. New welcome page also added (page before map access). Code has been rebased making it more modular. All html converted to ejs and views used (modularity).
* 5/27/2019 - v0.3.0 All basic map functionality is now restored! You can show a location on the map from the info page, search for locations, or go to the information page from the location on the map.
* 3/26/2019 - v0.2.0 Began refactor and translation from XAMPP to MEAN Stack!
* 1/25/2019 - v0.1.0 Initial stages of functionality are complete! More locations and authorization will be added for the release of v1.0.

### Getting Started
This project uses the MEAN stack (MongoDB, Express.JS, AngularJS 1.7, Node.js). You will need a working installation of [Node.js](https://nodejs.org/en/) (LTS version recommended), and a [MongoDB Atlas Cloud account](https://www.mongodb.com/cloud/atlas) (free is fine).

Once you have that taken care of, there are a few more steps before you can begin work.
Once you have that taken care of, there are a few more steps to take before you can begin work.
1. Install the nodemon package by running `npm install -g nodemon` in your node configured shell.
2. Clone the repository by either running `git clone https://github.com/gaskij/rpicampusmap.git` in a terminal shell with Git installed, or using your preferred Git UI. Change to the newly downloaded folder using `cd rpicampusmap`
3. Run `npm install` to download the required Node packages.
4. Open the ".envTEMPLATE" file in your preferred text editor. Change the <username> and <password> fields to match your Mongo Atlas account information. Don't worry, this file will only be saved on your local machine, so nobody will see it! Save the file as ".env"
4. Make a copy of the ".envTEMPLATE" file and open it in your preferred text editor. Change the <username> and <password> fields to match your Mongo Atlas account information. Don't worry, this file will only be saved on your local machine, so nobody will see it! Save the file as ".env"
5. Run `git status` to make sure you are up to date with the current branch. If so, you can begin!

### Running the Server
To start the server, run `npm start` to have the server auto-restart if you make any changes, or `node server.js` if you would rather manually restart in case of changes.

### Contributing to RPI Machines Map
RPI Machines Map is a separate project that branches from RPI Campus Map. While it has many of the same features, it has additional features that allow users to easily find machine shops on campus, and the contents of those shops. To contribute to this project, use `git checkout forgemill` to access the stable project branch, and `git checkout forgemill-dev` to access the developer's branch, where we are working to build and improve the Machine Map. Also, check out the README in those branches for more information.

### Project Guidelines
* We use JavaScript ES6 syntax for defining variables (const, let)
* You can use Arrow functions or more conventional ES5 functions.
* Try to use [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) instead of string concatenation when possible.
* Please do not attempt to commit directly to master! Commit instead to the branch for the feature currently being worked on.
### Project Contribution Guidelines
* DO **NOT** attempt to push directly to `master`! Instead, follow this basic workflow:
1. Create a new branch dedicated only to the task at hand. Give it a name starting with the type of work it pertains to. For example, `hotfix/broken_github_link` or `feature/create_new_page`
2. Commit and push your changes to the branch for the feature currently being worked on.
3. When you believe you are finished making changes, open a Pull Request to have your changes merged into `master`.
4. While you're there, why not give someone else's pull request a review, too?
* You can switch branches with the command `git checkout [branch]`
* When writing code, adhere to the RPI CampusMap [Style Guide](https://github.com/gaskij/rpicampusmap/wiki/Style-Guide). The most important/basic rules are:
* We use [JavaScript ES6 syntax](https://www.freecodecamp.org/news/write-less-do-more-with-javascript-es6-5fd4a8e50ee2/) for many aspects of the code, like defining variables (const, let)
* Use [Arrow functions](https://javascript.info/arrow-functions-basics) instead of conventional ES5 functions when possible.
* Use [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) instead of string concatenation when possible.
* Use 2 spaces (not tabs) for indentation. Most IDEs and editors can be configured to use tab-width of 2 and use spaces instead of tabs.

### Contributing to RPI Machines Map
RPI Machines Map is a separate project that branches from RPI Campus Map. While it has many of the same features, it has additional features that allow users to easily find machine shops on campus, and the contents of those shops. To contribute to that project, see the [RPI Machines repo](https://github.com/gwild37/RPI-Machines).

Have fun making a big impact on campus!
65 changes: 65 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
const http = require('http');
const express = require('express');
const bodyParser = require('body-parser');
const expressLayouts = require('express-ejs-layouts');
const passport = require('passport');
const flash = require('connect-flash');
const session = require('express-session');
const geolocations = require('./geolocations.json');
const Location = require('./models/Locations');
const database = require('./scripts/database');
const assert = require('assert');

const app = express();


// Passport Config
require('./config/passport')(passport);

//adding locations for first run
let db = database._connect();
Location.collection.insertMany(geolocations, {ordered: false})
.then(() => console.log("DONE Loading"))
.catch((err) => console.log(err));

// EJS
app.use(expressLayouts);
app.set('view engine', 'ejs');
//app.use(express.static(__dirname)).use(bodyParser.urlencoded({extended: true})).use(bodyParser.json());

// Bodyparser
app.use(express.urlencoded({ extended: false}));
app.use(bodyParser.json())

// Express Session
app.use(session({
secret: 'secret',
resave: true,
saveUninitialized: true,
//cookie: { secure: true }
}));

// Passport middleware
app.use(passport.initialize());
app.use(passport.session());

// Connect Flash
app.use(flash());

// Global vars
app.use((req, res, next) => {
res.locals.success_msg = req.flash('success_msg');
res.locals.error_msg = req.flash('err_msg');
res.locals.error = req.flash('error');
next();
});

// Routers
app.use('/', require('./scripts/routes/index'));
app.use('/user', require('./scripts/routes/user'));
app.use(express.static(__dirname));


const PORT = process.env.PORT || 3000;

app.listen(PORT, console.log(`Server started on port ${PORT}`));
9 changes: 8 additions & 1 deletion campusmap.sql
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ INSERT INTO `images` (`location`, `link`) VALUES
('Nugent Hall', 'http://www.rpi.edu/dept/cct/apps/reslife/images/pictures/nugent1.jpg'),
('Experimental Media and Performing Arts Center at Rensselaer', 'http://empac.rpi.edu/sites/default/files/styles/empac_cms_slideshow__default/public/ESTO_AaronEsto_50.jpg?itok=9rVzDof9');


-- --------------------------------------------------------

--
Expand All @@ -130,14 +131,19 @@ INSERT INTO `main` (`location`, `description`, `address`, `phone`) VALUES
('Academy Hall', 'Home to the Student Health Center, Bursar, and registrar. This building also includes an auditorium.', '110 8th St, Troy, NY 12180', 518),
('Admissions', 'This is where the admissions department is located at RPI.', '110 8th St, Troy, NY 12180', 518),
('Amos Eaton Hall', 'Home of the Mathematics Department and part of the Computer Science Department. Many Math and Computer science courses are taught inside. It is names after Amos Eaton, Co-Founder of RPI.', 'Amos Eaton Hall, 110 8th Street, Troy, NY, 12180', NULL),
('Anderson Field', 'Sports field on campus. Many other sports play here besides rugby', 'Sage Ave, Troy, NY 12180', NULL),
('Barton Hall', 'One of the residence halls on campus. Located on freshman hill.', '1999 Burdett Ave, Troy, NY 12180', NULL),
('Blitman Commons', 'Campus residence hall. Includes various ammenities such as a dining hall.', '1800 6th Ave, Troy, NY 12180', NULL),
('Bray Hall', 'One of the residence halls on campus. Located on freshman hill.', '1999 Burdett Ave, Troy, NY 12180', NULL),
('Cary Hall', 'One of the residence halls on campus. Located on freshman hill.', '1999 Burdett Ave, Troy, NY 12180', NULL),
('Carnegie Building', 'Academic building on campus.', '110 8th St, Troy, NY 12180', NULL),
('Center for Biotechnology and Interdisciplinary Studies', 'Research facility on campus. This is a popular destination for guest speakers on campus.', '1623 15th St, Troy, NY 12180', 518),
('Cogswell Laboratory', 'A chemistry-biology research center on campus. Recieves government funding from the National Science Foundation as well as the New York State Dormitory Authority.', '110 8th St, Troy, NY 12180', NULL),
('Commons Dining Hall', 'One of the main dining hills on campus. Located on freshman hill. The mailing center is also located in this building.', '1999 Burdett Ave, Troy, NY 12180', 518),
('Crockett Hall', 'One of the residence halls on campus. Located on freshman hill.', '1999 Burdett Ave, Troy, NY 12180', NULL),
('Darrin Communications Center', 'Main lecture hall on campus. Also where the CCPD has their office. This is the building where most large lectures are held.', '110 8th Street, Troy, NY, 12180', NULL),
('Davison Hall', 'One of the residence halls on campus. Located on freshman hill.', '1999 Burdett Ave, Troy, NY 12180', NULL),
('E-Complex', 'One of the residence halls on campus. Located on Sage Ave.', '110 8th St, Troy, NY 12180', NULL),
('Experimental Media and Performing Arts Center at Rensselaer', 'Alot of extracurricular activities happen here. The building includes a 1,200 seat concert hall and a 400 seat theater.', '44 8th St, Troy, NY 12180', 518),
('Folsom Library', 'The main library on campus. 4 floors of study spaces, bookshelves and even a cafe. A great place to study quietly.', '110 8th St, Troy, NY 12180', NULL),
('Greene Building', 'Academic building on campus. Home to the School of Architecture.', '110 8th St, Troy, NY 12180', NULL),
Expand All @@ -150,12 +156,13 @@ INSERT INTO `main` (`location`, `description`, `address`, `phone`) VALUES
('Low Center for Industrial Innovation', 'Commonly known as the CII. Acadmic building on campus that has a number of larger academic buildings and auditoriums.', '110 8th St, Troy, NY 12180', NULL),
('Mueller Center', 'Fitness and wellness center on campus. This building has a gym that extends for two floors with various yoga and wellness classes offered on the third floor. This building also includes the armory and the campus swimming pools.', '110 8th St, Troy, NY 12180', 518),
('Nason Hall', 'One of the residence halls on campus. Located on freshman hill.', '1999 Burdett Ave, Troy, NY 12180', NULL),
('North Hall', 'One of the residence halls on campus. Located on Sage Ave.', '110 8th St, Troy, NY 12180', NULL),
('Nugent Hall', 'One of the residence halls on campus. Located on freshman hill.', '1999 Burdett Ave, Troy, NY 12180', NULL),
('Pittsburgh Building', 'Academic building on campus. Home of the Lally School of Management.', '110 8th St, Troy, NY 12180', 518),
('Public Safety', 'Home to the campus police.', '110 8th St, Troy, NY 12180', NULL),
('Rensselaer Union', 'Home to a number of different recreation centers, food courts, study rooms, and the campus store.', '110 8th St, Troy, NY 12180', 518),
('Rickets Building', 'Academic building on campus. Home to the Chemical Engineering Department.', '110 8th St, Troy, NY 12180', NULL),
('Rugby Field', 'Sports field on campus. Many other sports play here besides rugby', 'Sage Ave, Troy, NY 12180', NULL),
('Robinson Field', 'Sports field on campus. Mainly used for baseball', 'Eagle St, Troy, NY 12180', NULL),
('Russell Sage Laboratory', 'Academic building on campus. Home of the School of Humanities, Arts, and Social Sciences.', '110 8th St, Troy, NY 12180', NULL),
('Sage Dining Hall', 'One of the main dining halls on campus', '110 8th St, Troy, NY 12180', NULL),
('Sigma Phi Epsilon', 'Worst frat on campus, don\'t join!', '2005 15th St, Troy, NY 12180', NULL),
Expand Down
12 changes: 12 additions & 0 deletions config/auth.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// check if user trying to access the admin panel is already loged in
// if the are not it redirects them to the login page
module.exports = {
ensureAuthenticated: function(req, res, next) {
if(req.isAuthenticated()){
console.log("checking auth");
return next();
}
req.flash('error_msg', 'Please log in to view this resource');
res.redirect('/user/login');
}
}
13 changes: 13 additions & 0 deletions config/keys.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../.env') });


const user = process.env.DB_USER;
const pass = process.env.DB_PASS;
const uri = `mongodb+srv://${user}:${pass}@rpicampusmap-fwvzb.gcp.mongodb.net/test?retryWrites=true`;
const options = {useNewUrlParser: true};

module.exports = {
MongoURI: uri
}
45 changes: 45 additions & 0 deletions config/passport.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
const LocalStrategy = require('passport-local').Strategy;
const mogoose = require('mongoose');
const bcrypt = require('bcryptjs');


// Local user model
const User = require('../models/User');

module.exports = function(passport) {
passport.use(
new LocalStrategy({ usernameField: 'email'}, (email, password, done) => {
//Match User
User.findOne({email: email})
.then(user => {
if(!user){
return done(null, false, {message: 'That email is not registered'});
}
// Match password
bcrypt.compare(password, user.password, (err, isMatch) =>{
if(err)throw(err);

if(isMatch){
return done(null, user);
} else {
return done(null, false, { message: 'Password Incorrect'})
}
});
})
.catch(err => {
console.log("error in auth");
console.log(err);
})
})
);

passport.serializeUser((user, done) => {
done(null, user.id);
});

passport.deserializeUser((id, done) => {
User.findById(id, (err, user) => {
done(err, user);
});
});
}
5 changes: 5 additions & 0 deletions css/admin.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
html, body{
height: 100%;
width: 100%;
padding: 0%;
}
28 changes: 21 additions & 7 deletions public/style/homepage.css → css/homepage.css
Original file line number Diff line number Diff line change
@@ -1,33 +1,47 @@
body {
background-color: #000000;
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}

a {
text-decoration: none;
text-decoration: none;
}

footer a {
text-decoration: underline;
color: inherit;
}

#mapPopup {
background-color: #ffffff;
min-height: 88%;
min-height: 85%;
width: 80%;
margin: auto;
}

#mapPopupInfo {
background-color: #ffffff;
min-height: 88%;
min-height: 85%;
width: 100%;
margin: auto;
}

/* Always set the map height explicitly to define the size of the div
* element that contains the map. */
map-page {
height: 100%;
position: absolute;
min-height: 100%;
top: 0;
bottom: 0;
left: 0;
right: 0;
}

#mapContainer {
height: 85%;
width: 100%;
height: 100%;
min-height: 100%;
}

.popup:hover {
Expand Down
Loading