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 Inline Diff
flashy.css
View file @
ce4a454
#loginform input { | 1 | 1 | #loginform input { | |
margin: 10px; | 2 | 2 | margin: 10px; | |
} | 3 | 3 | } | |
4 | 4 | |||
#loginform { | 5 | 5 | #loginform { | |
max-width: 400px; | 6 | 6 | max-width: 400px; | |
margin: 30px auto; | 7 | |||
} | 8 | 7 | } | |
9 | 8 | |||
#sidebar{ | 10 | 9 | #sidebar{ | |
position:absolute; | 11 | 10 | position:absolute; | |
top:100px; | 12 | 11 | top:100px; | |
left:0px; | 13 | 12 | left:0px; | |
} | 14 | 13 | } | |
15 |
scripts/DeckController.js
View file @
ce4a454
var app = angular.module("flashy.DeckController", ['ui.router']); | 1 | 1 | var app = angular.module("flashy.DeckController", ['ui.router']); | |
2 | 2 | |||
app.controller("DeckController", ['$scope', function ($scope) { | 3 | 3 | app.controller("DeckController", ['$scope', function ($scope) { | |
4 | ||||
$scope.hello = function () { | 5 | 4 | $scope.hello = function () { | |
alert("hello"); | 6 | 5 | alert("hello"); |
scripts/LoginController.js
View file @
ce4a454
angular.module('flashy.LoginController', ['ui.router']). | 1 | 1 | angular.module('flashy.LoginController', ['ui.router']). | |
controller('LoginController', ['$scope', '$state', '$http', | 2 | 2 | ||
function($scope, $state, $http) { | 3 | 3 | controller('LoginController', ['$scope', '$state', '$http', | |
'use strict'; | 4 | 4 | function($scope, $state, $http) { | |
$scope.login = function(email, password) { | 5 | 5 | 'use strict'; | |
$http.post('/api/login', JSON.stringify({ | 6 | 6 | $scope.login = function(email, password) { | |
'email': email, | 7 | 7 | $http.post('/api/login', JSON.stringify({ | |
'password': password | 8 | 8 | 'email': email, | |
})).success(function(data) { | 9 | 9 | 'password': password | |
$state.go('feed'); | 10 | 10 | })).success(function(data) { | |
console.log(data); | 11 | 11 | $state.go('feed'); | |
}); | 12 | 12 | console.log(data); | |
}; | 13 | 13 | }); | |
$scope.register = function(email, password) { | 14 | 14 | }; | |
$http.post('/api/users/me', JSON.stringify({ | 15 | 15 | $scope.register = function(email, password) { | |
'email': email, | 16 | 16 | $http.post('/api/users/me', JSON.stringify({ | |
'password': password | 17 | 17 | 'email': email, | |
})).success(function(data) { | 18 | 18 | 'password': password | |
$state.go('feed'); | 19 | 19 | })).success(function(data) { | |
console.log(data); | 20 | 20 | $state.go('feed'); | |
}); | 21 | 21 | console.log(data); | |
}; | 22 | 22 | }); | |
}]); | 23 | 23 | }; | |
24 | } | |||
25 | ]); | |||
24 | 26 | |||
templates/deck.html
View file @
ce4a454
<!DOCTYPE html> | 1 | 1 | <!DOCTYPE html> | |
<html ng-app="flashy"> | 2 | 2 | <html ng-app="flashy"> | |
<head> | 3 | 3 | <head> | |
4 | 4 | |||
<link rel="stylesheet" href="styles/bootstrap-3.3.4-dist/css/bootstrap.css" /> | 5 | 5 | <link rel="stylesheet" href="styles/bootstrap-3.3.4-dist/css/bootstrap.css" /> | |
<link rel="stylesheet" href="flashy.css" /> | 6 | 6 | <link rel="stylesheet" href="flashy.css" /> | |
7 | 7 | |||
</head> | 8 | 8 | </head> | |
<body ng-controller="DeckController"> | 9 | 9 | <body ng-controller="DeckController"> | |
10 | 10 | |||
<button type="button" ng-click="hello()">SUPPPP</button> | 11 | 11 | <button type="button" ng-click="hello()">SUPPPP</button> | |
12 | 12 | |||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js"></script> | 13 | 13 | <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.14/angular-ui-router.js"></script> | 14 | 14 | <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.14/angular-ui-router.js"></script> | |
<script src="/app/config.js"></script> | 15 | 15 | <script src="/app/config.js"></script> | |
<!--<script src="controller.js"></script>--> | 16 | 16 | <!--<script src="controller.js"></script>--> | |
17 | 17 | |||
18 | 18 | |||
<script src="viewDeckController.js"></script> | 19 | 19 | <script src="viewDeckController.js"></script> | |
</body> | 20 | 20 | </body> | |
</html> | 21 | 21 | </html> | |
22 | ||||
templates/login_form.html
View file @
ce4a454
<div class="container"> | 1 | 1 | <div class="container"> | |
<form id="loginform"> | 2 | 2 | <form id="loginform"> | |
<h1 class="text-success heading">Please Log In</h1> | 3 | 3 | <div class="container"> | |
<blockquote class="pull-left"> | 4 | 4 | <h1 class="text-success heading">FLASHY</h1> | |
<p>The System shall enlighten you.</p> | 5 | 5 | <blockquote class="pull-left"> | |
<small>SWAG</small> | 6 | 6 | <p>The System shall enlighten you.</p> | |
</blockquote> | 7 | 7 | <small>SWAG</small> | |
8 | </blockquote> | |||
9 | </div> | |||
8 | 10 | |||
<br /> | 9 | 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 | |||
<div class="container"> | 11 | 20 | <!-- REGISTRATION TAB PANES --> | |
<!-- REGISTRATION TABS --> | 12 | 21 | <div class="tab-content"> | |
<div class="tabbable"> | 13 | 22 | <!-- SIGN UP FORM --> | |
<ul class="nav nav-tabs"> | 14 | 23 | <div class="tab-pane active myform" id="tab1"> | |
<li role="presentation" class="active"><a href="#tab1" data-toggle="tab">SIGN UP</a></li> | 15 | 24 | <form> | |
<li role="presentation"><a href="#tab2" data-toggle="tab">LOGIN</a></li> | 16 | 25 | <div class="form-group"> | |
</ul> | 17 | 26 | <input type="email" class="form-control" ng-model="signUpEmail" placeholder="Email" /> | |
</div> | 18 | 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 | 36 | <!-- LOGIN FORM --> | ||
<!-- REGISTRATION TAB PANES --> | 22 | 37 | <div class="tab-pane myform" id="tab2"> | |
<div class="tab-content"> | 23 | 38 | <form> | |
24 | 39 | <div class="form-group"> | ||
<!-- SIGN UP FORM --> | 25 | 40 | <input type="email" class="form-control" ng-model="loginEmail" placeholder="Email" /> | |
<div class="tab-pane active myform" id="tab1"> | 26 | 41 | </div> | |
<form> | 27 | 42 | <div class="form-group"> | |
<div class="form-group"> | 28 | 43 | <input type="password" class="form-control" ng-model="loginPassword" placeholder="Password" /> | |
<input type="email" class="form-control" ng-model="signUpEmail" placeholder="Email" /> | 29 | 44 | </div> | |
</div> | 30 | 45 | <input type="submit" class="btn btn-primary" ng-click="login(loginEmail, loginPassword)" value="LOGIN" /> | |
31 | 46 | </form> | ||
32 | 47 | </div> | ||
<div class="form-group"> | 33 | 48 | </div> | |
<input type="password" class="form-control" ng-model="signUpPassword" placeholder="Password" /> | 34 | 49 | </div> | |
</div> | 35 | |||
<input type="submit" class="btn btn-primary" ng-click="signUp(signUpEmail, signUpPassword)" value="GET STARTED!" /> | 36 | |||
</form> | 37 | |||
</div> | 38 | |||
39 | ||||
<!-- LOGIN FORM --> | 40 | |||
<div class="tab-pane myform" id="tab2"> | 41 | |||
<form> | 42 | |||
<div class="form-group"> | 43 | |||
<input type="email" class="form-control" ng-model="loginEmail" placeholder="Email or username" /> | 44 | |||
</div> | 45 | |||
<div class="form-group"> | 46 | |||
<input type="password" class="form-control" ng-model="loginPassword" placeholder="Password" /> | 47 | |||
</div> | 48 | |||
<input type="submit" class="btn btn-primary" ng-click="login(loginEmail, loginPassword)" value="LOGIN" /> | 49 | |||
</form> | 50 | |||
</div> | 51 | |||
</div> | 52 | |||
</div> | 53 | |||
54 | 50 | |||
55 | 51 | |||
56 | 52 | |||
57 | 53 | |||
<!--<div> | 58 | 54 | <!--<div> | |
<input type="email" class="form-control" ng-model="loginEmail" placeholder="Email"/> | 59 | 55 | <input type="email" class="form-control" ng-model="loginEmail" placeholder="Email"/> | |
</div> | 60 | 56 | </div> | |
<div class="form-group"> | 61 | 57 | <div class="form-group"> | |
<input type="password" class="form-control" ng-model="loginPassword" placeholder="Password"/> | 62 | 58 | <input type="password" class="form-control" ng-model="loginPassword" placeholder="Password"/> | |
</div> | 63 | 59 | </div> | |
<input type="submit" class="btn btn-primary" ng-click="login(loginEmail, loginPassword)" value="LOGIN"/> | 64 | 60 | <input type="submit" class="btn btn-primary" ng-click="login(loginEmail, loginPassword)" value="LOGIN"/> | |
<input type="submit" class="btn btn-primary" ng-click="register(loginEmail, loginPassword)" value="REGISTER"/> | 65 | 61 | <input type="submit" class="btn btn-primary" ng-click="register(loginEmail, loginPassword)" value="REGISTER"/> | |
</form>--> | 66 | 62 | </form>--> | |
</div> | 67 | 63 | </div> | |
64 | ||||