-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from CIS-SoftwareDesign-S21/Leaderboard
Leaderboard Update
- Loading branch information
Showing
6 changed files
with
2,029 additions
and
62 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,213 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" prefix="og: http://ogp.me/ns#"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Greetings | Genki Study Resources - 2nd Edition</title> | ||
<meta name="title" content="Greetings | Genki Study Resources - 2nd Edition"> | ||
<meta name="twitter:title" content="Greetings | Genki Study Resources - 2nd Edition"> | ||
<meta property="og:title" content="Greetings | Genki Study Resources - 2nd Edition"> | ||
<meta name="description" content="Short clip with examples of the greetings in Genki I."> | ||
<meta property="og:description" content="Short clip with examples of the greetings in Genki I."> | ||
<link rel="shortcut icon" type="image/x-icon" href="resources/images/genkico.ico"> | ||
|
||
<meta name="keywords" content="Genki I, page 34, page 35, japanese, quizzes, exercises, 2nd Edition" lang="en"> | ||
<meta name="language" content="en"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<meta property="og:site_name" content="sethclydesdale.github.io"> | ||
<meta property="og:url" | ||
content="https://cis-softwaredesign-s21.github.io/pro-04-study-resources/lessons/lesson-0/video-1/"> | ||
<meta property="og:type" content="website"> | ||
<meta property="og:image" | ||
content="https://cis-softwaredesign-s21.github.io/pro-04-study-resources/resources/images/genki-thumb.png"> | ||
<meta name="twitter:card" content="summary"> | ||
<meta name="twitter:creator" content="@SethC1995"> | ||
|
||
<link rel="stylesheet" href="resources/css/stylesheet.min.css"> | ||
<script src="resources/javascript/head.min.js"></script> | ||
<script src="resources/javascript/ga.js" async></script> | ||
</head> | ||
|
||
<body> | ||
|
||
<header> | ||
<h1><a href="index.html" id="home-link" class="edition-icon second-ed">Genki Study Resources</a></h1> | ||
<a id="fork-me" href="https://github.com/CIS-SoftwareDesign-S21/pro-04-study-resources">Fork Me</a> | ||
</header> | ||
|
||
<div id="content" style="margin: auto; padding-top: 5%;" id="app"> | ||
<label for="uname"><b>Username</b></label> | ||
<!--<input type="text" placeholder="Enter Username" name="uname" id="username" required>--> | ||
<input type="text" placeholder="Enter Username" name="uname" id="email" required> | ||
|
||
<br> | ||
<br> | ||
|
||
<label for="psw"><b>Password</b></label> | ||
<!--<input type="password" placeholder="Enter Password" id="pass" name="psw" required>--> | ||
<input type="password" placeholder="Enter Password" id="pass" name="psw" required> | ||
|
||
|
||
<br> | ||
<br> | ||
|
||
<!--<button id="loginButton" onclick="console.log('why hello there; general kenobi')" type="submit" | ||
style="text-align: center; margin: auto; display: flex;">Login</button> --> | ||
|
||
<button id="loginButton" type="submit" style="text-align: center; margin: auto; display: flex;">Login</button> | ||
<button id="registerButton" type="submit" style="text-align: center; margin: auto; display: flex;">Register</button> | ||
<button id="profileButton" type="submit" style="text-align: center; margin: auto; display: flex;">View Profile</button> | ||
<button id="logoutButton" type="submit" style="text-align: center; margin: auto; display: flex;">Logout</button> | ||
<br> | ||
<h3 id="welcome" style="text-align: center;"></h3> | ||
</div> | ||
|
||
<footer class="clear"> | ||
<ul class="footer-left"> | ||
<li><a href="../../../" id="footer-home">Home</a></li> | ||
<li><a href="../../../privacy/">Privacy</a></li> | ||
<li><a href="../../../report/">Report a Bug</a></li> | ||
<li><a href="../../../help/">Help</a></li> | ||
<li><a href="../../../donate/">Donate</a></li> | ||
</ul> | ||
|
||
<ul class="footer-right"> | ||
<li>Created by <a href="https://github.com/SethClydesdale">Seth Clydesdale</a> and the <a | ||
href="https://github.com/SethClydesdale/genki-study-resources/graphs/contributors">GitHub | ||
Community</a></li> | ||
</ul> | ||
</footer> | ||
<script src="resources/javascript/all.min.js"></script> | ||
<!-- The core Firebase JS SDK is always required and must be listed first --> | ||
<script src="https://www.gstatic.com/firebasejs/8.4.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/8.4.1/firebase-analytics.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/8.4.1/firebase-auth.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/8.4.1/firebase-database.js"></script> | ||
|
||
<script> | ||
|
||
var button = document.getElementById("loginButton"); | ||
var regBtn = document.getElementById("registerButton"); | ||
var logoutBtn = document.getElementById("logoutButton"); | ||
var profileBtn = document.getElementById("profileButton"); | ||
var user = document.getElementById("email"); | ||
var pw = document.getElementById("pass"); | ||
var msg = document.getElementById("welcome"); | ||
|
||
// Your web app's Firebase configuration | ||
// For Firebase JS SDK v7.20.0 and later, measurementId is optional | ||
var firebaseConfig = { | ||
apiKey: "AIzaSyBqSV4gSe2UeRXUUTF_x-5jkT2oRbYrYqc", | ||
authDomain: "genki-3a9db.firebaseapp.com", | ||
databaseURL: "https://genki-3a9db-default-rtdb.firebaseio.com", | ||
projectId: "genki-3a9db", | ||
storageBucket: "genki-3a9db.appspot.com", | ||
messagingSenderId: "664598827692", | ||
appId: "1:664598827692:web:3dac59514d2d9c6d294509", | ||
measurementId: "G-7BHYVJW7NF" | ||
}; | ||
|
||
firebase.initializeApp(firebaseConfig); | ||
firebase.analytics(); | ||
|
||
//Sign in | ||
button.onclick = function(){ | ||
var email = user.value; | ||
var password = pw.value; | ||
firebase.auth().signInWithEmailAndPassword(email, password) | ||
.then((userCredential) => { | ||
// Signed in | ||
var user = userCredential.user; | ||
//console.log(user); | ||
msg.innerHTML = 'Welome back ' + email; | ||
// ... | ||
}) | ||
.catch((error) => { | ||
var errorCode = error.code; | ||
var errorMessage = error.message; | ||
console.log(errorCode); | ||
|
||
if (email === "" || password === "") { | ||
msg.innerHTML = 'Email and Password Required'; | ||
} | ||
|
||
else if(errorCode === 'auth/invalid-email' || errorCode === 'auth/wrong-password'){ | ||
msg.innerHTML = 'Invalid email or password'; | ||
} | ||
else if(errorCode === 'auth/user-not-found'){ | ||
msg.innerHTML = 'Register your email' | ||
} | ||
else{ | ||
console.log("Try again"); | ||
} | ||
}); | ||
} | ||
|
||
//Register | ||
regBtn.onclick = function(){ | ||
var email = user.value; | ||
var password = pw.value; | ||
firebase.auth().createUserWithEmailAndPassword(email, password) | ||
.then((userCredential) => { | ||
// Signed in | ||
var user = userCredential.user; | ||
msg.innerHTML = 'Welcome ' + email; | ||
// ... | ||
}) | ||
.catch((error) => { | ||
var errorCode = error.code; | ||
var errorMessage = error.message; | ||
console.log(errorCode); | ||
console.log(errorMessage); | ||
|
||
if (email === "" || password === "") { | ||
msg.innerHTML = 'Email and Password Required'; | ||
} | ||
|
||
else if(errorCode === 'auth/email-already-in-use'){ | ||
msg.innerHTML = 'Email taken. Sign in?'; | ||
} | ||
|
||
else if (errorCode === 'auth/weak-password'){ | ||
msg.innerHTML = 'Need at least 6 characters'; | ||
} | ||
}); | ||
} | ||
|
||
//Sign out | ||
logoutBtn.onclick = function(){ | ||
firebase.auth().signOut().then(() => { | ||
//console.log("logout sucessful"); | ||
msg.innerHTML = "Signed Out"; | ||
}).catch((error) => { | ||
//console.log("Error"); | ||
msg.innerHTML = "Try Signing Out Again"; | ||
}); | ||
} | ||
|
||
//Get user profile | ||
profileBtn.onclick = function(){ | ||
var user = firebase.auth().currentUser; | ||
if (user) { | ||
// User is signed in. | ||
// https://firebase.google.com/docs/reference/js/firebase.User | ||
var email = user.email; | ||
msg.innerHTML = email + ' profile'; | ||
} else { | ||
// No user is signed in. | ||
msg.innerHTML = 'No users signed in'; | ||
} | ||
} | ||
|
||
/*button.onclick = function(){ //For testing purposes | ||
msg.innerHTML = "Welcome " + user.value; | ||
};*/ | ||
|
||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" prefix="og: http://ogp.me/ns#"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Greetings | Genki Study Resources - 2nd Edition</title> | ||
<meta name="title" content="Greetings | Genki Study Resources - 2nd Edition"> | ||
<meta name="twitter:title" content="Greetings | Genki Study Resources - 2nd Edition"> | ||
<meta property="og:title" content="Greetings | Genki Study Resources - 2nd Edition"> | ||
<meta name="description" content="Short clip with examples of the greetings in Genki I."> | ||
<meta property="og:description" content="Short clip with examples of the greetings in Genki I."> | ||
<link rel="shortcut icon" type="image/x-icon" href="../../../resources/images/genkico.ico"> | ||
|
||
<meta name="keywords" content="Genki I, page 34, page 35, japanese, quizzes, exercises, 2nd Edition" lang="en"> | ||
<meta name="language" content="en"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<meta property="og:site_name" content="sethclydesdale.github.io"> | ||
<meta property="og:url" content="https://cis-softwaredesign-s21.github.io/pro-04-study-resources/lessons/lesson-0/video-1/"> | ||
<meta property="og:type" content="website"> | ||
<meta property="og:image" content="https://cis-softwaredesign-s21.github.io/pro-04-study-resources/resources/images/genki-thumb.png"> | ||
<meta name="twitter:card" content="summary"> | ||
<meta name="twitter:creator" content="@SethC1995"> | ||
|
||
<link rel="stylesheet" href="../../../resources/css/stylesheet.min.css"> | ||
<script src="../../../resources/javascript/head.min.js"></script> | ||
<script src="../../../resources/javascript/ga.js" async></script> | ||
</head> | ||
|
||
<body> | ||
|
||
<header> | ||
<h1><a href="../../../" id="home-link" class="edition-icon second-ed">Genki Study Resources</a></h1> | ||
<a id="fork-me" href="https://github.com/CIS-SoftwareDesign-S21/pro-04-study-resources">Fork Me</a> | ||
</header> | ||
|
||
<div id="content" style="margin: auto; padding-top: 5%;"> | ||
<label for="uname"><b>Username</b></label> | ||
<input type="text" placeholder="Enter Username" name="uname" required> | ||
|
||
<br> | ||
<br> | ||
|
||
<label for="psw"><b>Password</b></label> | ||
<input type="password" style="font-size: 14px; font-family: 'メイリオ', Meiryo, Osaka, 'MS Pゴシック', 'MS PGothic', 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', Arial, sans-serif; background: #fff; border: 1px solid #ccc; padding: 6px; outline: 0;" placeholder="Enter Password" name="psw" required> | ||
|
||
<br> | ||
<br> | ||
|
||
<button id="loginButton" onclick="console.log('why hello there; general kenobi')" type="submit" style="text-align: center; margin: auto; display: flex;">Login</button> | ||
</div> | ||
|
||
<footer class="clear"> | ||
<ul class="footer-left"> | ||
<li><a href="../../../" id="footer-home">Home</a></li> | ||
<li><a href="../../../privacy/">Privacy</a></li> | ||
<li><a href="../../../report/">Report a Bug</a></li> | ||
<li><a href="../../../help/">Help</a></li> | ||
<li><a href="../../../donate/">Donate</a></li> | ||
</ul> | ||
|
||
<ul class="footer-right"> | ||
<li>Created by <a href="https://github.com/SethClydesdale">Seth Clydesdale</a> and the <a href="https://github.com/SethClydesdale/genki-study-resources/graphs/contributors">GitHub Community</a></li> | ||
</ul> | ||
</footer> | ||
<script src="../../../resources/javascript/all.min.js"></script> | ||
<script> | ||
|
||
var button = document.getElementById("loginButton"); | ||
|
||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.