forked from NdunguMaina/Magic-Book
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
197 additions
and
1 deletion.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"liveServer.settings.port": 5500 | ||
"liveServer.settings.port": 5501 | ||
} |
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 |
---|---|---|
|
@@ -243,3 +243,4 @@ const signLanguageImages = { | |
'aw': 'images/AW.png', | ||
'ow': 'images/OW.png' | ||
}; | ||
|
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,98 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Sign In</title> | ||
<style> | ||
body { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
margin: 0; | ||
font-family: Arial, sans-serif; | ||
background-color: #f0f2f5; | ||
} | ||
.container { | ||
background-color: #fff; | ||
padding: 20px; | ||
border-radius: 8px; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
width: 300px; | ||
text-align: center; | ||
} | ||
.container h2 { | ||
margin-bottom: 20px; | ||
} | ||
.container input[type="text"], | ||
.container input[type="password"] { | ||
width: 100%; | ||
padding: 10px; | ||
margin: 10px 0; | ||
border: 1px solid #ccc; | ||
border-radius: 4px; | ||
} | ||
.container button { | ||
width: 100%; | ||
padding: 10px; | ||
background-color: #007bff; | ||
border: none; | ||
border-radius: 4px; | ||
color: white; | ||
font-size: 16px; | ||
cursor: pointer; | ||
} | ||
.container button:hover { | ||
background-color: #0056b3; | ||
} | ||
.container a { | ||
display: block; | ||
margin-top: 10px; | ||
color: #007bff; | ||
text-decoration: none; | ||
} | ||
.container a:hover { | ||
text-decoration: underline; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h2>Sign In</h2> | ||
<form onsubmit="signIn(event)"> | ||
<input type="text" id="username" placeholder="Username" required> | ||
<input type="password" id="password" placeholder="Password" required> | ||
<button type="submit">Sign In</button> | ||
</form> | ||
<a href="sign_up.html">Don't have an account? Sign Up</a> | ||
</div> | ||
<script> | ||
// Initialize default user credentials if not already set | ||
if (!localStorage.getItem('user')) { | ||
const defaultUser = { | ||
username: 'guest', | ||
password: 'password123' | ||
}; | ||
localStorage.setItem('user', JSON.stringify(defaultUser)); | ||
} | ||
|
||
function signIn(event) { | ||
event.preventDefault(); | ||
const username = document.getElementById('username').value; | ||
const password = document.getElementById('password').value; | ||
|
||
// Retrieve user data (for simplicity, using localStorage) | ||
const user = JSON.parse(localStorage.getItem('user')); | ||
|
||
if (user && user.username === username && user.password === password) { | ||
localStorage.setItem('signedIn', 'true'); | ||
window.location.href = 'index.html'; | ||
} else { | ||
alert('Invalid username or password'); | ||
} | ||
} | ||
</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,93 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Sign Up</title> | ||
<style> | ||
body { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
margin: 0; | ||
font-family: Arial, sans-serif; | ||
background-color: #f0f2f5; | ||
} | ||
.container { | ||
background-color: #fff; | ||
padding: 20px; | ||
border-radius: 8px; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
width: 300px; | ||
text-align: center; | ||
} | ||
.container h2 { | ||
margin-bottom: 20px; | ||
} | ||
.container input[type="text"], | ||
.container input[type="email"], | ||
.container input[type="password"] { | ||
width: 100%; | ||
padding: 10px; | ||
margin: 10px 0; | ||
border: 1px solid #ccc; | ||
border-radius: 4px; | ||
} | ||
.container button { | ||
width: 100%; | ||
padding: 10px; | ||
background-color: #007bff; | ||
border: none; | ||
border-radius: 4px; | ||
color: white; | ||
font-size: 16px; | ||
cursor: pointer; | ||
} | ||
.container button:hover { | ||
background-color: #0056b3; | ||
} | ||
.container a { | ||
display: block; | ||
margin-top: 10px; | ||
color: #007bff; | ||
text-decoration: none; | ||
} | ||
.container a:hover { | ||
text-decoration: underline; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h2>Sign Up</h2> | ||
<form onsubmit="signUp(event)"> | ||
<input type="email" id="email" placeholder="Email" required> | ||
<input type="text" id="username" placeholder="Username" required> | ||
<input type="password" id="password" placeholder="Password" required> | ||
<input type="password" id="confirmPassword" placeholder="Confirm Password" required> | ||
<button type="submit">Sign Up</button> | ||
</form> | ||
<a href="sign_in.html">Already have an account? Sign In</a> | ||
</div> | ||
<script> | ||
function signUp(event) { | ||
event.preventDefault(); | ||
const email = document.getElementById('email').value; | ||
const username = document.getElementById('username').value; | ||
const password = document.getElementById('password').value; | ||
const confirmPassword = document.getElementById('confirmPassword').value; | ||
|
||
if (password !== confirmPassword) { | ||
alert('Passwords do not match'); | ||
return; | ||
} | ||
|
||
// Save user data (for simplicity, using localStorage) | ||
localStorage.setItem('user', JSON.stringify({ email, username, password })); | ||
localStorage.setItem('signedIn', 'true'); | ||
window.location.href = 'index.html'; | ||
} | ||
</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 |
---|---|---|
|
@@ -311,3 +311,4 @@ button:hover { | |
|
||
|
||
|
||
|