jtvidela commited on
Commit
277b209
·
verified ·
1 Parent(s): 3266e63

Upload 2 files

Browse files
Files changed (2) hide show
  1. static/style.css +28 -0
  2. templates/index.html +92 -0
static/style.css ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body {
2
+ padding: 2rem;
3
+ font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
4
+ }
5
+
6
+ h1 {
7
+ font-size: 16px;
8
+ margin-top: 0;
9
+ }
10
+
11
+ p {
12
+ color: rgb(107, 114, 128);
13
+ font-size: 15px;
14
+ margin-bottom: 10px;
15
+ margin-top: 5px;
16
+ }
17
+
18
+ .card {
19
+ max-width: 620px;
20
+ margin: 0 auto;
21
+ padding: 16px;
22
+ border: 1px solid lightgray;
23
+ border-radius: 16px;
24
+ }
25
+
26
+ .card p:last-child {
27
+ margin-bottom: 0;
28
+ }
templates/index.html ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>My Landing Page</title>
5
+ <style>
6
+ body {
7
+ font-family: Arial, sans-serif;
8
+ text-align: center;
9
+ padding: 50px;
10
+ }
11
+ form {
12
+ margin: 20px auto;
13
+ padding: 10px;
14
+ display: inline-block;
15
+ text-align: left;
16
+ border: 1px solid #ccc;
17
+ border-radius: 5px;
18
+ width: 300px;
19
+ background-color: #f9f9f9;
20
+ }
21
+ input, button {
22
+ display: block;
23
+ width: 90%;
24
+ margin: 10px auto;
25
+ padding: 10px;
26
+ font-size: 14px;
27
+ }
28
+ .form-header {
29
+ text-align: center;
30
+ font-weight: bold;
31
+ margin-bottom: 10px;
32
+ }
33
+ #links {
34
+ display: none; /* Initially hidden, shown after successful login */
35
+ }
36
+ a {
37
+ display: block;
38
+ margin: 10px;
39
+ padding: 10px;
40
+ background-color: #0078D4;
41
+ color: white;
42
+ text-decoration: none;
43
+ border-radius: 5px;
44
+ width: 200px;
45
+ margin-left: auto;
46
+ margin-right: auto;
47
+ }
48
+ a:hover {
49
+ background-color: #005BB5;
50
+ }
51
+ </style>
52
+ </head>
53
+ <body>
54
+ <h1>Welcome to My Spaces!</h1>
55
+
56
+ <!-- Login Form -->
57
+ <form action="/login" method="POST">
58
+ <div class="form-header">Login</div>
59
+ <label for="login-username">Username:</label>
60
+ <input type="text" id="login-username" name="username" required>
61
+ <label for="login-password">Password:</label>
62
+ <input type="password" id="login-password" name="password" required>
63
+ <button type="submit">Login</button>
64
+ </form>
65
+
66
+ <!-- Registration Form -->
67
+ <form action="/register" method="POST">
68
+ <div class="form-header">Register</div>
69
+ <label for="register-username">Username:</label>
70
+ <input type="text" id="register-username" name="username" required>
71
+ <label for="register-password">Password:</label>
72
+ <input type="password" id="register-password" name="password" required>
73
+ <button type="submit">Register</button>
74
+ </form>
75
+
76
+ <!-- Links Section -->
77
+ <div id="links">
78
+ <p>Select a Space to explore:</p>
79
+ <a href="https://huggingface.co/spaces/jtvidela/signpost_assistant" target="_blank">Space 1</a>
80
+ <a href="https://huggingface.co/spaces/jtvidela/StoryCompass" target="_blank">Space 2</a>
81
+ <a href="https://huggingface.co/spaces/username/space3" target="_blank">Space 3</a>
82
+ </div>
83
+
84
+ <script>
85
+ // Check if user is logged in
86
+ const loggedIn = document.cookie.includes('logged_in=true');
87
+ if (loggedIn) {
88
+ document.getElementById('links').style.display = 'block';
89
+ }
90
+ </script>
91
+ </body>
92
+ </html>