-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
67 lines (62 loc) · 2.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home - Prodigy or Prodidows insider program</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Welcome to Old Prodigy/Prodidows insider!</h1>
<nav id="navbar">
<a href="index.html">Home</a>
<a href="play.html?mods=WalkSpeed">Play Now</a>
<a href="pde1500/index.html">Pde1500</a>
<a href="pde/index.html">Pde</a>
<a href="oldprodigyde/?mods=FastGameSpeed">Play Another Version</a>
<a href="login.html" id="loginLink">Login</a>
<a href="signup.html" id="signupLink">Sign Up</a>
<span id="profileInfo" style="display:none;">
<a href="profile.html" id="profileLink"></a>
<a href="#" id="logoutLink">Logout</a>
</span>
</nav>
</header>
<main id="content">
<section>
<h2>About This Site</h2>
<p>This is a simple website where you can test new Old Prodigy or Prodidows versions before live release.</p>
</section>
<section>
<h2>Why Join?</h2>
<ul>
<li>Save your character automatically (coming soon)</li>
</ul>
</section>
<section>
<h2>Get Started</h2>
<p>If you don't have an account, <a href="signup.html">sign up here</a>. If you're already a member, <a href="login.html">log in</a> to access your account.</p>
</section>
</main>
<footer>
<p></p>
</footer>
<script>
// Check if the user is logged in
const currentUser = localStorage.getItem('loggedInUser');
if (currentUser) {
// Show profile info in the navbar
document.getElementById('loginLink').style.display = 'none';
document.getElementById('signupLink').style.display = 'none';
document.getElementById('profileInfo').style.display = 'inline';
document.getElementById('profileLink').textContent = currentUser;
}
// Logout functionality
document.getElementById('logoutLink').addEventListener('click', function() {
localStorage.removeItem('loggedInUser');
window.location.href = 'index.html';
});
</script>
</body>
</html>