sabrina91 commited on
Commit
b61aa4b
·
verified ·
1 Parent(s): d0ea22d

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +357 -19
index.html CHANGED
@@ -1,19 +1,357 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="zh-Hant">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Hugging Face System - 登入</title>
7
+ <style>
8
+ @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
9
+
10
+ :root {
11
+ --primary-color: #4CAF50;
12
+ --secondary-color: #333;
13
+ --background-color: #f0f2f5;
14
+ --text-color: #333;
15
+ --light-text-color: #666;
16
+ --border-color: #ddd;
17
+ --error-color: #f44336;
18
+ }
19
+
20
+ body {
21
+ font-family: 'Roboto', Arial, sans-serif;
22
+ margin: 0;
23
+ padding: 0;
24
+ background-color: var(--background-color);
25
+ color: var(--text-color);
26
+ transition: opacity 0.5s ease-in-out;
27
+ }
28
+
29
+ .page-container {
30
+ display: flex;
31
+ justify-content: center;
32
+ align-items: center;
33
+ height: 100vh;
34
+ text-align: center;
35
+ flex-direction: column;
36
+ opacity: 1;
37
+ transition: opacity 0.5s ease-in-out;
38
+ }
39
+
40
+ .login-box {
41
+ background-color: #fff;
42
+ padding: 40px;
43
+ border-radius: 12px;
44
+ box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
45
+ width: 350px;
46
+ animation: slideUp 0.6s ease-out;
47
+ }
48
+
49
+ .login-box h2 {
50
+ margin-bottom: 25px;
51
+ color: var(--secondary-color);
52
+ font-size: 2.2em;
53
+ }
54
+
55
+ .login-box .input-group {
56
+ margin-bottom: 15px;
57
+ text-align: left;
58
+ }
59
+
60
+ .login-box label {
61
+ display: block;
62
+ margin-bottom: 5px;
63
+ font-weight: bold;
64
+ color: var(--light-text-color);
65
+ }
66
+
67
+ .login-box input {
68
+ width: 100%;
69
+ padding: 12px;
70
+ border: 1px solid var(--border-color);
71
+ border-radius: 6px;
72
+ box-sizing: border-box;
73
+ transition: border-color 0.3s;
74
+ }
75
+
76
+ .login-box input:focus {
77
+ outline: none;
78
+ border-color: var(--primary-color);
79
+ }
80
+
81
+ .login-box .captcha-group {
82
+ display: flex;
83
+ align-items: center;
84
+ margin-bottom: 20px;
85
+ }
86
+
87
+ .login-box .captcha-group input {
88
+ flex-grow: 1;
89
+ margin-right: 15px;
90
+ }
91
+
92
+ .login-box .captcha-group .captcha-image {
93
+ width: 120px;
94
+ height: 45px;
95
+ background-color: #f8f9fa;
96
+ border: 1px dashed var(--border-color);
97
+ border-radius: 6px;
98
+ font-family: 'Roboto', sans-serif;
99
+ font-size: 22px;
100
+ font-weight: bold;
101
+ display: flex;
102
+ justify-content: center;
103
+ align-items: center;
104
+ color: #444;
105
+ user-select: none;
106
+ cursor: pointer;
107
+ letter-spacing: 2px;
108
+ }
109
+
110
+ .login-box button {
111
+ width: 100%;
112
+ padding: 12px;
113
+ background-color: var(--primary-color);
114
+ color: #fff;
115
+ border: none;
116
+ border-radius: 6px;
117
+ cursor: pointer;
118
+ font-size: 1.1em;
119
+ font-weight: bold;
120
+ transition: background-color 0.3s, transform 0.2s;
121
+ }
122
+
123
+ .login-box button:hover {
124
+ background-color: #45a049;
125
+ transform: translateY(-2px);
126
+ }
127
+
128
+ .login-box .error-message {
129
+ color: var(--error-color);
130
+ margin-top: 15px;
131
+ font-size: 0.9em;
132
+ display: none;
133
+ animation: fadeIn 0.5s;
134
+ }
135
+
136
+ .system-container {
137
+ display: none;
138
+ flex-direction: column;
139
+ height: 100vh;
140
+ }
141
+
142
+ .header {
143
+ display: flex;
144
+ justify-content: space-between;
145
+ align-items: center;
146
+ padding: 20px 40px;
147
+ background-color: var(--secondary-color);
148
+ color: #fff;
149
+ flex-shrink: 0;
150
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
151
+ }
152
+
153
+ .header .title {
154
+ text-align: center; /* 讓標題置中 */
155
+ flex-grow: 1;
156
+ }
157
+
158
+ .header h1 {
159
+ margin: 0;
160
+ font-size: 1.8em;
161
+ font-weight: 700;
162
+ }
163
+
164
+ .header p {
165
+ margin: 5px 0 0;
166
+ font-size: 0.8em;
167
+ color: #ccc;
168
+ }
169
+
170
+ .header .logout-btn {
171
+ background-color: var(--error-color);
172
+ color: white;
173
+ border: none;
174
+ padding: 10px 20px;
175
+ border-radius: 6px;
176
+ cursor: pointer;
177
+ text-decoration: none;
178
+ font-size: 1em;
179
+ font-weight: bold;
180
+ flex-shrink: 0;
181
+ transition: background-color 0.3s;
182
+ }
183
+
184
+ .header .logout-btn:hover {
185
+ background-color: #d32f2f;
186
+ }
187
+
188
+ .content-wrapper {
189
+ display: flex;
190
+ flex-grow: 1;
191
+ background-color: var(--background-color);
192
+ padding: 20px;
193
+ }
194
+
195
+ .sidebar {
196
+ width: 250px;
197
+ background-color: #fff;
198
+ padding: 20px;
199
+ border-radius: 8px;
200
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
201
+ margin-right: 20px;
202
+ flex-shrink: 0;
203
+ }
204
+
205
+ .sidebar h3 {
206
+ margin-top: 0;
207
+ color: var(--secondary-color);
208
+ border-bottom: 2px solid var(--border-color);
209
+ padding-bottom: 10px;
210
+ margin-bottom: 20px;
211
+ }
212
+
213
+ .sidebar ul {
214
+ list-style-type: none;
215
+ padding: 0;
216
+ }
217
+
218
+ .sidebar li {
219
+ margin-bottom: 10px;
220
+ }
221
+
222
+ .sidebar a {
223
+ display: block;
224
+ padding: 12px 15px;
225
+ text-decoration: none;
226
+ color: var(--text-color);
227
+ border-radius: 6px;
228
+ background-color: #f8f9fa;
229
+ transition: background-color 0.3s, transform 0.2s;
230
+ }
231
+
232
+ .sidebar a:hover {
233
+ background-color: #e2e6ea;
234
+ transform: translateX(5px);
235
+ }
236
+
237
+ .main-content {
238
+ flex-grow: 1;
239
+ padding: 0;
240
+ background-color: #fff;
241
+ border-radius: 8px;
242
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
243
+ overflow: hidden;
244
+ }
245
+
246
+ .main-content iframe {
247
+ width: 100%;
248
+ height: 100%;
249
+ border: none;
250
+ border-radius: 8px;
251
+ }
252
+
253
+ @keyframes fadeIn {
254
+ from { opacity: 0; }
255
+ to { opacity: 1; }
256
+ }
257
+
258
+ @keyframes slideUp {
259
+ from { transform: translateY(20px); opacity: 0; }
260
+ to { transform: translateY(0); opacity: 1; }
261
+ }
262
+ </style>
263
+ </head>
264
+ <body>
265
+
266
+ <div class="page-container" id="loginPage">
267
+ <div class="login-box">
268
+ <h2>Hugging Face System</h2>
269
+ <div class="input-group">
270
+ <label for="username">帳號</label>
271
+ <input type="text" id="username" placeholder="請輸入帳號">
272
+ </div>
273
+ <div class="input-group">
274
+ <label for="password">密碼</label>
275
+ <input type="password" id="password" placeholder="請輸入密碼">
276
+ </div>
277
+ <div class="captcha-group">
278
+ <input type="text" id="captchaInput" placeholder="驗證碼">
279
+ <div id="captchaImage" class="captcha-image" onclick="generateCaptcha()"></div>
280
+ </div>
281
+ <button onclick="checkCredentials()">登入</button>
282
+ <p class="error-message" id="errorMessage">帳號、密碼或驗證碼錯誤。</p>
283
+ </div>
284
+ </div>
285
+
286
+ <div class="system-container" id="systemPage">
287
+ <div class="header">
288
+ <div class="title">
289
+ <h1>Hugging Face System</h1>
290
+ <p>cjhuang@2025copyright</p>
291
+ </div>
292
+ <a href="#" class="logout-btn" onclick="logout()">登出</a>
293
+ </div>
294
+ <div class="content-wrapper">
295
+ <div class="sidebar">
296
+ <h3>系統功能</h3>
297
+ <ul>
298
+ <li><a href="#">日本進出口商</a></li>
299
+ </ul>
300
+ </div>
301
+ <div class="main-content">
302
+ <iframe
303
+ src="https://sabrina91-broker-jp.hf.space"
304
+ frameborder="0"
305
+ ></iframe>
306
+ </div>
307
+ </div>
308
+ </div>
309
+
310
+ <script>
311
+ let captchaText = '';
312
+
313
+ function generateCaptcha() {
314
+ const chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
315
+ captchaText = '';
316
+ for (let i = 0; i < 4; i++) {
317
+ captchaText += chars[Math.floor(Math.random() * chars.length)];
318
+ }
319
+ document.getElementById('captchaImage').innerText = captchaText;
320
+ }
321
+
322
+ function checkCredentials() {
323
+ const usernameInput = document.getElementById('username').value;
324
+ const passwordInput = document.getElementById('password').value;
325
+ const captchaInput = document.getElementById('captchaInput').value.toUpperCase();
326
+ const errorMessage = document.getElementById('errorMessage');
327
+
328
+ const correctUsername = 'ROOT2025';
329
+ const correctPassword = '123456';
330
+
331
+ if (usernameInput === correctUsername && passwordInput === correctPassword && captchaInput === captchaText) {
332
+ document.getElementById('loginPage').style.display = 'none';
333
+ document.getElementById('systemPage').style.display = 'flex';
334
+ } else {
335
+ errorMessage.style.display = 'block';
336
+ generateCaptcha();
337
+ document.getElementById('captchaInput').value = '';
338
+ }
339
+ }
340
+
341
+ function logout() {
342
+ document.getElementById('systemPage').style.display = 'none';
343
+ document.getElementById('loginPage').style.display = 'flex';
344
+
345
+ document.getElementById('username').value = '';
346
+ document.getElementById('password').value = '';
347
+ document.getElementById('captchaInput').value = '';
348
+
349
+ generateCaptcha();
350
+ document.getElementById('errorMessage').style.display = 'none';
351
+ }
352
+
353
+ document.addEventListener('DOMContentLoaded', generateCaptcha);
354
+ </script>
355
+
356
+ </body>
357
+ </html>