-
Notifications
You must be signed in to change notification settings - Fork 21
/
index.html
106 lines (106 loc) · 4.02 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>AWS Cognito authentication example</title>
<link rel="stylesheet" media="all" href="/css/index.css">
<link rel="stylesheet" media="all" href="/css/Control.css">
<link rel="stylesheet" media="all" href="/css/Alert.css">
<link rel="stylesheet" media="all" href="/css/Button.css">
<link rel="stylesheet" media="all" href="/css/Well.css">
</head>
<body>
<!-- Templates -->
<script type="text/html" id="LoginForm">
<div class="LoginForm">
<div class="title">Login</div>
<form class="form">
<div class="Control">
<label class="Control__label" for="email">Email</label>
<input class="Control__input" name="email" type="text" placeholder="Email" />
</div>
<div class="Control">
<label class="Control__label" for="password">Password</label>
<input class="Control__input" name="password" type="password" placeholder="Password" />
</div>
<input class="Control__input" type="submit" value="Let's go" />
<a class="Control__link" href="#signup">
I want an account.
</a>
</form>
</div>
</script>
<script type="text/html" id="SignupForm">
<div class="SignupForm">
<div class="title">Sign Up</div>
<form class="form">
<div class="Control">
<label class="Control__label" for="email">Email</label>
<input class="Control__input" name="email" type="text" placeholder="Email" />
</div>
<div class="Control">
<label class="Control__label" for="password">Password</label>
<input class="Control__input" name="password" type="password" placeholder="Password" />
</div>
<div class="Control">
<label class="Control__label" for="repeatPassword">
Repeat Password
</label>
<input class="Control__input" name="repeatPassword" type="password" placeholder="Repeat Password" />
</div>
<input class="Control__input" type="submit" value="Sign me up!" />
<a class="Control__link" href="#login">
Send me back to the login page.
</a>
</form>
</div>
</script>
<script type="text/html" id="Alert">
<div class="Alert Alert__<%= type %>">
<span class="Alert__close"></span>
<%= message %>
</div>
</script>
<script type="text/html" id="ConfirmForm">
<div class="ConfirmForm">
<div class="title">Confirm email</div>
<form class="form">
<div class="Control">
<label class="Control__label" for="code">Authorization code</label>
<input class="Control__input" name="code" type="text" placeholder="Authorization code" />
</div>
<input class="Control__input" type="submit" value="Here you go" />
<a class="Control__link" href="#">
Please, resend the authorization code.
</a>
<hr />
<a class="Control__link" href="#signup">
Send me back to the login page.
</a>
</form>
</div>
</script>
<script type="text/html" id="Welcome">
<div class="Well Well__info">
<div class="title">Welcome <%= email %></div>
<button type="button" class="Button">Bye!</button>
</div>
</script>
<!-- Root component -->
<div id="root"></div>
<!-- Scripts -->
<script src="/javascript/lib/aws-cognito-sdk.min.js"></script>
<script src="/javascript/lib/amazon-cognito-identity.min.js"></script>
<script src="/javascript/config.js"></script>
<script src="/javascript/utils.js"></script>
<script src="/javascript/EventEmmiter.js"></script>
<script src="/javascript/Cognito.js"></script>
<script src="/javascript/LoginForm.js"></script>
<script src="/javascript/ConfirmForm.js"></script>
<script src="/javascript/SignupForm.js"></script>
<script src="/javascript/Welcome.js"></script>
<script src="/javascript/index.js"></script>
</body>
</html>