suanan commited on
Commit
8e271fd
·
verified ·
1 Parent(s): 23a5023

Upload 2 files

Browse files
Files changed (2) hide show
  1. index.html +234 -19
  2. thanks-you.html +113 -0
index.html CHANGED
@@ -1,19 +1,234 @@
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-TW">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>測驗平台 - 選擇測驗</title>
7
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet">
10
+ <script src="https://unpkg.com/[email protected]/dist/aos.js"></script>
11
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
12
+ <script src="https://unpkg.com/feather-icons"></script>
13
+ <script src="https://accounts.google.com/gsi/client" async defer></script>
14
+ <style>
15
+ .quiz-card {
16
+ transition: all 0.3s ease;
17
+ }
18
+ .quiz-card:hover {
19
+ transform: translateY(-5px);
20
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
21
+ }
22
+ .quiz-card.ring-2:hover {
23
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), 0 0 0 4px rgba(59, 130, 246, 0.1);
24
+ }
25
+ .google-btn {
26
+ transition: all 0.3s ease;
27
+ }
28
+ .google-btn:hover {
29
+ box-shadow: 0 4px 6px -1px rgba(66, 133, 244, 0.3), 0 2px 4px -1px rgba(66, 133, 244, 0.2);
30
+ }
31
+ </style>
32
+ </head>
33
+ <body class="bg-gray-50 min-h-screen">
34
+ <!-- Header -->
35
+ <header class="bg-white shadow-sm">
36
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4">
37
+ <div class="flex justify-between items-center">
38
+ <h1 class="text-2xl font-bold text-gray-800">測驗平台</h1>
39
+ <div id="google-signin-btn" class="google-btn bg-white border border-gray-300 rounded-lg px-4 py-2 flex items-center space-x-2 cursor-pointer">
40
+ <i data-feather="log-in" class="w-5 h-5"></i>
41
+ <span>Google 登入</span>
42
+ </div>
43
+ </div>
44
+ </div>
45
+ </header>
46
+
47
+ <!-- Main Content -->
48
+ <main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
49
+ <!-- Welcome Section -->
50
+ <section class="text-center mb-12" data-aos="fade-up">
51
+ <h2 class="text-3xl font-bold text-gray-800 mb-4">歡迎來到測驗平台</h2>
52
+ <p class="text-gray-600 text-lg max-w-2xl mx-auto">
53
+ 這裡提供單選題和多選題的多項測驗類型,請選擇您想要參加的測驗並開始挑戰!
54
+ </p>
55
+ </section>
56
+
57
+ <!-- Quiz Selection -->
58
+ <section class="mb-12">
59
+ <h3 class="text-2xl font-semibold text-gray-800 mb-6">選擇測驗</h3>
60
+ <div id="quiz-container" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
61
+ </div>
62
+ </section>
63
+
64
+ <!-- Terms and Conditions -->
65
+ <section class="bg-white rounded-xl shadow-md p-6 mb-8" data-aos="fade-up">
66
+ <h3 class="text-xl font-semibold text-gray-800 mb-4">作答規範</h3>
67
+ <div class="prose prose-gray max-w-none">
68
+ <ul class="list-disc list-inside space-y-2 mb-6">
69
+ <li>測驗期間不可離開測驗頁面</li>
70
+ <li>測驗無法暫停,請確保有足夠時間完成</li>
71
+ <li>測驗開始後無法中途退出</li>
72
+ <li>請確保網路連線穩定</li>
73
+ <li>禁止使用任何外部協助工具</li>
74
+ </ul>
75
+ </div>
76
+ <div class="flex items-center">
77
+ <input type="checkbox" id="terms-agree" class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500">
78
+ <label for="terms-agree" class="ml-2 text-sm font-medium text-gray-900">我已閱讀並同意作答規範</label>
79
+ </div>
80
+ </section>
81
+
82
+ <!-- Start Quiz Button -->
83
+ <div class="text-center" data-aos="fade-up">
84
+ <button id="start-quiz-btn" class="bg-gray-400 text-white py-3 px-8 rounded-lg text-lg font-semibold transition-colors duration-200 cursor-not-allowed" disabled>
85
+ 開始測驗
86
+ </button>
87
+ </div>
88
+ </main>
89
+
90
+ <!-- Footer -->
91
+ <footer class="bg-gray-800 text-white py-8">
92
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
93
+ <p>&copy; 2024 測驗平台. All rights reserved.</p>
94
+ </div>
95
+ </footer>
96
+
97
+ <script>
98
+ // Initialize AOS
99
+ AOS.init({
100
+ duration: 800,
101
+ once: true
102
+ });
103
+
104
+ // Initialize Feather Icons
105
+ feather.replace();
106
+
107
+ let selectedQuizId = null;
108
+ let userLoggedIn = false;
109
+
110
+ const quizzes = [
111
+ {
112
+ id: 1,
113
+ type: '單選題',
114
+ time: '30分鐘',
115
+ title: '基礎數學測驗',
116
+ desc: '測試您的基礎數學能力,包含代數、幾何和統計學的基礎知識。',
117
+ color: 'blue'
118
+ },
119
+ {
120
+ id: 2,
121
+ type: '多選題',
122
+ time: '45分鐘',
123
+ title: '程式設計知識測驗',
124
+ desc: '涵蓋多種程式語言和開發概念的綜合測驗,適合有一定經驗的開發者。',
125
+ color: 'green'
126
+ },
127
+ {
128
+ id: 3,
129
+ type: '單選+多選',
130
+ time: '60分鐘',
131
+ title: '綜合知識測驗',
132
+ desc: '包含各種主題的綜合測驗,測試您的廣泛知識和問題解決能力。',
133
+ color: 'purple'
134
+ }
135
+ ];
136
+
137
+ function renderQuizzes() {
138
+ const container = document.getElementById('quiz-container');
139
+ container.innerHTML = '';
140
+
141
+ quizzes.forEach((quiz, index) => {
142
+ const card = document.createElement('div');
143
+ const isSelected = quiz.id === selectedQuizId;
144
+ card.className = `quiz-card bg-white rounded-xl shadow-md overflow-hidden ${isSelected ? 'ring-2 ring-blue-500' : ''}`;
145
+ card.setAttribute('data-aos', 'fade-up');
146
+ card.setAttribute('data-aos-delay', (index + 1) * 100);
147
+
148
+ card.innerHTML = `
149
+ <div class="p-6">
150
+ <div class="flex items-center justify-between mb-4">
151
+ <span class="bg-${quiz.color}-100 text-${quiz.color}-800 text-xs font-medium px-2.5 py-0.5 rounded-full">
152
+ ${quiz.type}
153
+ </span>
154
+ <span class="text-gray-500 text-sm flex items-center">
155
+ <i data-feather="clock" class="w-4 h-4 mr-1"></i>
156
+ ${quiz.time}
157
+ </span>
158
+ </div>
159
+ <h4 class="text-xl font-semibold text-gray-800 mb-2">${quiz.title}</h4>
160
+ <p class="text-gray-600 mb-4">${quiz.desc}</p>
161
+ <button class="w-full bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-lg transition-colors duration-200" onclick="selectQuiz(${quiz.id})">
162
+ 選擇測驗
163
+ </button>
164
+ </div>
165
+ `;
166
+
167
+ container.appendChild(card);
168
+ });
169
+
170
+ AOS.refresh();
171
+ feather.replace();
172
+ }
173
+
174
+ // Google Sign-In Configuration
175
+ window.onload = function () {
176
+ google.accounts.id.initialize({
177
+ client_id: 'YOUR_GOOGLE_CLIENT_ID', // Replace with your actual Google Client ID
178
+ callback: handleGoogleSignIn
179
+ });
180
+
181
+ document.getElementById('google-signin-btn').addEventListener('click', () => {
182
+ google.accounts.id.prompt();
183
+ });
184
+
185
+ renderQuizzes();
186
+ };
187
+
188
+ function handleGoogleSignIn(response) {
189
+ // Handle Google Sign-In response
190
+ console.log('Google Sign-In successful:', response);
191
+ userLoggedIn = true;
192
+ updateUI();
193
+
194
+ // You would typically send the credential to your server for verification
195
+ // fetch('/api/auth/google', {
196
+ // method: 'POST',
197
+ // headers: { 'Content-Type': 'application/json' },
198
+ // body: JSON.stringify({ credential: response.credential })
199
+ // });
200
+ }
201
+
202
+ function selectQuiz(quizId) {
203
+ selectedQuizId = quizId;
204
+ renderQuizzes();
205
+ updateUI();
206
+ }
207
+
208
+ function updateUI() {
209
+ const termsAgreed = document.getElementById('terms-agree').checked;
210
+ const startButton = document.getElementById('start-quiz-btn');
211
+
212
+ if (userLoggedIn && selectedQuizId && termsAgreed) {
213
+ startButton.classList.remove('bg-gray-400', 'cursor-not-allowed');
214
+ startButton.classList.add('bg-green-600', 'hover:bg-green-700', 'cursor-pointer');
215
+ startButton.disabled = false;
216
+ startButton.onclick = () => startQuiz(selectedQuizId);
217
+ } else {
218
+ startButton.classList.remove('bg-green-600', 'hover:bg-green-700', 'cursor-pointer');
219
+ startButton.classList.add('bg-gray-400', 'cursor-not-allowed');
220
+ startButton.disabled = true;
221
+ }
222
+ }
223
+
224
+ function startQuiz(quizId) {
225
+ alert(`開始測驗 ID: ${quizId}`);
226
+ // Redirect to quiz page or show quiz interface
227
+ // window.location.href = `/quiz/${quizId}`;
228
+ }
229
+
230
+ // Add event listeners
231
+ document.getElementById('terms-agree').addEventListener('change', updateUI);
232
+ </script>
233
+ </body>
234
+ </html>
thanks-you.html ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="zh-TW">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>測驗完成 - 測驗平台</title>
7
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet">
10
+ <script src="https://unpkg.com/[email protected]/dist/aos.js"></script>
11
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
12
+ <script src="https://unpkg.com/feather-icons"></script>
13
+ <style>
14
+ .success-checkmark {
15
+ animation: checkmarkScale 0.5s ease-in-out;
16
+ }
17
+ @keyframes checkmarkScale {
18
+ 0% { transform: scale(0); }
19
+ 50% { transform: scale(1.2); }
20
+ 100% { transform: scale(1); }
21
+ }
22
+ </style>
23
+ </head>
24
+ <body class="bg-gray-50 min-h-screen">
25
+ <!-- Header -->
26
+ <header class="bg-white shadow-sm">
27
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4">
28
+ <div class="flex justify-between items-center">
29
+ <h1 class="text-2xl font-bold text-gray-800">測驗平台</h1>
30
+ </div>
31
+ </div>
32
+ </header>
33
+
34
+ <!-- Main Content -->
35
+ <main class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
36
+ <div class="text-center" data-aos="fade-up">
37
+ <!-- Success Icon -->
38
+ <div class="flex justify-center mb-6">
39
+ <div class="w-24 h-24 bg-green-100 rounded-full flex items-center justify-center success-checkmark">
40
+ <i data-feather="check-circle" class="w-16 h-16 text-green-600"></i>
41
+ </div>
42
+ </div>
43
+
44
+ <!-- Completion Message -->
45
+ <h2 class="text-3xl font-bold text-gray-800 mb-4">測驗已完成!</h2>
46
+ <p class="text-gray-600 text-lg mb-8">
47
+ 感謝您的參與,測驗作答已成功提交。
48
+ </p>
49
+
50
+ <!-- Score Notification -->
51
+ <div class="bg-blue-50 border border-blue-200 rounded-xl p-6 mb-8" data-aos="fade-up" data-aos-delay="200">
52
+ <div class="flex items-center justify-center mb-4">
53
+ <i data-feather="info" class="w-6 h-6 text-blue-600 mr-2"></i>
54
+ <h3 class="text-xl font-semibold text-blue-800">分數通知</h3>
55
+ </div>
56
+ <p class="text-blue-700 mb-2">
57
+ 您的測驗分數將由系統管理員進行評分審核。
58
+ </p>
59
+ <p class="text-blue-700">
60
+ 評分完成後,我們將會通知您是否合格及相關結果。
61
+ </p>
62
+ </div>
63
+
64
+ <!-- Next Steps -->
65
+ <div class="bg-gray-100 rounded-xl p-6 mb-8" data-aos="fade-up" data-aos-delay="400">
66
+ <h3 class="text-lg font-semibold text-gray-800 mb-4">後續步驟</h3>
67
+ <div class="space-y-3 text-left text-gray-600">
68
+ <div class="flex items-start">
69
+ <i data-feather="mail" class="w-5 h-5 text-gray-500 mr-3 mt-1"></i>
70
+ <span>請留意您的電子郵件通知</span>
71
+ </div>
72
+ <div class="flex items-start">
73
+ <i data-feather="clock" class="w-5 h-5 text-gray-500 mr-3 mt-1"></i>
74
+ <span>評分結果將在 3-5 個工作天內公布</span>
75
+ </div>
76
+ <div class="flex items-start">
77
+ <i data-feather="help-circle" class="w-5 h-5 text-gray-500 mr-3 mt-1"></i>
78
+ <span>如有任何問題,請聯繫系統管理員</span>
79
+ </div>
80
+ </div>
81
+ </div>
82
+
83
+ <!-- Return to Home Button -->
84
+ <button onclick="redirectToHome()" class="bg-blue-600 hover:bg-blue-700 text-white py-3 px-8 rounded-lg text-lg font-semibold transition-colors duration-200 flex items-center mx-auto" data-aos="fade-up" data-aos-delay="600">
85
+ <i data-feather="home" class="w-5 h-5 mr-2"></i>
86
+ 返回首頁
87
+ </button>
88
+ </div>
89
+ </main>
90
+
91
+ <!-- Footer -->
92
+ <footer class="bg-gray-800 text-white py-8 mt-12">
93
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
94
+ <p>&copy; 2024 測驗平台. All rights reserved.</p>
95
+ </div>
96
+ </footer>
97
+
98
+ <script>
99
+ // Initialize AOS
100
+ AOS.init({
101
+ duration: 800,
102
+ once: true
103
+ });
104
+
105
+ // Initialize Feather Icons
106
+ feather.replace();
107
+
108
+ function redirectToHome() {
109
+ window.location.replace('index.html')
110
+ }
111
+ </script>
112
+ </body>
113
+ </html>