Parcourir la source

Create new ejs for register page.
Update the style on the register page.

Lee Morgan il y a 5 ans
Parent
commit
81f205563c

+ 5 - 0
controllers/renderer.js

@@ -44,6 +44,11 @@ module.exports = {
         return res.render("otherPages/login");
     },
 
+    //GET: Renders the registration page
+    registerPage: function(req, res){
+        return res.render("otherPages/register");
+    },
+
     /*
     GET - Displays the main inventory page for merchants
     Returns = the logged in merchant and his/her data

+ 1 - 0
routes.js

@@ -17,6 +17,7 @@ module.exports = function(app){
     //Render page
     app.get("/", renderer.landingPage);
     app.get("/login", renderer.loginPage);
+    app.get("/register", renderer.registerPage);
     app.get("/dashboard", session, renderer.displayDashboard);
     app.get("/resetpassword/*", renderer.displayPassReset);
     

+ 0 - 47
views/landingPage/landing.ejs

@@ -75,55 +75,8 @@
             </div>
         </div>
 
-        <div id="registerStrand">
-            <form onsubmit="registerObj.submit()">
-                <h1> Join Subline </h1>
-
-                <label id="nameLabel">Restaurant Name
-                    <input class="input" id="regName" name="name" type="text" required>
-                </label>
-        
-                <label>Email
-                    <input type="text" id="regEmail" name="email" type="email" required>
-                </label>
-        
-                <label>Password
-                    <input type="password" id="regPass" name="password" type="password" required>
-                </label>
-        
-                <label>Confirm Password
-                    <input type="password" id="regConfirmPass" name="confirmPassword" type="password" required>
-                </label>
-        
-                <div id="agreement">
-                    <label class="container">
-                        <input id="checkAgree" type="checkbox">
-
-                        <span class="checkmark"></span>
-        
-                        <p style="padding-top: 5px; padding-left: 7px;">I agree to the 
-                            <a class="link" href="/privacy">Privacy Policy</a> and the 
-                            <a class="link" href="/terms">Terms and Conditions</a>
-                        </p>
-                    </label>   
-                </div>
-
-                <input id="regButton" class="buttonDisabled" type="submit" value="Sign Up with Email">
-
-                <!-- <h1>OR</h1>
-
-                <a class="button buttonWithBorder" href="/cloverlogin">Sign Up with Clover</a>
-
-                <a class="button buttonWithBorder" href="/squarelogin">Sign Up with Square</a> -->
-
-                <h3 class="link" style="margin-top: 30px;" onclick="loginObj.display()"> Already have an account? Please Sign In </h3>
-            </form>
-        </div>
-
         
 
-        <% include ../shared/footer %>
-
         <% include ../shared/loader %>
 
         <script>

+ 60 - 0
views/otherPages/register.ejs

@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html lang="en">
+    <head>
+        <meta charset="UTF-8">
+        <title>The Subline</title>
+        <link rel="icon" type="img/png" href="/shared/images/logo.png">
+        <link rel="stylesheet" href="/otherPages/style.css">
+        <link rel="stylesheet" href="/shared/shared.css">
+        <link href="https://fonts.googleapis.com/css?family=Saira&display=swap" rel="stylesheet">
+    </head>
+    <body id="register">
+        <div class="header">
+            <a class="headerStart" href="/" >
+                <img src="/shared/images/logo.png" alt="Subline">
+                <div class='headerLogo'>THE SUBLINE</div>
+            </a>
+        </div>
+
+        <form action="/register" method="post">
+            <h1> Join The Subline </h1>
+
+            <label id="nameLabel">Restaurant Name
+                <input type="text" name="name" required>
+            </label>
+    
+            <label>Email
+                <input type="text" name="email" required>
+            </label>
+    
+            <label>Password
+                <input type="password" name="password" required>
+            </label>
+    
+            <label>Confirm Password
+                <input type="password" name="confirmPassword" required>
+            </label>
+    
+            <label id="agreement">
+                <input type="checkbox" name="agree">
+
+                <p>I agree to the 
+                    <a class="link" href="/privacy">Privacy Policy</a> and the 
+                    <a class="link" href="/terms">Terms and Conditions</a>
+                </p>
+            </label>
+
+            <input class="buttonDisabled" type="submit" value="Sign Up with Email">
+
+            <!-- <h1>OR</h1>
+
+            <a class="button buttonWithBorder" href="/cloverlogin">Sign Up with Clover</a>
+
+            <a class="button buttonWithBorder" href="/squarelogin">Sign Up with Square</a> -->
+
+            <a class="link" href="/login">Already have an account? Please Sign In</a>
+        </form>
+
+        <% include ../shared/footer %>
+    </body>
+</html>

+ 89 - 172
views/otherPages/style.css

@@ -1,3 +1,71 @@
+form{
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    border: 2px solid rgb(0, 27, 45);
+    padding: 30px;
+    border-radius: 10px;
+    background: rgb(240, 252, 255);
+    font-size: 16px;
+    margin-top: 40px;
+    width: 550px;
+    justify-content: space-evenly;
+    height: auto;
+}
+
+    input[type=text], select {
+        width: 100%;
+        padding: 12px 20px;
+        margin: 8px 0;
+        display: inline-block;
+        border: 1px solid #ccc;
+        border-radius: 4px;
+        box-sizing: border-box;
+        padding-bottom: 16px;
+        font-size: 16px;
+    }
+
+    input[type=text], input[type=password], select {
+        width: 100%;
+        padding: 12px 20px;
+        margin: 8px 0;
+        display: inline-block;
+        border: 1px solid #ccc;
+        border-radius: 4px;
+        box-sizing: border-box;
+        font-size: 16px;
+    }
+    
+    input[type=submit] {
+        width: 100%;
+        background-color:rgb(255, 99, 107);
+        color: white;
+        padding: 14px 20px;
+        margin: 8px 0;
+        border: none;
+        border-radius: 4px;
+        cursor: pointer;
+        font-size: 22px;
+    }
+
+    input[type=submit]:hover {
+        background: rgb(243, 77, 86);
+        color: white;
+    }
+
+    input[type=text]:focus, input[type=password]:focus {
+        border: 2px solid #555;
+        outline: none;
+    }
+
+    input[type=button] {
+        background-color: rgb(255, 99, 107);
+    }
+
+    input[type=button]:hover {
+        background-color:rgb(0, 27, 45);
+    }
+
 /* Public Strand */
 #publicStrand{
     display: flex;
@@ -92,6 +160,27 @@ Login Page
     height: 91.5vh;
 }
 
+/*
+RegisterPage
+*/
+#register{
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    background-image: url("/shared/images/backgroundImg01.jpg");
+    background-repeat: no-repeat;
+    background-size: cover;
+    height: 91.5vh;
+}
+
+    #agreement{
+        display: flex;
+    }
+
+        #agreement input{
+            margin-right: 15px;
+        }
+
 /*
 Footer Partial
 */
@@ -117,178 +206,6 @@ Footer Partial
         margin: 0 25px;
     }
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    
-
-#registerStrand form{
-    margin: 0;
-}
-
-#registerStrand form > *{
-    margin: 2px;
-}
-
-/* ----The Checkbox and Inputs Start---- */
-
-/* The container */
-.container {
-    display: block;
-    position: relative;
-    padding-left: 35px;
-    margin-bottom: 12px;
-    cursor: pointer;
-    font-size: 16px;
-    -webkit-user-select: none;
-    -moz-user-select: none;
-    -ms-user-select: none;
-    user-select: none;
-  }
-  
-  /* Hide the browser's default checkbox */
-  .container input {
-    position: absolute;
-    opacity: 0;
-    cursor: pointer;
-    height: 0;
-    width: 0;
-  }
-  
-  /* Create a custom checkbox */
-  .checkmark {
-    position: absolute;
-    top: 0;
-    left: 0;
-    height: 24px;
-    width: 24px;
-    border: 1px solid#ccc;
-    border-radius: 4px;
-    background-color: rgb(255, 255, 255);
-  }
-  
-  /* On mouse-over, add a grey background color */
-  .checkmark:hover {
-    background-color: #ccc;
-  }
-  
-  /* When the checkbox is checked, add a blue background */
-  .container input:checked ~ .checkmark {
-    background-color: #5A6F7D;
-    border: 1px solid#5A6F7D;
-  }
-  
-  /* Create the checkmark/indicator (hidden when not checked) */
-  .checkmark:after {
-    content: "";
-    position: absolute;
-    display: none;
-  }
-  
-  /* Show the checkmark when checked */
-  .container input:checked ~ .checkmark:after {
-    display: block;
-  }
-  
-  /* Style the checkmark/indicator */
-  .container .checkmark:after {
-    left: 9px;
-    top: 5px;
-    width: 5px;
-    height: 10px;
-    border: solid white;
-    border-width: 0 3px 3px 0;
-    -webkit-transform: rotate(45deg);
-    -ms-transform: rotate(45deg);
-    transform: rotate(45deg);
-  }
-/* ----The Checkbox and Inputs End---- */
-
-/* Inputs Start */
-
-input[type=text], select {
-    width: 100%;
-    padding: 12px 20px;
-    margin: 8px 0;
-    display: inline-block;
-    border: 1px solid #ccc;
-    border-radius: 4px;
-    box-sizing: border-box;
-    padding-bottom: 16px;
-    font-size: 16px;
-
-  }
-
-  input[type=text], input[type=password], select {
-    width: 100%;
-    padding: 12px 20px;
-    margin: 8px 0;
-    display: inline-block;
-    border: 1px solid #ccc;
-    border-radius: 4px;
-    box-sizing: border-box;
-    font-size: 16px;
-  }
-  
-  input[type=submit] {
-    width: 100%;
-    background-color:rgb(255, 99, 107);
-    color: white;
-    padding: 14px 20px;
-    margin: 8px 0;
-    border: none;
-    border-radius: 4px;
-    cursor: pointer;
-    font-size: 22px;
-    margin-top: 30px;
-  }
-
-  input[type=submit]:hover {
-    background: rgb(243, 77, 86);
-    color: white;
-  }
-
-  input[type=text]:focus, input[type=password]:focus {
-    border: 2px solid #555;
-    outline: none;
-  }
-
-  input[type=button] {
-    background-color: rgb(255, 99, 107);
-  }
-
-  input[type=button]:hover {
-    background-color:rgb(0, 27, 45);
-  }
-
-  .input-error{
-    border-color: red;
-}
-
-/* Inputs End */
-
 @media screen and (max-width: 600px){
     .logo-text img{
         max-height: 20vh;

+ 7 - 26
views/shared/shared.css

@@ -114,36 +114,21 @@ button::-moz-focus-inner{
     border: 0;
 }
 
-.link {
+.link{
     cursor: pointer;
     color: gray;
     text-decoration: underline;
-    margin-top: 20px;
     text-align: center;
     font-size: 20px;
 }
 
-.link:hover {
-    color: #ff636b;
-    text-decoration: underline;
-    cursor: pointer;
-}
+    .link:hover {
+        color: #ff636b;
+        text-decoration: underline;
+        cursor: pointer;
+    }
+
 
-form{
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    border: 2px solid rgb(0, 27, 45);
-    padding: 50px;
-    border-radius: 10px;
-    margin: 10px;
-    background: rgb(240, 252, 255);
-    font-size: 16px;
-    margin-top: 40px;
-    width: 550px;
-    justify-content: space-evenly;
-    height: auto;
-}
 
 .button{
     display: initial;
@@ -379,8 +364,4 @@ Banner
     .headerStart{
         width: 0;
     }
-}
-
-label {
-    margin-top:20px ;
 }