Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
21555 kshitij.so 1
<html>
2
<head>
3
<title>ProfitMandi - FOFO Login</title>
21564 kshitij.so 4
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css">
5
<script src="https://apis.google.com/js/api:client.js"></script>
6
<script src="/profitmandi-fofo/resources/js/jquery-3.2.1.min.js"></script>
7
  <script>
8
  var googleUser = {};
9
  var startApp = function() {
10
    gapi.load('auth2', function(){
11
      // Retrieve the singleton for the GoogleAuth library and set up the client.
12
      auth2 = gapi.auth2.init({
13
        client_id: '968353813927-c7eb4mm2lmm451kb6plk9cdmtf47e3mk.apps.googleusercontent.com',
14
        cookiepolicy: 'single_host_origin',
15
        // Request scopes in addition to 'profile' and 'email'
16
        //scope: 'additional_scope'
17
      });
18
      attachSignin(document.getElementById('customBtn'));
19
    });
20
  };
21
 
22
  function attachSignin(element) {
23
    console.log(element.id);
24
    auth2.attachClickHandler(element, {},
25
        function(googleUser) {
26
        	var profile = googleUser.getBasicProfile();
27
        	submitUser(googleUser.getAuthResponse().id_token);
28
        }, function(error) {
29
          console.log(JSON.stringify(error, undefined, 2));
30
        });
31
  }
32
 
33
  function submitUser(token){
34
	jQuery.ajax({
35
        type : "POST",
36
        url : "/profitmandi-fofo/login/",
37
        data: {"token":token},
38
        success : function(response) {
39
			console.log(response);
40
        }
41
    });  
42
}
43
 
44
  </script>
21555 kshitij.so 45
<style>
21564 kshitij.so 46
#welcome {
47
	width: 600px;
48
	margin:0 auto;
49
	padding-top:30px;
50
}
21555 kshitij.so 51
#login-box {
21564 kshitij.so 52
	position: relative;
21555 kshitij.so 53
    padding: 10px;
54
    margin:0 auto;
55
    width: 400px;
56
    height: 400px;
57
    border-radius: 3px;
58
    background: white;
59
    box-shadow: 0 1px 5px 0 rgba(0,0,0,0.26);
60
    overflow: hidden;
61
}
21564 kshitij.so 62
#login-logo {
63
    padding: 10px;
64
    margin:0 auto;
65
    width: 200px;
66
    height: 200px;
67
    border-radius: 3px;
68
    background: white;
69
    box-shadow: 0 1px 5px 0 rgba(0,0,0,0.26);
70
    overflow: hidden;
71
}
72
#customBtn{
73
	position: relative;
74
	margin:0 auto;
75
	top:5%;
76
	width:310px;
77
	height:50px;
78
	cursor:pointer;
79
}
80
h2{
81
	font-family: 'Lato', Helvetica, sans-serif;
82
	font-size:16px;
83
	color:gray;
84
	font-weight:800;
85
	text-align:center;
86
}
87
h1{
88
	font-family: 'Lato', Helvetica, sans-serif;
89
    font-size: 36px;
90
    font-weight: 300;
91
    color: #333333;
92
    -webkit-font-smoothing: subpixel-antialiased;
93
    text-align:center;
94
}
95
strong {
96
    font-weight: 500;
97
}
98
p{
99
	text-align:center;
100
	color:gray;
101
	font-size:16px;
102
	font-family: 'Lato', Helvetica, sans-serif;
103
}
21555 kshitij.so 104
</style>
105
</head>
106
<body style="background-color:rgb(246, 245, 241)">
107
</body>
21564 kshitij.so 108
<div id="welcome">
109
	<h1><strong>Welcome Partner</strong>, FOFO Login</h1>
110
</div>
21555 kshitij.so 111
<div id="login-box">
21564 kshitij.so 112
	<div id="login-logo">
113
		<img src="/profitmandi-fofo/resources/images/profitmandi-login-logo.jpg" />
114
	</div>
115
	<h2>Sign In with your google account</h2>
116
	<!--
117
	<div id="google-button">
118
		<img src="/profitmandi-fofo/resources/images/google.png" style="width:300px; height:45px;"/>
119
	</div>
120
	-->
121
	<div id="gSignInWrapper">
122
    <div id="customBtn" class="customGPlusSignIn">
123
		<img src="/profitmandi-fofo/resources/images/google.png" style="width:300px; height:45px;"/>    
124
    </div>
125
  </div>
126
  <div id="name"></div>
127
  <script>startApp();</script>
21555 kshitij.so 128
</div>
21564 kshitij.so 129
<p>All rights reserved. ©2017, Profitmandi</p>
21555 kshitij.so 130
 
131
</html>