forked from Landeronini/ChecaCDMX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
180 lines (165 loc) · 5.46 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<html>
<head>
<title>Checa CDMX</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="shortcut icon" type="image/x-icon" href="imagenes/ICONO.png" />
<style>
body {
background-color: #010225;
background-image: url("imagenes/edificiosSolo.gif"), url("imagenes/backFondo_0.png");
background-position: right bottom, left top;
background-repeat: repeat-x, repeat;
padding: 15px;
}
@media only screen and (min-width: 1280px) {
img {
max-width: 40%;
display: block;
margin: 0 auto;
height: auto;
}
}
@media only screen and (min-width: 415px){
button{
width: 100%;
height: 80px;
font-size: 24px;
}
img {
padding-top: 40px;
max-width: 60%;
display: block;
margin: 0 auto;
height: auto;
}
}
button {
display: block;
margin:auto;
cursor: pointer;
text-align: center;
text-decoration: none;
outline: none;
color: #fff;
background-color: #010225;
border: none;
border-radius: 8px;
box-shadow: 0 9px #999;
}
button:hover {background-color: #05205b}
button:active {
background-color: #010225;
box-shadow: 0 5px #666;
transform: translateY(4px);
}
/*_________________________________________________*/
input[type=text] {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
border: 3px solid #ccc;
-webkit-transition: 0.5s;
transition: 0.5s;
outline: none;
}
input[type=text]:focus {
border: 3px solid #05205b;
}
#buttonFACE{
background-color: white;
color: #008CBA;
border: 2px solid #008CBA;
padding: 16px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
-webkit-transition-duration: 0.4s; /* Safari */
transition-duration: 0.4s;
cursor: pointer;
}
#button2 {
background-color: #008CBA;
color: white;
border: 2px solid #008CBA;
}
</style>
</head>
<body>
<script>
// initialize and setup facebook js sdk
window.fbAsyncInit = function() {
FB.init({
appId : '1036345453139986',
xfbml : true,
version : 'v2.5'
});
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
window.open('menu.html','_self',false)
document.getElementById('login').style.visibility = 'hidden';
} else if (response.status === 'not_authorized') {
document.getElementById('status').innerHTML = 'We are not logged in.'
} else {
document.getElementById('status').innerHTML = 'You are not logged into Facebook.';
}
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
// login with facebook with extra permissions
function login() {
FB.login(function(response) {
if (response.status === 'connected') {
window.open('menu.html','_self',false)
document.getElementById('login').style.visibility = 'hidden';
} else if (response.status === 'not_authorized') {
document.getElementById('status').innerHTML = 'We are not logged in.'
} else {
document.getElementById('status').innerHTML = 'You are not logged into Facebook.';
}
}, {scope: 'email'});
}
function sinCuenta(){
window.open('menu.html','_self',false)
}
// getting basic user info
function getInfo() {
FB.api('/me', 'GET', {fields: 'first_name,last_name,name,id'}, function(response) {
document.getElementById('Name').innerHTML = "Hola" + response.name;
});
}
</script>
<header>
<!--<br><br><br><br>-->
<img src="imagenes/CHECA-LOGO.gif">
</header>
<br><br>
<table align="center" width = 500px>
<br><br>
<tr>
<th colspan="2">
<br>
<button onclick="login()" id="login">Iniciar Sesión con Facebook</button>
</th>
<th>
</th>
</tr>
<tr>
<th colspan="2">
<br>
<button onclick="sinCuenta()" id="sinCuenta">Ve directo</button>
</th>
<th>
</th>
</tr>
</table>
</body>
</html>