This commit is contained in:
Max Hunt 2020-04-22 11:20:22 +01:00
parent 4ca5b26fde
commit 698bd211aa
4 changed files with 30 additions and 0 deletions

View File

@ -126,6 +126,24 @@ footer a {
cursor: pointer; cursor: pointer;
} }
.btn-fb-login {
transition: 0.3s;
cursor: pointer;
background-color: white;
border-radius: 20px;
}
.btn-fb-login:hover {
box-shadow: 0px 2px 3px #A5A5A5;
transition: 0.3s;
cursor: pointer;
}
.btn-fb-login:active {
box-shadow: 0px 2px 3px red;
transition: 0.1s;
}
.btn-login:active { .btn-login:active {
color: white; color: white;
transition: 0.1s; transition: 0.1s;

View File

@ -49,6 +49,7 @@
<input id="fpwd" type="password" placeholder="Password"> <input id="fpwd" type="password" placeholder="Password">
<button id="blogin" onclick={signinwithemail()} class="btn-login">&#x27a4;</button> <button id="blogin" onclick={signinwithemail()} class="btn-login">&#x27a4;</button>
<button id="blogin_g" onclick={signinwithgoogle()} class="btn-g-login"><img src="media/g_logon.png" class="img-g-login" alt="img"></button> <button id="blogin_g" onclick={signinwithgoogle()} class="btn-g-login"><img src="media/g_logon.png" class="img-g-login" alt="img"></button>
<button id="blogin_g" onclick={signinwithfb()} class="btn-fb-login"><img src="media/fb_logon.png" class="img-g-login" alt="img"></button>
</div> </div>
</div> </div>
<div class="user-info"> <div class="user-info">

View File

@ -28,6 +28,17 @@ function signinwithgoogle(){
}) })
} }
function signinwithfb(){
var fbAuthProvider = new firebase.auth.FacebookAuthProvider()
firebase.auth().signInWithPopup(fbAuthProvider)
.then(function(data){
console.log('User signed in...')
})
.catch(function(error){
console.log(error)
})
}
function signinwithemail(){ function signinwithemail(){
const txtEmail = document.getElementById('fuid') const txtEmail = document.getElementById('fuid')
const txtPassword = document.getElementById('fpwd') const txtPassword = document.getElementById('fpwd')

BIN
views/media/fb_logon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB