-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
67 lines (63 loc) · 2.73 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Vue JS Project</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="google-signin-client_id" content="361410521431-43b6q1svlfdva399jgjkgevfjjmp3k3t.apps.googleusercontent.com">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link rel="stylesheet" href="css/style.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<script src="https://apis.google.com/js/platform.js" async defer></script>
</head>
<body>
<p><a href="html/landingwithvoting.html">Landing Page</a></p>
<div class="container centered">
<header>
<div class="row">
<div class="col-xs-12">
<h1>Login/Signup</h1>
</div>
</div>
</header>
<!-- <div class="row">
<div class="col-md-12 add-top-margin">
<button class="btn btn-primary"><span class="fa fa-facebook fa-5" aria-hidden="true"></span> Facebook</button>
</div>
</div> -->
<div class="row">
<div class="col-md-4">
</div>
<div class="col-md-4 add-top-margin">
<div class="g-signin2" data-onsuccess="onSignIn"
-theme="light" data-width="300px" data-height="50px"
data-longtitle="true">button</div>
<div style="margin-top: 20px;">
<a href="#" onclick="signOut();">Sign out</a>
</div>
</div>
</div>
</div>
<script>
function onSignIn(googleUser) {
var profile = googleUser.getBasicProfile();
localStorage.setItem('username', profile.getName());
var userName = localStorage.getItem('username');
console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.
console.log('Name: ' + profile.getName());
console.log('Image URL: ' + profile.getImageUrl());
console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.
}
</script>
<script>
function signOut() {
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function() {
console.log('User signed out.');
});
}
</script>
</body>
</html>