Przeglądaj źródła

landing page update

unknown 9 lat temu
rodzic
commit
30147aab15
4 zmienionych plików z 40 dodań i 37 usunięć
  1. 1 0
      app/.meteor/packages
  2. 9 10
      app/app.css
  3. 17 25
      app/app.html
  4. 13 2
      app/app.js

+ 1 - 0
app/.meteor/packages

@@ -22,3 +22,4 @@ accounts-facebook
 accounts-github
 accounts-github
 service-configuration
 service-configuration
 twbs:bootstrap
 twbs:bootstrap
+jquery

+ 9 - 10
app/app.css

@@ -89,7 +89,7 @@ form input:hover {
 }
 }
 form input:focus {
 form input:focus {
   /*opacity: 0.4;*/
   /*opacity: 0.4;*/
-  width: 300px;
+  width: 300px !important;
   color: white;
   color: white;
 }
 }
 form button {
 form button {
@@ -261,6 +261,14 @@ footer {
    bottom:0;
    bottom:0;
    width:100%;
    width:100%;
    height:60px;   /* Height of the footer */
    height:60px;   /* Height of the footer */
+   padding: 0;
+   color: white;
+}
+footer a{
+  color: white;
+}
+footer a:hover{
+  color: white;
 }
 }
 .button {
 .button {
   -webkit-appearance: none;
   -webkit-appearance: none;
@@ -281,15 +289,6 @@ footer {
 .button:hover {
 .button:hover {
   background-color: #f5f7f9;
   background-color: #f5f7f9;
 }
 }
-.about {
-}
-.footer-info{
-  padding: 0;
-  color: white;
-}
-.footer-info a{
-  color: white;
-}
 #dashboard{
 #dashboard{
   color: black;
   color: black;
 }
 }

+ 17 - 25
app/app.html

@@ -24,27 +24,21 @@
   {{#if currentUser}}
   {{#if currentUser}}
     {{> dashboard}}
     {{> dashboard}}
   {{else}}
   {{else}}
-    <!-- {{> about}} -->
-    {{> auth}}
-    {{> footer}}
+    <div class="landing">
+      <div id="login-view">
+        {{> login}}
+      </div>
+      <div id="register-view" style="display:none">
+        {{> register}}
+      </div>
+      {{> footer}}
+    </div>
   {{/if}}
   {{/if}}
 </body>
 </body>
 
 
-<template name="about">
-
-</template>
-
-<template name="auth" id="auth">
-  <div class="landing">
-    {{> login}}
-  </div>
-</template>
-
 <template name="register">
 <template name="register">
   <div class="container">
   <div class="container">
-    <div class="about">
-      <button class="button">About</button>
-    </div>
+    <button class="button" id="login">Login</button>
     <h1>Register</h1>
     <h1>Register</h1>
     <form class="form">
     <form class="form">
       <input type="text" name="registerUsername" placeholder="Enter a username" onfocus="this.placeholder = ''" onblur="this.placeholder='Enter a username'" required/>
       <input type="text" name="registerUsername" placeholder="Enter a username" onfocus="this.placeholder = ''" onblur="this.placeholder='Enter a username'" required/>
@@ -52,8 +46,8 @@
       <input type="password" name="registerPassword" placeholder="Enter a password" onfocus="this.placeholder = ''" onblur="this.placeholder='Enter a password'" required/>
       <input type="password" name="registerPassword" placeholder="Enter a password" onfocus="this.placeholder = ''" onblur="this.placeholder='Enter a password'" required/>
       <button type="submit">Register</button>
       <button type="submit">Register</button>
     </form>
     </form>
-    <button class="btn" id="facebook-login"><i class="fa fa-facebook pull-left"></i>Login with Facebook</button><p></p>
-    <button class="btn" id="github-login"><i class="fa fa-github pull-left"></i>Login with Github</button>
+    <button class="btn-social" id="facebook-login"><i class="fa fa-facebook pull-left"></i>Login with Facebook</button><p></p>
+    <button class="btn-social" id="github-login"><i class="fa fa-github pull-left"></i>Login with Github</button>
   </div>
   </div>
 
 
   <ul class="bg-bubbles">
   <ul class="bg-bubbles">
@@ -119,12 +113,10 @@
 
 
 <template name="footer">
 <template name="footer">
   <footer>
   <footer>
-    <form class="footer-info">
-      <p>Copyright © 2015 All Right Reserved</p>
-      <p>Built by <a href="https://github.com/AkiraLaine" target="_blank">@AkiraLaine</a> |
-      <a href="https://github.com/KrisVos130" target="_blank">@KrisVos130</a> |
-      <a href="https://github.com/Johand199" target="_blank">@Johand199</a> |
-      <a href="https://github.com/Septimus" target="_blank">@Septimus</a></p>
-    </form>
+    <p>Copyright © 2015 All Right Reserved</p>
+    <p>Built by <a href="https://github.com/AkiraLaine" target="_blank">@AkiraLaine</a> |
+    <a href="https://github.com/KrisVos130" target="_blank">@KrisVos130</a> |
+    <a href="https://github.com/Johand199" target="_blank">@Johand199</a> |
+    <a href="https://github.com/Septimus" target="_blank">@Septimus</a></p>
   </footer>
   </footer>
 </template>
 </template>

+ 13 - 2
app/app.js

@@ -21,7 +21,8 @@ if (Meteor.isClient) {
     },
     },
 
 
     "click #login": function(){
     "click #login": function(){
-
+      $("#register-view").hide();
+      $("#login-view").show();
     }
     }
   });
   });
 
 
@@ -31,6 +32,15 @@ if (Meteor.isClient) {
         var username = e.target.loginUsername.value;
         var username = e.target.loginUsername.value;
         var password = e.target.loginPassword.value;
         var password = e.target.loginPassword.value;
         Meteor.loginWithPassword(username, password);
         Meteor.loginWithPassword(username, password);
+        Accounts.onLoginFailure(function(){
+           $("input").css("background-color","indianred");
+           $("input").on("click",function(){
+             $("input").css({
+               "background-color": "transparent",
+               "width": "250px"
+             });
+           })
+        });
     },
     },
 
 
     "click #facebook-login": function(){
     "click #facebook-login": function(){
@@ -42,7 +52,8 @@ if (Meteor.isClient) {
     },
     },
 
 
     "click #register": function(){
     "click #register": function(){
-
+      $("#login-view").hide();
+      $("#register-view").show();
     }
     }
   });
   });