jtvidela commited on
Commit
7788cdd
·
verified ·
1 Parent(s): 04cac21

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +30 -4
index.html CHANGED
@@ -27,10 +27,36 @@
27
  </head>
28
  <body>
29
  <h1>Welcome to My Spaces!</h1>
30
- <p>Select a Space to explore:</p>
31
- <a href="https://huggingface.co/spaces/jtvidela/signpost_assistant" target="_blank">Space 1</a>
32
- <a href="https://huggingface.co/spaces/jtvidela/StoryCompass" target="_blank">Space 2</a>
33
- <a href="https://huggingface.co/spaces/username/space3" target="_blank">Space 3</a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  </body>
35
  </html>
36
 
 
27
  </head>
28
  <body>
29
  <h1>Welcome to My Spaces!</h1>
30
+ <!-- Login Form -->
31
+ <form action="/login" method="POST">
32
+ <label for="username">Username:</label><br>
33
+ <input type="text" id="username" name="username" required><br>
34
+ <label for="password">Password:</label><br>
35
+ <input type="password" id="password" name="password" required><br>
36
+ <button type="submit">Login</button>
37
+ </form>
38
+
39
+ <!-- Message Display -->
40
+ <p id="message"></p>
41
+
42
+ <!-- Links Section -->
43
+ <div id="links">
44
+ <p>Select a Space to explore:</p>
45
+ <a href="https://huggingface.co/spaces/jtvidela/signpost_assistant" target="_blank">Space 1</a>
46
+ <a href="https://huggingface.co/spaces/jtvidela/StoryCompass" target="_blank">Space 2</a>
47
+ <a href="https://huggingface.co/spaces/username/space3" target="_blank">Space 3</a>
48
+ </div>
49
+
50
+ <script>
51
+ // Check if user is logged in
52
+ const loggedIn = document.cookie.includes('logged_in=true');
53
+ if (loggedIn) {
54
+ document.getElementById('links').style.display = 'block';
55
+ document.getElementById('message').innerText = 'Welcome back!';
56
+ } else {
57
+ document.getElementById('message').innerText = 'Please log in to access the chatbots.';
58
+ }
59
+ </script>
60
  </body>
61
  </html>
62