Commit ce4a4542ec563ff1fe0706a149563dbe3d0ec4d3
1 parent
1611629678
Exists in
master
and in
1 other branch
Changes to random stuff
Showing 5 changed files with 85 additions and 93 deletions Side-by-side Diff
flashy.css
View file @
ce4a454
scripts/DeckController.js
View file @
ce4a454
scripts/LoginController.js
View file @
ce4a454
1 | 1 | angular.module('flashy.LoginController', ['ui.router']). |
2 | - controller('LoginController', ['$scope', '$state', '$http', | |
3 | - function($scope, $state, $http) { | |
4 | - 'use strict'; | |
5 | - $scope.login = function(email, password) { | |
6 | - $http.post('/api/login', JSON.stringify({ | |
7 | - 'email': email, | |
8 | - 'password': password | |
9 | - })).success(function(data) { | |
10 | - $state.go('feed'); | |
11 | - console.log(data); | |
12 | - }); | |
13 | - }; | |
14 | - $scope.register = function(email, password) { | |
15 | - $http.post('/api/users/me', JSON.stringify({ | |
16 | - 'email': email, | |
17 | - 'password': password | |
18 | - })).success(function(data) { | |
19 | - $state.go('feed'); | |
20 | - console.log(data); | |
21 | - }); | |
22 | - }; | |
23 | - }]); | |
2 | + | |
3 | +controller('LoginController', ['$scope', '$state', '$http', | |
4 | + function($scope, $state, $http) { | |
5 | + 'use strict'; | |
6 | + $scope.login = function(email, password) { | |
7 | + $http.post('/api/login', JSON.stringify({ | |
8 | + 'email': email, | |
9 | + 'password': password | |
10 | + })).success(function(data) { | |
11 | + $state.go('feed'); | |
12 | + console.log(data); | |
13 | + }); | |
14 | + }; | |
15 | + $scope.register = function(email, password) { | |
16 | + $http.post('/api/users/me', JSON.stringify({ | |
17 | + 'email': email, | |
18 | + 'password': password | |
19 | + })).success(function(data) { | |
20 | + $state.go('feed'); | |
21 | + console.log(data); | |
22 | + }); | |
23 | + }; | |
24 | + } | |
25 | +]); |
templates/deck.html
View file @
ce4a454
1 | 1 | ๏ปฟ<!DOCTYPE html> |
2 | 2 | <html ng-app="flashy"> |
3 | - <head> | |
3 | + <head> | |
4 | 4 | |
5 | - <link rel="stylesheet" href="styles/bootstrap-3.3.4-dist/css/bootstrap.css" /> | |
6 | - <link rel="stylesheet" href="flashy.css" /> | |
5 | + <link rel="stylesheet" href="styles/bootstrap-3.3.4-dist/css/bootstrap.css" /> | |
6 | + <link rel="stylesheet" href="flashy.css" /> | |
7 | 7 | |
8 | - </head> | |
9 | - <body ng-controller="DeckController"> | |
8 | + </head> | |
9 | + <body ng-controller="DeckController"> | |
10 | 10 | |
11 | - <button type="button" ng-click="hello()">SUPPPP</button> | |
11 | + <button type="button" ng-click="hello()">SUPPPP</button> | |
12 | 12 | |
13 | - <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js"></script> | |
14 | - <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.14/angular-ui-router.js"></script> | |
15 | - <script src="/app/config.js"></script> | |
16 | - <!--<script src="controller.js"></script>--> | |
13 | + <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js"></script> | |
14 | + <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.14/angular-ui-router.js"></script> | |
15 | + <script src="/app/config.js"></script> | |
16 | + <!--<script src="controller.js"></script>--> | |
17 | 17 | |
18 | 18 | |
19 | - <script src="viewDeckController.js"></script> | |
20 | - </body> | |
19 | + <script src="viewDeckController.js"></script> | |
20 | + </body> | |
21 | 21 | </html> |
templates/login_form.html
View file @
ce4a454
1 | 1 | <div class="container"> |
2 | 2 | <form id="loginform"> |
3 | - <h1 class="text-success heading">Please Log In</h1> | |
4 | - <blockquote class="pull-left"> | |
5 | - <p>The System shall enlighten you.</p> | |
6 | - <small>SWAG</small> | |
7 | - </blockquote> | |
3 | + <div class="container"> | |
4 | + <h1 class="text-success heading">FLASHY</h1> | |
5 | + <blockquote class="pull-left"> | |
6 | + <p>The System shall enlighten you.</p> | |
7 | + <small>SWAG</small> | |
8 | + </blockquote> | |
9 | + </div> | |
8 | 10 | |
9 | - <br /> | |
11 | + <div class="container"> | |
12 | + <!-- REGISTRATION TABS --> | |
13 | + <div class="tabbable"> | |
14 | + <ul class="nav nav-tabs"> | |
15 | + <li role="presentation" class="active"><a href="#tab1" data-toggle="tab">SIGN UP</a></li> | |
16 | + <li role="presentation"><a href="#tab2" data-toggle="tab">LOGIN</a></li> | |
17 | + </ul> | |
18 | + </div> | |
10 | 19 | |
11 | - <div class="container"> | |
12 | - <!-- REGISTRATION TABS --> | |
13 | - <div class="tabbable"> | |
14 | - <ul class="nav nav-tabs"> | |
15 | - <li role="presentation" class="active"><a href="#tab1" data-toggle="tab">SIGN UP</a></li> | |
16 | - <li role="presentation"><a href="#tab2" data-toggle="tab">LOGIN</a></li> | |
17 | - </ul> | |
18 | - </div> | |
20 | + <!-- REGISTRATION TAB PANES --> | |
21 | + <div class="tab-content"> | |
22 | + <!-- SIGN UP FORM --> | |
23 | + <div class="tab-pane active myform" id="tab1"> | |
24 | + <form> | |
25 | + <div class="form-group"> | |
26 | + <input type="email" class="form-control" ng-model="signUpEmail" placeholder="Email" /> | |
27 | + </div> | |
19 | 28 | |
29 | + <div class="form-group"> | |
30 | + <input type="password" class="form-control" ng-model="signUpPassword" placeholder="Password" /> | |
31 | + </div> | |
32 | + <input type="submit" class="btn btn-primary" ng-click="signUp(signUpEmail, signUpPassword)" value="GET STARTED!" /> | |
33 | + </form> | |
34 | + </div> | |
20 | 35 | |
21 | - | |
22 | - <!-- REGISTRATION TAB PANES --> | |
23 | - <div class="tab-content"> | |
24 | - | |
25 | - <!-- SIGN UP FORM --> | |
26 | - <div class="tab-pane active myform" id="tab1"> | |
27 | - <form> | |
28 | - <div class="form-group"> | |
29 | - <input type="email" class="form-control" ng-model="signUpEmail" placeholder="Email" /> | |
30 | - </div> | |
31 | - | |
32 | - | |
33 | - <div class="form-group"> | |
34 | - <input type="password" class="form-control" ng-model="signUpPassword" placeholder="Password" /> | |
35 | - </div> | |
36 | - <input type="submit" class="btn btn-primary" ng-click="signUp(signUpEmail, signUpPassword)" value="GET STARTED!" /> | |
37 | - </form> | |
38 | - </div> | |
39 | - | |
40 | - <!-- LOGIN FORM --> | |
41 | - <div class="tab-pane myform" id="tab2"> | |
42 | - <form> | |
43 | - <div class="form-group"> | |
44 | - <input type="email" class="form-control" ng-model="loginEmail" placeholder="Email or username" /> | |
45 | - </div> | |
46 | - <div class="form-group"> | |
47 | - <input type="password" class="form-control" ng-model="loginPassword" placeholder="Password" /> | |
48 | - </div> | |
49 | - <input type="submit" class="btn btn-primary" ng-click="login(loginEmail, loginPassword)" value="LOGIN" /> | |
50 | - </form> | |
51 | - </div> | |
52 | - </div> | |
53 | - </div> | |
36 | + <!-- LOGIN FORM --> | |
37 | + <div class="tab-pane myform" id="tab2"> | |
38 | + <form> | |
39 | + <div class="form-group"> | |
40 | + <input type="email" class="form-control" ng-model="loginEmail" placeholder="Email" /> | |
41 | + </div> | |
42 | + <div class="form-group"> | |
43 | + <input type="password" class="form-control" ng-model="loginPassword" placeholder="Password" /> | |
44 | + </div> | |
45 | + <input type="submit" class="btn btn-primary" ng-click="login(loginEmail, loginPassword)" value="LOGIN" /> | |
46 | + </form> | |
47 | + </div> | |
48 | + </div> | |
49 | + </div> | |
54 | 50 | |
55 | 51 | |
56 | 52 |