-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.html
96 lines (82 loc) · 3.24 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{longappname}}</title>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="//oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="//oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style type="text/css">
.btn-lg { margin: 10px; min-width: 300px; }
.btn-lg > .btn-text { display: inline-block; padding: 10px; }
ul { list-style-type: none; padding-left: 0px; }
</style>
</head>
<body>
<script type="text/javascript">
$(document).ready(function() {
var data = [
{% for item in providers %}
{
'display': '{{item.display}}',
'id': '{{item.id}}'
},
{% endfor %}
null /*dummy*/
];
for (var n in data)
{
if (n == null || data[n] == null)
continue;
var d = data[n];
if (d.id == '{{redir}}') {
window.location.href = $('#start-btn-' + d.id).attr('href');
$('#normal-login').hide();
$('#fast-login').show();
$('#fast-login-text').text('Redirecting to ' + d.display + ' for login ...');
}
}
});
</script>
<div class="well well-lg">
<div class="jumbotron">
<h1>{{longappname}}</h1>
<div id="normal-login">
{% if providers.length != 1 %}
<p>This service is intended for {{appname}} users that want to use one of the following OAuth enabled providers:</p>
<ul>
{% for item in providers %}
<li><a href="{{item.servicelink}}" target="_blank">{{item.display}}</a></li>
{% endfor %}
</ul>
<p> Click the button for the provider you wish to log in with:</p>
{% endif %}
{% for item in providers %}
<a id="start-btn-{{item.id}}" class="btn btn-primary btn-lg" role="button" href="{{item.authlink}}">
{% if item.brandimage != '' %}
<img class="provider-image" src="{{item.brandimage}}" />
{% endif %}
<div class="btn-text">{{item.display}} login</div>
</a>
{% endfor %}
{% for item in providers %}
{{item.notes|safe}}
{% endfor %}
<p style="font-size: small"><a href="/revoke">Click here if you need to revoke a previously established authid</a></p>
<p style="font-size: small">By using this service, you accept the <a href="/privacy-policy.txt">privacy policy</a></p>
</div>
<div id="fast-login" style="display: none">
<p id="fast-login-text"></p>
</div>
</div>
</div>
</body>
</html>