Skip to content

Commit

Permalink
🎉 email id in form also working....meta tags specifying colour added
Browse files Browse the repository at this point in the history
  • Loading branch information
josephv7 committed Oct 28, 2018
1 parent 380b310 commit e276e9f
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 59 deletions.
22 changes: 11 additions & 11 deletions .firebase/hosting.ZGlzdA.cache
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
77be63d72c1e85fc267c.bundle.js,1540755148495,895d3ce0113e97b980afca2cc37a497e644e00849412b3a47b937f01d2fc288a
77be63d72c1e85fc267c.bundle.js.map,1540755148495,4bea57c6e5a5d2fa7ce164a200a6dcc746505dc1f03f2ac602d61f11bc0e74cc
login.css,1540755148494,b08b1b0d5f41384bb1a8b5318aa99e9a8394a0c49d37fb7cf115f33abe860556
login.html,1540755148494,1675701c66d5312a6bad7a0da5c0b29b21bf87f1a043bbc63d7cef0718d5e317
main.css,1540755148495,46afdea36a7b50d9215e2e71c835aed7ddad9039f5f42f722038ab92b1ac2be8
precache-manifest.e2842d33eca775a938d265d0851cf8b0.js,1540755148494,fbf7af9ec82116bcae20dca5e8948d1553ecc236bbdc1436d4601f5536dac38e
index.html,1540755148494,c15ed2e8724183f7e77bffde5653ee28cfe2048b68d7d011f205e5a8bdcdf9a7
registration.css,1540755148494,1ec68dd1a1bc4e25685a8fea335c13a50ecea903056bb152925ff48736fb44dd
registration.html,1540755148494,f97e2552ca7487beb30be3f93fb4a47054d3f4ab842fcd68883835378cc75498
sw.js,1540755148495,1978b49a25e34739cc7d7371d41190201fb3a523e3dd6575769375b0a61755b6
sketch.js,1540755160785,e47e7727c3f6482b86f7c925c36328764661f4be214e0f516a88d4690619c27e
d0e07be84843c85fdcfe.bundle.js,1540755878547,ce2d843623599cf3acd3789107b0de909db8aff67e18e2dee33afd4f614360eb
d0e07be84843c85fdcfe.bundle.js.map,1540755878547,9ae5280350d87b3d58baaf6354fae37cb4c21856e83070f3b271da803a000d41
login.css,1540755878547,b08b1b0d5f41384bb1a8b5318aa99e9a8394a0c49d37fb7cf115f33abe860556
login.html,1540755878548,04e6a282ac7a8c23af69dfd3d44671a6cfba9100e555b32f558c2b8f6e3b70a3
precache-manifest.691d7cc6762ca3f7c5ebbdcd7350d67a.js,1540755878548,09f8936c721ebb9adabfd0b37f862df4f2f336c4c5a8a03401bd1fa9b288fa85
registration.css,1540755878547,1ec68dd1a1bc4e25685a8fea335c13a50ecea903056bb152925ff48736fb44dd
main.css,1540755878547,46afdea36a7b50d9215e2e71c835aed7ddad9039f5f42f722038ab92b1ac2be8
index.html,1540755878547,dd56add8e7183791ee375499c58a4bdcd90a640711b7ce17d46541a22ceb43b1
registration.html,1540755878548,26b9fd2ef1869099a0512cbdbbdac2cde6595d773c4e2e283b58b2ab94d015ed
sketch.js,1540755921245,e47e7727c3f6482b86f7c925c36328764661f4be214e0f516a88d4690619c27e
sw.js,1540755878548,5f620d8fa47bee2f49772ec5c5c68edb9db6861a0f2cb140753a710b123a6b4b
21 changes: 13 additions & 8 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<!DOCTYPE html>

<html lang="en">
<meta content=#000000 name=theme-color>
<meta content=#000000 name=msapplication-navbutton-color>
<meta content=#000000 name=apple-mobile-web-app-status-bar-style>

<head>
<meta charset="UTF-8">
Expand All @@ -10,15 +14,15 @@
<meta name="description" content="">
<meta name="keywords" content="bharatham, bharatham2k18, RSET, TEDxRSET, NAAC, FISAT, kochi, kakkanad">
<meta name="robots" content="index, follow">
<link rel="icon" type="image/ico" href="https://www.rajagiritech.ac.in/Home/images/favicon.ico">
<link rel="icon" type="image/ico" href="https://www.rajagiritech.ac.in/Home/images/favicon.ico">

<meta name="author" content="iamjosephvarghese">


<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">


<!-- Add http://ogp.me/ tags when ready -->
<title>Landing Page</title>
<style>
Expand Down Expand Up @@ -155,12 +159,13 @@
padding: 10px 20px;
font-weight: bold;
}
.cover-heading{

.cover-heading {
font-family: 'Titillium Web', sans-serif;
font-size: 7rem;
}

.cus_font{
.cus_font {
font-family: 'Titillium Web', sans-serif;
font-size: 2.5rem;
}
Expand Down Expand Up @@ -244,9 +249,9 @@
<div class="inner cover" style="z-index: 10;">
<h1 class="cover-heading">Bharatham 2k18</h1>
<p class="lead cus_font">November 9th and 10th</p>
<p class="lead">
<!-- <a href="#" class="btn btn-lg btn-default">Learn more</a> -->
</p>
<p class="lead">
<!-- <a href="#" class="btn btn-lg btn-default">Learn more</a> -->
</p>
</div>

<div class="mastfoot">
Expand Down
45 changes: 25 additions & 20 deletions src/login.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<meta content=#000000 name=theme-color>
<meta content=#000000 name=msapplication-navbutton-color>
<meta content=#000000 name=apple-mobile-web-app-status-bar-style>

<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">
<meta charset="UTF-8">
<title>Login</title>
<meta name="description" content="">
<meta name="keywords" content="bharatham, bharatham2k18, RSET, TEDxRSET, NAAC, FISAT, kochi, kakkanad">
<meta name="robots" content="index, follow">
<link rel="icon" type="image/ico" href="https://www.rajagiritech.ac.in/Home/images/favicon.ico">

<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">
<meta charset="UTF-8">
<title>Login</title>
<meta name="description" content="">
<meta name="keywords" content="bharatham, bharatham2k18, RSET, TEDxRSET, NAAC, FISAT, kochi, kakkanad">
<meta name="robots" content="index, follow">
<link rel="icon" type="image/ico" href="https://www.rajagiritech.ac.in/Home/images/favicon.ico">

<style>
@import url('https://fonts.googleapis.com/css?family=Titillium+Web:900');
.cus_font{
.cus_font {
font-family: 'Titillium Web', sans-serif;
font-size: 2.5rem;
}
</style>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
<!-- <link href="https://fonts.googleapis.com/css?family=Armata" rel="stylesheet"> -->
Expand All @@ -30,24 +33,26 @@
<div class="wrapper">
<div class="container">
<h1 class="cus_font">LOGIN</h1>
<br><br>
<br>
<br>
<div class="error">
<p id="errorText"></p>
</div>
<form class="form">
<input type="email" id="username" placeholder="Email Id">
<input type="password" id="password" placeholder="Password">
<br><br>
<br>
<br>
<button type="submit" id="login-button" class="cus_font">Login</button>
</form>
</div>
</div>

<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.5.6/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.5.6/firebase-auth.js"></script>
<script>

var config = {
apiKey: "AIzaSyDGk80A4ORHww9y7mGFgLS2YBXIZISA-ZQ",
authDomain: "bharatham2k18-903ae.firebaseapp.com",
Expand All @@ -58,7 +63,7 @@ <h1 class="cus_font">LOGIN</h1>
};
firebase.initializeApp(config);


$("#login-button").click(function (event) {
event.preventDefault();
var email = document.getElementById('username').value;
Expand All @@ -72,10 +77,10 @@ <h1 class="cus_font">LOGIN</h1>
});
firebase.auth().onAuthStateChanged(function (user) {
if (user) {

window.location.href = "registration.html";
} else {

console.log("Signed Out!");
}
});
Expand Down
48 changes: 28 additions & 20 deletions src/registration.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<!DOCTYPE html>
<html lang="en">
<meta content=#000000 name=theme-color>
<meta content=#000000 name=msapplication-navbutton-color>
<meta content=#000000 name=apple-mobile-web-app-status-bar-style>

<head>
<meta charset="UTF-8">
Expand Down Expand Up @@ -77,7 +80,11 @@ <h1 style="font-family: 'Titillium Web', bold; margin-left:10%;">Registration</h
</select>

</li>

<!-- <li>
<label for="captain_email" style="font-family: 'Titillium Web', bold;"> Class *</label> -->
<input type="hidden" id="email" name="email" required/>
<!-- </li> -->

<div class="col-md-3 text-center">
<button type="submit" class="btn btn-lg btn-success">Submit</button>
</div>
Expand Down Expand Up @@ -131,26 +138,27 @@ <h2 style="font-family: 'Titillium Web', bold;font-weight: 300; text-align:cente
});

var house, uid, email;
firebase.auth().onAuthStateChanged(function(user) {
if (user) {
firebase.auth().onAuthStateChanged(function (user) {
if (user) {
uid = firebase.auth().currentUser.uid;
email = firebase.auth().currentUser.email;
console.log(uid);
console.log(email);
console.log('here2');
firebase.database().ref().child('reg_captains').once("value",function(snapshot){
console.log('here');
// console.log(uid);
// console.log(email);
// console.log('here2');

firebase.database().ref().child('reg_captains').once("value", function (snapshot) {
// console.log('here');
var house = snapshot.child(uid).val();
console.log(house);
// console.log(house);
document.getElementById('house').value = house;
document.getElementById('email').value = email;
})
} else {
// No user is signed in.
}
});

} else {
// No user is signed in.

}
});

// var uid = firebase.auth().currentUser.uid;
// console.log(uid);
Expand All @@ -161,21 +169,21 @@ <h2 style="font-family: 'Titillium Web', bold;font-weight: 300; text-align:cente
// }else{
// //nothing
// }

// ref.child('reg_captains').on("value", function(snapshot) {
// var house = snapshot.child(uid).val();
// console.log(house);
// });
















Expand Down

0 comments on commit e276e9f

Please sign in to comment.