-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
80 lines (74 loc) · 3.28 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
<!doctype html>
<html class="login">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Login</title>
<link rel="stylesheet" href="/styles/auth.css">
<script src="/scripts/local_auth.js"></script>
</head>
<body>
<article>
<header>
<div class="logo large"></div>
Log In
</header>
<form accept-charset="UTF-8" action="/auth/signin" method="POST" id="login-form">
<label for="email">Email:</label>
<input name="email" type="email" placeholder="Email" class="first">
<label for="password">Password:</label>
<input name="password" type="password" placeholder="Password">
<p>
<input type="submit" value="Log In">
</p>
<p id="error" style="display: none;"><span style="display: none">Sorry, your email or password could not be found. Please try again.</span></p>
</form>
<!--
<nav>
<a href="/auth/google"><span class="icon-social-google-plus"></span>Google</a>
<a href="/auth/twitter"><span class="icon-social-twitter"></span>Twitter</a>
<a href="/auth/facebook"><span class="icon-social-facebook"></span>Facebook</a>
<a href="#"><span class="icon-social-pinterest"></span>Pinterest</a>
<a href="#"><span class="icon-social-linkedin"></span>LinkedIn</a>
<a href="#"><span class="icon-social-digg"></span>Digg</a>
<a href="#"><span class="icon-social-quora"></span>Quora</a>
<a href="#"><span class="icon-social-vimeo"></span>Vimeo</a>
<a href="#"><span class="icon-social-yahoo"></span>Yahoo</a>
</nav>
<p>Haven't logged in before? <a href="/signup/index.html">Sign up here</a></p>
-->
</article>
<script>
localStorage.removeItem('accessToken');
localStorage.removeItem('accessExpiry');
localStorage.removeItem('refreshToken');
// Add branding styles to the page
$.ajax('/auth/authority', {
dataType: 'json',
success: function (data) {
if (data.branding) {
var css_link = $('<link>', {
rel: 'stylesheet',
type: 'text/css',
href: data.branding
});
css_link.appendTo('head');
}
}
});
$('#login-form').submit(function(event) {
event.preventDefault();
var form = $(this);
$.post(form.attr('action'), form.serialize())
.done(function() {
window.location = window.location.getParameter('continue') || '/';
})
.error(function() {
$('#error').slideDown('fast', function() {
$('#error span').fadeIn();
});
});
});
</script>
</body>
</html>