StoryCompassHTML / index.html
jtvidela's picture
Update index.html
ba58c11 verified
raw
history blame
2.22 kB
<!DOCTYPE html>
<html>
<head>
<title>My Landing Page</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
padding: 50px;
}
a {
display: block;
margin: 10px;
padding: 10px;
background-color: #0078D4;
color: white;
text-decoration: none;
border-radius: 5px;
width: 200px;
margin-left: auto;
margin-right: auto;
}
a:hover {
background-color: #005BB5;
}
form {
margin-bottom: 20px;
}
input, button {
margin: 5px;
padding: 10px;
font-size: 16px;
}
#links {
display: none; /* Initially hidden, shown after successful login */
}
</style>
</head>
<body>
<h1>Welcome to My Spaces!</h1>
<!-- Login Form -->
<form action="/login" method="POST">
<label for="username">Username:</label><br>
<input type="text" id="username" name="username" required><br>
<label for="password">Password:</label><br>
<input type="password" id="password" name="password" required><br>
<button type="submit">Login</button>
</form>
<!-- Message Display -->
<p id="message"></p>
<!-- Links Section -->
<div id="links">
<p>Select a Space to explore:</p>
<a href="https://huggingface.co/spaces/jtvidela/signpost_assistant" target="_blank">Space 1</a>
<a href="https://huggingface.co/spaces/jtvidela/StoryCompass" target="_blank">Space 2</a>
<a href="https://huggingface.co/spaces/username/space3" target="_blank">Space 3</a>
</div>
<script>
// Check if user is logged in
const loggedIn = document.cookie.includes('logged_in=true');
if (loggedIn) {
document.getElementById('links').style.display = 'block';
document.getElementById('message').innerText = 'Welcome back!';
} else {
document.getElementById('message').innerText = 'Please log in to access the chatbots.';
}
</script>
</body>
</html>