-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
82 lines (78 loc) · 3.3 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
<!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">
<link rel = "stylesheet" type = "text/css" href = "style.css">
<title>CtrlAltShift</title>
</head>
<body>
<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/7.6.1/firebase-app.js"></script>
<!-- TODO: Add SDKs for Firebase products that you want to use
https://firebase.google.com/docs/web/setup#available-libraries -->
<script src="https://www.gstatic.com/firebasejs/7.6.1/firebase-analytics.js"></script>
<script>
// Your web app's Firebase configuration
var firebaseConfig = {
apiKey: "AIzaSyBVhjbMMPRS5jOgNweycGvn3p1QHotlD9o",
authDomain: "ctrlaltshift-cc2e6.firebaseapp.com",
databaseURL: "https://ctrlaltshift-cc2e6.firebaseio.com",
projectId: "ctrlaltshift-cc2e6",
storageBucket: "ctrlaltshift-cc2e6.appspot.com",
messagingSenderId: "1093973138518",
appId: "1:1093973138518:web:03a498f61d58b7860c2ff7",
measurementId: "G-1R2RGTWMQM"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
firebase.analytics();
</script>
<div class="main">
<div class="nav">
<img src="img/cas2.png" style="height: 10vh; width: 10vh; margin: 10px; vertical-align: middle; float:left">
<div class="ctrlaltshift">
<h1>Ctrl Alt Shift</h1>
</div>
<div class="signup">
<input class="signup" type="button" value="Regístrate" onclick="window.location.replace('register.html')">
</div>
</div>
<div class="about">
<h3 style="text-align: center;">What is Ctrl Alt Shift?</h3>
<p>This is a platform built to enlist for programming lessons at Ctrl Alt Tec!</p>
<p>This tool will allow us to know what programming languages you desire to master while helping us create efficient schedules.</p>
<p>Feel free to give us feedback and to suggest meetings!</p>
</div>
<div class="log">
<img src="img/avatar.png" class="avatar">
<div class="user">
<input type="text" id="user" placeholder="Email" size="15">
</div>
<div class="password">
<input type="password" id="password" placeholder="Contraseña" size="15">
</div>
<div class="login">
<input class="logit" type="submit" value="Ingresar" onclick="login()">
</div>
</div>
</div>
</div>
<script type="text/javascript">
// Función que permite iniciar sesión con una cuenta previamente registrada.
function login (){
var userName = document.querySelector("#user").value;
var pssw = document.querySelector("#password").value;
firebase.auth().signInWithEmailAndPassword(userName, pssw).catch(function(error){
alert(error);
});
firebase.auth().onAuthStateChanged(function(user){
if(user!=null){
window.location = "home.html";
}
})
}
</script>
</body>
</html>