Browse Source

before auth

windhamdavid 3 years ago
parent
commit
77be4675d9
8 changed files with 378 additions and 11 deletions
  1. 6 3
      app.js
  2. 9 2
      gulpfile.js
  3. 9 6
      package.json
  4. 177 0
      views/home.hbs
  5. 0 0
      views/layouts/login.hbs
  6. 177 0
      views/layouts/main.hbs
  7. 0 0
      views/layouts/register.hbs
  8. 0 0
      views/layouts/user.hbs

+ 6 - 3
app.js

@@ -1,16 +1,19 @@
 var express = require('express');
+var session = require('express-session');
+var exphbs = require('express-handlebars');
+var cookieParser = require('cookie-parser')
 var bodyParser = require('body-parser');
 var events = require('events');
 var http = require('http');
 var path = require('path');
-
+var logger = require('morgan');
 
 
 var app = express();
 
 var config = {
-  development: require('./config-dev.js'),
-  production: require('./config.js')
+  development: require('./config/config-dev.js'),
+  production: require('./config/config.js')
 };
 
 var app = express(),

+ 9 - 2
gulpfile.js

@@ -27,6 +27,7 @@ var cleanTask = function () {
     '!app/css/',
     '!app/fonts/',
     '!app/js/',
+    '!app/views/',
   ]);
 };
 
@@ -40,6 +41,10 @@ var buildTask = function() {
   gulp.src('./src/index.html')
     .pipe(minifyHTML())
     .pipe(gulp.dest('./app'));
+  gulp.src('./src/views/*')
+    .pipe(gulp.dest('./app/views'));
+  gulp.src('./src/views/layouts/*')
+    .pipe(gulp.dest('./app/views/layouts'));
   gulp.src('./src/img/*')
     .pipe(gulp.dest('./app/img'));
   gulp.src(['./src/css/bootstrap.css','./src/css/main.css'])
@@ -62,8 +67,10 @@ gulp.task('build', function() {
 });
 
 var watchTask = function() {
-  gulp.src('./src/app.js')
-    .pipe(gulp.dest('./app'));
+  gulp.src('./app.js')
+    .pipe(gulp.dest('./'));
+  gulp.src('./src/views/*')
+    .pipe(gulp.dest('./app/views'));
   gulp.src('./src/index.html')
     .pipe(minifyHTML())
     .pipe(gulp.dest('./app'));

+ 9 - 6
package.json

@@ -13,12 +13,15 @@
     "node": ">=4.0.0"
   },
   "dependencies": {
-    "express": "^4.13.3",
+    "bcryptjs": "^2.3.0",
     "body-parser": "^1.14.1",
-    "cookie-parser": "~1.3.5",
-    "serve-favicon": "~2.3.0",
+    "cookie-parser": "^1.3.5",
+    "debug": "~2.2.0",
+    "express": "^4.13.3",
+    "express-handlebars": "^2.0.1",
+    "express-session": "^1.12.1",
     "morgan": "~1.6.1",
-    "debug": "~2.2.0"
+    "serve-favicon": "~2.3.0"
   },
   "devDependencies": {
     "del": "^2.1.0",
@@ -26,13 +29,13 @@
     "gulp-concat": "^2.6.0",
     "gulp-jshint": "^2.0.0",
     "gulp-uglify": "^1.5.1",
-    "jshint-stylish": "^2.1.0",
     "gulp-minify-css": "^1.2.1",
     "gulp-minify-html": "^1.0.4",
     "gulp-nodemon": "^2.0.4",
+    "jshint-stylish": "^2.1.0",
     "nodemon": "^1.8.1"
   },
-    "scripts": {
+  "scripts": {
     "start": "node app.js"
   }
 }

+ 177 - 0
views/home.hbs

@@ -0,0 +1,177 @@
+<!DOCTYPE html>
+<head>
+   <meta charset="utf-8">
+   <meta http-equiv="x-ua-compatible" content="ie=edge">
+   <meta name="viewport" content="width=device-width, initial-scale=1">
+   <title>Jury'd - You Be the Judge</title>
+   <meta name="description" content="Juryd Judging Everything">
+   <link rel="stylesheet" href="css/style.min.css">
+</head>
+<body>
+
+ <nav id="mainNav" class="navbar navbar-default navbar-fixed-top">
+     <div class="container">
+         <div class="navbar-header">
+             <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
+                 <span class="sr-only">Toggle navigation</span>
+                 <span class="icon-bar"></span>
+                 <span class="icon-bar"></span>
+                 <span class="icon-bar"></span>
+             </button>
+             <a class="navbar-brand page-scroll" href="#page-top">Juryd</a>
+         </div>
+
+         <div class="collapse navbar-collapse" id="navbar-collapse">
+             <ul class="nav navbar-nav navbar-right">
+                 <li><a class="btn page-scroll" href="#">Sign In</a></li>
+             </ul>
+         </div>
+     </div>
+ </nav>
+
+<header>
+   <div class="container-fluid">
+      <div class="header-content">
+         <div class="header-content-inner">
+            <div class="row">
+               <div class="col-sm-8">
+                  <h1>Juryd</h1>
+                  <h2>You be the Judge</h2>
+                  <hr>    
+                  <h4>Juryd is an application that allows the participants to register and vote.</h4>
+               </div>
+               <div class="col-sm-4">
+                  <img src="img/ribbon.svg" class="svg">
+               </div>
+            </div>
+         </div>
+		</div>
+   </div>
+</header>
+
+<section id="about">
+   <div class="container">
+      <div class="row">
+         <div class="col-lg-8">
+            <img src="img/ipad.svg" class="svg">
+         </div>
+         <div class="col-sm-4 text-center">
+            <h2 class="section-heading">How It Works</h2>
+            <hr class="light">
+            <p>Some Copy</p>
+         </div>
+      </div>
+   </div>
+</section>
+
+<section id="details">
+   <div class="container">
+      <div class="row text-center">
+         <div class="col-sm-4">
+            <h3 class="section-heading">Juried Competition</h3>
+            <p>Some Copy</p>
+         </div>
+         <div class="col-sm-4">
+            <h3 class="section-heading">Registrant Jury</h3>
+            <p>Some Copy</p>
+         </div>
+         <div class="col-sm-4">
+            <h3 class="section-heading">Registered Judges</h3>
+            <p>Some Copy</p>
+         </div>
+      </div>
+   </div>
+</section>
+
+<section id="features">
+   <div class="container">
+      <div class="row text-center">
+         <div class="col-sm-6">
+            <h2 class="section-heading">Features</h2>
+            <p>Some Copy</p>
+            <img src="img/ribbon.svg" class="svg icon-small blue-ribbon">
+            <img src="img/ribbon.svg" class="svg icon-small red-ribbon">
+            <img src="img/ribbon.svg" class="svg icon-small yellow-ribbon">
+         </div>
+         <div class="col-sm-6">
+            <img src="img/phone.svg" class="svg">
+         </div>
+      </div>
+   </div>
+</section>
+
+<section id="account">
+   <div class="container">
+      <div class="row text-center">
+         <div class="col-sm-6">
+            <h2 class="section-heading">About</h2>
+            <p>Some Copy</p>
+         </div>
+         <div class="col-sm-6">
+            <h2 class="section-heading">About</h2>
+            <p>Some Copy</p>
+         </div>
+      </div>
+   </div>
+</section>
+
+<section id="call">
+   <div class="container">
+      <div class="row">
+         <div class="col-sm-4 col-lg-offset-2 text-center">
+            <h4 class="section-heading">Connect</h4>
+            <hr class="light">
+            <p>(Social Media Icons)</p>
+         </div>
+         <div class="col-sm-4 text-center">
+            <h4 class="section-heading">Get the Latest</h4>
+            <form class="form-inline">
+               <div class="form-group">
+                  <label class="sr-only" for="exampleInputAmount">Email Addresss</label>
+                  <div class="input-group">
+                     <input type="text" class="form-control" id="email-address" placeholder="Email Address">
+                     <div class="input-group-addon">
+                        <button type="submit" class="btn btn-primary">GO</button>
+                     </div>
+                  </div>
+               </div>
+            </form>
+         </div>
+      </div>
+   </div>
+</section>
+
+
+<footer class="bg-dark">
+   <div class="container bg-dark">
+      <div class="row">
+         <div class="col-sm-3 col-sm-offset-2">
+            <h5>About</h5>
+            <p>Documentation</p>
+            <p>History</p>
+            <p>About Us</p>
+         </div>
+         <div class="col-sm-3">
+            <h5>Support</h5>
+            <p>System Status</p>
+            <p>Support Ticket</p>
+            <p>Account Preferences</p>
+         </div>
+         <div class="col-sm-3">
+            <h5>About</h5>
+            <p>Contact</p>
+            <p>Privacy Policy</p>
+            <p>Terms of Use</p>
+         </div>
+      </div>
+   </div>
+</footer>
+   
+<script src="js/lib.min.js"></script>
+<script src="js/main.min.js"></script>
+ <!--[if lt IE 9]>
+   <script src="js/html5shiv.min.js"></script>
+   <script src="js/respond.min.js"></script>
+ <![endif]-->
+</body>
+</html>

+ 0 - 0
views/layouts/login.hbs


+ 177 - 0
views/layouts/main.hbs

@@ -0,0 +1,177 @@
+<!DOCTYPE html>
+<head>
+   <meta charset="utf-8">
+   <meta http-equiv="x-ua-compatible" content="ie=edge">
+   <meta name="viewport" content="width=device-width, initial-scale=1">
+   <title>Jury'd - You Be the Judge</title>
+   <meta name="description" content="Juryd Judging Everything">
+   <link rel="stylesheet" href="css/style.min.css">
+</head>
+<body>
+
+ <nav id="mainNav" class="navbar navbar-default navbar-fixed-top">
+     <div class="container">
+         <div class="navbar-header">
+             <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
+                 <span class="sr-only">Toggle navigation</span>
+                 <span class="icon-bar"></span>
+                 <span class="icon-bar"></span>
+                 <span class="icon-bar"></span>
+             </button>
+             <a class="navbar-brand page-scroll" href="#page-top">Juryd</a>
+         </div>
+
+         <div class="collapse navbar-collapse" id="navbar-collapse">
+             <ul class="nav navbar-nav navbar-right">
+                 <li><a class="btn page-scroll" href="#">Sign In</a></li>
+             </ul>
+         </div>
+     </div>
+ </nav>
+
+<header>
+   <div class="container-fluid">
+      <div class="header-content">
+         <div class="header-content-inner">
+            <div class="row">
+               <div class="col-sm-8">
+                  <h1>Juryd</h1>
+                  <h2>You be the Judge</h2>
+                  <hr>    
+                  <h4>Juryd is an application that allows the participants to register and vote.</h4>
+               </div>
+               <div class="col-sm-4">
+                  <img src="img/ribbon.svg" class="svg">
+               </div>
+            </div>
+         </div>
+		</div>
+   </div>
+</header>
+
+<section id="about">
+   <div class="container">
+      <div class="row">
+         <div class="col-lg-8">
+            <img src="img/ipad.svg" class="svg">
+         </div>
+         <div class="col-sm-4 text-center">
+            <h2 class="section-heading">How It Works</h2>
+            <hr class="light">
+            <p>Some Copy</p>
+         </div>
+      </div>
+   </div>
+</section>
+
+<section id="details">
+   <div class="container">
+      <div class="row text-center">
+         <div class="col-sm-4">
+            <h3 class="section-heading">Juried Competition</h3>
+            <p>Some Copy</p>
+         </div>
+         <div class="col-sm-4">
+            <h3 class="section-heading">Registrant Jury</h3>
+            <p>Some Copy</p>
+         </div>
+         <div class="col-sm-4">
+            <h3 class="section-heading">Registered Judges</h3>
+            <p>Some Copy</p>
+         </div>
+      </div>
+   </div>
+</section>
+
+<section id="features">
+   <div class="container">
+      <div class="row text-center">
+         <div class="col-sm-6">
+            <h2 class="section-heading">Features</h2>
+            <p>Some Copy</p>
+            <img src="img/ribbon.svg" class="svg icon-small blue-ribbon">
+            <img src="img/ribbon.svg" class="svg icon-small red-ribbon">
+            <img src="img/ribbon.svg" class="svg icon-small yellow-ribbon">
+         </div>
+         <div class="col-sm-6">
+            <img src="img/phone.svg" class="svg">
+         </div>
+      </div>
+   </div>
+</section>
+
+<section id="account">
+   <div class="container">
+      <div class="row text-center">
+         <div class="col-sm-6">
+            <h2 class="section-heading">About</h2>
+            <p>Some Copy</p>
+         </div>
+         <div class="col-sm-6">
+            <h2 class="section-heading">About</h2>
+            <p>Some Copy</p>
+         </div>
+      </div>
+   </div>
+</section>
+
+<section id="call">
+   <div class="container">
+      <div class="row">
+         <div class="col-sm-4 col-lg-offset-2 text-center">
+            <h4 class="section-heading">Connect</h4>
+            <hr class="light">
+            <p>(Social Media Icons)</p>
+         </div>
+         <div class="col-sm-4 text-center">
+            <h4 class="section-heading">Get the Latest</h4>
+            <form class="form-inline">
+               <div class="form-group">
+                  <label class="sr-only" for="exampleInputAmount">Email Addresss</label>
+                  <div class="input-group">
+                     <input type="text" class="form-control" id="email-address" placeholder="Email Address">
+                     <div class="input-group-addon">
+                        <button type="submit" class="btn btn-primary">GO</button>
+                     </div>
+                  </div>
+               </div>
+            </form>
+         </div>
+      </div>
+   </div>
+</section>
+
+
+<footer class="bg-dark">
+   <div class="container bg-dark">
+      <div class="row">
+         <div class="col-sm-3 col-sm-offset-2">
+            <h5>About</h5>
+            <p>Documentation</p>
+            <p>History</p>
+            <p>About Us</p>
+         </div>
+         <div class="col-sm-3">
+            <h5>Support</h5>
+            <p>System Status</p>
+            <p>Support Ticket</p>
+            <p>Account Preferences</p>
+         </div>
+         <div class="col-sm-3">
+            <h5>About</h5>
+            <p>Contact</p>
+            <p>Privacy Policy</p>
+            <p>Terms of Use</p>
+         </div>
+      </div>
+   </div>
+</footer>
+   
+<script src="js/lib.min.js"></script>
+<script src="js/main.min.js"></script>
+ <!--[if lt IE 9]>
+   <script src="js/html5shiv.min.js"></script>
+   <script src="js/respond.min.js"></script>
+ <![endif]-->
+</body>
+</html>

+ 0 - 0
views/layouts/register.hbs


+ 0 - 0
views/layouts/user.hbs