look at my work
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<p></p>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -33,7 +34,10 @@
|
||||
</head>
|
||||
<center>
|
||||
<body>
|
||||
<button onclick="window.location.href = '/index.html';">Back</button>
|
||||
<input type="text" id="searchBar" onkeyup="filterGames()" placeholder="Search For Games...">
|
||||
<p></p>
|
||||
<p> </p>
|
||||
<div class="one">
|
||||
<div class="two"></div>
|
||||
<div class="game">
|
||||
@@ -45,6 +49,39 @@
|
||||
<div class="game">
|
||||
<a href="./DevQuiz/index.html"><img src="./assets/dev_quiz.png" alt="dev_quiz" width="150" height="150"></a>
|
||||
</div>
|
||||
<div class="game">
|
||||
<a href="https://hangmangame02.netlify.app/"><img src="assets/hangman.png" alt="hang man" width="150" height="150"></a>
|
||||
</div>
|
||||
<div class="game">
|
||||
<a href=""><img src="" alt="" width="150" height="150"></a>
|
||||
</div>
|
||||
<div class="game">
|
||||
<a href=""><img src="" alt="" width="150" height="150"></a>
|
||||
</div>
|
||||
<div class="game">
|
||||
<a href=""><img src="" alt="" width="150" height="150"></a>
|
||||
</div>
|
||||
<div class="game">
|
||||
<a href=""><img src="" alt="" width="150" height="150"></a>
|
||||
</div>
|
||||
<div class="game">
|
||||
<a href=""><img src="" alt="" width="150" height="150"></a>
|
||||
</div>
|
||||
<div class="game">
|
||||
<a href=""><img src="" alt="" width="150" height="150"></a>
|
||||
</div>
|
||||
<div class="game">
|
||||
<a href=""><img src="" alt="" width="150" height="150"></a>
|
||||
</div>
|
||||
<div class="game">
|
||||
<a href=""><img src="" alt="" width="150" height="150"></a>
|
||||
</div>
|
||||
<div class="game">
|
||||
<a href=""><img src="" alt="" width="150" height="150"></a>
|
||||
</div>
|
||||
<div class="game">
|
||||
<a href=""><img src="" alt="" width="150" height="150"></a>
|
||||
</div>
|
||||
<div class="game">
|
||||
<a href=""><img src="" alt="" width="150" height="150"></a>
|
||||
</div>
|
||||
|
||||
@@ -29,4 +29,26 @@ div.one {
|
||||
|
||||
a:hover {
|
||||
border-bottom: 8px solid aquamarine;
|
||||
}
|
||||
|
||||
button {
|
||||
font-family: sans-serif;
|
||||
background-color: #173075; /* Green */
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 15px 16px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
margin: 4px 2px;
|
||||
cursor: pointer;
|
||||
border-radius: 12px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: #1f41a1;
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
document.getElementById('loginForm').addEventListener('submit', function(event) {
|
||||
event.preventDefault();
|
||||
const username = document.getElementById('loginUsername').value;
|
||||
const password = document.getElementById('loginPassword').value;
|
||||
|
||||
fetch('/login', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({ username, password })
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
alert('Login successful');
|
||||
} else {
|
||||
alert('Login failed: ' + data.message);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
document.getElementById('signUpForm').addEventListener('submit', function(event) {
|
||||
event.preventDefault();
|
||||
const username = document.getElementById('signUpUsername').value;
|
||||
const password = document.getElementById('signUpPassword').value;
|
||||
|
||||
fetch('/signup', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({ username, password })
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
alert('Sign up successful');
|
||||
} else {
|
||||
alert('Sign up failed: ' + data.message);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1,32 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Login and Sign Up</title>
|
||||
<link rel="stylesheet" href="./styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Login</h1>
|
||||
<form id="loginForm">
|
||||
<label for="loginUsername">Username:</label>
|
||||
<input type="text" id="loginUsername" required>
|
||||
<label for="loginPassword">Password:</label>
|
||||
<input type="password" id="loginPassword" required>
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
|
||||
<h1>Sign Up</h1>
|
||||
<form id="signUpForm">
|
||||
<label for="signUpUsername">Username:</label>
|
||||
<input type="text" id="signUpUsername" required>
|
||||
<label for="signUpPassword">Password:</label>
|
||||
<input type="password" id="signUpPassword" required>
|
||||
<button type="submit">Sign Up</button>
|
||||
</form>
|
||||
</div>
|
||||
<script src="./app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
<a href="./users.txt">test</a>
|
||||
@@ -1,51 +0,0 @@
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: #f0f0f0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.container {
|
||||
background-color: white;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
input {
|
||||
padding: 8px;
|
||||
margin-top: 5px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
button {
|
||||
margin-top: 15px;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
background-color: #007BFF;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
Reference in New Issue
Block a user