Skip to content

Commit af9ddca

Browse files
committed
Moved directories
1 parent 509bea3 commit af9ddca

File tree

12 files changed

+109
-13
lines changed

12 files changed

+109
-13
lines changed

src/db/mongoose.js db/mongoose.js

File renamed without changes.

src/index.js index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ var express = require('express');
22
var mongoose = require('mongoose');
33
var bcrypt = require('bcryptjs');
44
var multer = require('multer');
5-
var routers = require('./routers/users');
5+
var routers = require('./routes/users');
66
var path = require('path');
77
require('./db/mongoose');
88

99
var app = express();
1010
var port = 3000 || process.env.PORT;
1111

12-
var publicDirectoryPath = path.join(__dirname,'../public');
12+
var publicDirectoryPath = path.join(__dirname,'public');
1313
console.log(publicDirectoryPath)
1414
app.use(express.static(publicDirectoryPath));
1515

1616
app.use(express.json());
1717
app.use(routers);
18-
app.set('views', '../views')
18+
app.set('views', path.join(__dirname, 'views'))
1919
app.set("view engine", "ejs");
2020

2121
app.listen(port, () => {
File renamed without changes.
File renamed without changes.
File renamed without changes.

public/css/main.css

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
body{
2+
background: #f5683d;
3+
padding-top: 25vh;
4+
}
5+
6+
form{
7+
background: #fff;
8+
}
9+
10+
.form-container{
11+
background-color: aliceblue;
12+
border-radius: 10px;
13+
padding: 30px;
14+
box-shadow: 0px 0px 10px 0px;
15+
}

public/index.html

+27-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8">
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
3+
<head>
4+
<!-- Required meta tags -->
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
8+
<!-- Bootstrap CSS -->
9+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
10+
<!-- Link CSS -->
11+
<link rel="stylesheet" href="./css/main.css">
612
<title>Sign Up</title>
7-
</head>
8-
<body>
9-
<a href="/maker">Maker</a>
10-
</body>
13+
</head>
14+
<body>
15+
16+
<div class="container-fluid">
17+
<div class="row justify-content-center">
18+
<div class="form-container content-center">
19+
20+
</div>
21+
</div>
22+
</div>
23+
24+
<!-- Optional JavaScript -->
25+
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
26+
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
27+
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
28+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
29+
</body>
1130
</html>

src/routers/users.js routes/users.js

+18-1
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,30 @@ var Maker = require('../models/maker');
77
var DesignerMaker = require('../models/designerMaker');
88

99
//
10-
// ─── FORM ROUTE ─────────────────────────────────────────────────────────────────
10+
// ─── LANDING ROUTE ──────────────────────────────────────────────────────────────
11+
//
12+
13+
14+
//
15+
// ─── FORM GET ROUTE ─────────────────────────────────────────────────────────────────
1116
//
1217

1318
router.get('/maker', (req, res) => {
1419
res.render('maker.ejs')
1520
})
1621

22+
// ────────────────────────────────────────────────────────────────────────────────
23+
24+
router.get('/designer', (req, res) => {
25+
res.render('designer.ejs')
26+
})
27+
28+
// ────────────────────────────────────────────────────────────────────────────────
29+
30+
router.get('/designerMaker', (req, res) => {
31+
res.render('designerMaker.ejs')
32+
})
33+
1734
//
1835
// ─── VIEW ROUTE ─────────────────────────────────────────────────────────────────
1936
//

views/designer.ejs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<h1>Hello this is the designer form</h1>

views/designerMaker.ejs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<h1>Hello nibbas</h1>

views/landing.ejs

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<!-- Required meta tags -->
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
8+
<!-- Bootstrap CSS -->
9+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
10+
11+
<title>Hello, world!</title>
12+
</head>
13+
<body>
14+
<h1>Hello</h1>
15+
16+
<!-- Optional JavaScript -->
17+
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
18+
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
19+
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
20+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
21+
</body>
22+
</html>

views/maker.ejs

+22-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
1-
<h1>Hello this is the maker form</h1>
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<!-- Required meta tags -->
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
8+
<!-- Bootstrap CSS -->
9+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
10+
11+
<title>Hello, world!</title>
12+
</head>
13+
<body>
14+
<h1>Hello world</h1>
15+
16+
<!-- Optional JavaScript -->
17+
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
18+
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
19+
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
20+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
21+
</body>
22+
</html>

0 commit comments

Comments
 (0)