-
Notifications
You must be signed in to change notification settings - Fork 171
/
index.html
89 lines (86 loc) · 4.03 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<html ng-app="angular-login">
<head>
<title>angular-login-service</title>
<!-- BootstrapCDN -->
<link href="//netdna.bootstrapcdn.com/bootswatch/3.3.1/slate/bootstrap.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<!-- compiled css -->
<link href="style.css" rel="stylesheet">
<!-- libraries concatenated -->
<script type="text/javascript" src="libs.js"></script>
<!-- app concatenated -->
<script type="text/javascript" src="app.js"></script>
<!-- html templates -->
<script type="text/javascript" src="templates-app.js"></script>
<!-- analytics! -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-42785441-2', 'auto');
ga('send', 'pageview');
</script>
</head>
<body ng-controller="BodyController">
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="navbar-collapse">
<!-- Navbar links -->
<ul class="nav navbar-nav">
<li ng-class="{ active: $state.is('app.home') }">
<a ui-sref="app.home">Home</a>
</li>
<li ng-class="{ active: $state.is('app.admin') }">
<a ui-sref="app.admin">Admin-Only page</a>
</li>
<li ng-class="{ active: $state.is('app.user') }">
<a ui-sref="app.user">Registered-Only page</a>
</li>
<li ng-class="{ active: $state.is('app.register') }">
<a ui-sref="app.register">Register <i class="fa fa-user"></i>+</a>
</li>
</ul>
<!-- Right side of the navbar -->
<!-- Login Form -->
<form class="navbar-form navbar-right" name="loginForm" role="login" ng-submit="loginMe()" ng-hide="ls.isLogged || !ls.doneLoading">
<div class="form-group">
<input type="text" class="form-control" ng-model="login.username" name="username" placeholder="Username">
</div>
<div class="form-group">
<input type="password" class="form-control" ng-model="login.password" name="password" placeholder="Password">
</div>
<button type="submit" class="btn btn-default hidden-devices" ng-disabled="login.working">Login <i class="fa" ng-class="login.working ? 'fa-cog fa-spin' : 'fa-sign-in'"></i></button>
</form>
<!-- Spinner -->
<button class="btn btn-default navbar-btn navbar-right" ng-hide="ls.doneLoading">
<i class="fa fa-spinner fa-spin"></i>
</button>
<!-- Logout Form -->
<form class="navbar-form navbar-right" role="logout" ng-submit="logoutMe()" ng-show="ls.isLogged">
<div class="form-group">
<label>Hello {{ ls.user.name }}</label>
</div>
<div class="form-group">
<button type="submit" class="btn btn-default">Logout <i class="fa fa-signout"></i></button>
</div>
</form>
</div>
<div class="login-error" ng-class="{ 'active': login.wrong }">
<div class="alert alert-danger"><b>Error:</b> Server (WUT?) said your user/pass doesn't match existing users.</div>
</div>
</div>
<ui-view ng-hide="doingResolve"></ui-view>
<div class="jumbotron loading-jumbo" ng-show="doingResolve">
<h1><i class="fa fa-refresh fa-2x fa-spin"></i> Loading</h1>
</div>
<!-- version footer -->
<div class="panel panel-default">
<div class="panel-body">
<a href="https://github.com/mrgamer/angular-login-example/tree/<%=version %>" target="_blank"><b>angular-login-version:</b> <%=version %></a>
</div>
</div>
</div>
</body>
</html>