Skip to content

Commit d79d993

Browse files
committed
changed
1 parent 5600ed6 commit d79d993

File tree

14 files changed

+712
-22
lines changed

14 files changed

+712
-22
lines changed

.idea/dataSources.xml

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Netscape HTTP Cookie File
2+
# https://curl.se/docs/http-cookies.html
3+
# This file was generated by libcurl! Edit at your own risk.
4+
5+
#HttpOnly_localhost FALSE / FALSE 0 JSESSIONID F5361E2438730805B87B4E7307230208

quiz-frontend/quiz-frontend/src/App.css

Lines changed: 104 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* ===== General App Layout ===== */
12
.App {
23
text-align: center;
34
}
@@ -7,12 +8,19 @@
78
pointer-events: none;
89
}
910

11+
/* Optional spinning logo animation */
1012
@media (prefers-reduced-motion: no-preference) {
1113
.App-logo {
1214
animation: App-logo-spin infinite 20s linear;
1315
}
1416
}
1517

18+
@keyframes App-logo-spin {
19+
from { transform: rotate(0deg); }
20+
to { transform: rotate(360deg); }
21+
}
22+
23+
/* App header style */
1624
.App-header {
1725
background-color: #282c34;
1826
min-height: 100vh;
@@ -28,34 +36,28 @@
2836
color: #61dafb;
2937
}
3038

31-
@keyframes App-logo-spin {
32-
from {
33-
transform: rotate(0deg);
34-
}
35-
to {
36-
transform: rotate(360deg);
37-
}
38-
}
39-
39+
/* ===== Base Body Style ===== */
4040
body {
41-
background: #653d8e;
41+
background: #653d8e; /* purple background */
4242
font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
4343
margin: 0;
4444
padding: 0;
4545
}
4646

47+
/* ===== Auth Box (Used in Login, Register, CreateQuiz) ===== */
4748
.auth-container {
48-
max-width: 400px;
49+
max-width: 700px; /* ⬅️ Wider for CreateQuiz page */
4950
margin: 60px auto;
5051
background: #ffffff;
5152
border-radius: 12px;
52-
box-shadow: 0 4px 24px rgba(0,0,0,0.08);
53-
padding: 32px 28px 24px 28px;
53+
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
54+
padding: 32px 40px 32px 40px;
5455
display: flex;
5556
flex-direction: column;
5657
align-items: center;
5758
}
5859

60+
/* ===== Auth Form Fields ===== */
5961
.auth-form {
6062
width: 100%;
6163
display: flex;
@@ -64,7 +66,9 @@ body {
6466
margin-bottom: 12px;
6567
}
6668

67-
.auth-form input {
69+
.auth-form input,
70+
.auth-form textarea,
71+
.auth-form select {
6872
padding: 10px 12px;
6973
border: 1px solid #d1d5db;
7074
border-radius: 6px;
@@ -73,12 +77,15 @@ body {
7377
transition: border 0.2s;
7478
}
7579

76-
.auth-form input:focus {
80+
.auth-form input:focus,
81+
.auth-form textarea:focus,
82+
.auth-form select:focus {
7783
border: 1.5px solid #6366f1;
7884
outline: none;
79-
background: rgba(255, 255, 255, 0.8);
85+
background: rgba(255, 255, 255, 0.9);
8086
}
8187

88+
/* ===== Auth Form Buttons ===== */
8289
.auth-form button {
8390
padding: 10px 0;
8491
background: #6366f1;
@@ -95,6 +102,7 @@ body {
95102
background: #4f46e5;
96103
}
97104

105+
/* ===== Link-style Button ===== */
98106
.auth-link {
99107
background: none;
100108
border: none;
@@ -110,6 +118,7 @@ body {
110118
color: #4f46e5;
111119
}
112120

121+
/* ===== Error Message Box ===== */
113122
.auth-error {
114123
color: #e11d48;
115124
background: #fef2f2;
@@ -121,6 +130,7 @@ body {
121130
font-size: 0.98em;
122131
}
123132

133+
/* ===== Headings / Paragraphs ===== */
124134
h2 {
125135
margin-bottom: 18px;
126136
color: #22223b;
@@ -135,6 +145,7 @@ p {
135145
margin-top: 10px;
136146
}
137147

148+
/* ===== Admin Dashboard Styling ===== */
138149
.admin-dashboard {
139150
max-width: 800px;
140151
margin: 40px auto;
@@ -187,8 +198,7 @@ p {
187198
background-color: #4f46e5;
188199
}
189200

190-
191-
201+
/* ===== Box used on Home Page ===== */
192202
.main-box {
193203
background: #ffffff;
194204
color: #22223b;
@@ -199,6 +209,7 @@ p {
199209
margin-bottom: 20px;
200210
}
201211

212+
/* ===== Announcement Popup ===== */
202213
.announcement-box {
203214
position: fixed;
204215
bottom: 20px;
@@ -237,3 +248,78 @@ p {
237248
color: #6b7280;
238249
font-size: 0.8rem;
239250
}
251+
252+
/* ===== NEW: Question Box for CreateQuiz Page ===== */
253+
.question-box {
254+
border: 1px solid #e5e7eb;
255+
padding: 20px;
256+
border-radius: 8px;
257+
margin-bottom: 24px;
258+
background: #f9fafb;
259+
}
260+
261+
.question-top-row {
262+
display: flex;
263+
gap: 12px;
264+
margin-bottom: 12px;
265+
align-items: center;
266+
}
267+
268+
.question-type-select {
269+
min-width: 180px;
270+
padding: 8px;
271+
}
272+
273+
.question-header-row {
274+
display: flex;
275+
gap: 12px;
276+
align-items: center;
277+
margin-bottom: 10px;
278+
}
279+
280+
.helper-text {
281+
color: #6b7280;
282+
font-size: 0.9em;
283+
margin-bottom: 10px;
284+
}
285+
286+
.option-row {
287+
display: flex;
288+
align-items: center;
289+
gap: 10px; /* space between text, checkbox, and button */
290+
margin-bottom: 8px;
291+
}
292+
293+
.correct-checkbox {
294+
display: flex;
295+
align-items: center;
296+
gap: 4px;
297+
}
298+
299+
.remove-option-btn {
300+
background-color: #4f46e5;
301+
color: white;
302+
border: none;
303+
padding: 6px 10px;
304+
border-radius: 6px;
305+
cursor: pointer;
306+
font-size: 0.9rem;
307+
transition: background-color 0.2s ease;
308+
}
309+
310+
/* Add spacing between inner inputs/selects */
311+
.question-box input,
312+
.question-box select,
313+
.question-box textarea {
314+
margin-bottom: 12px;
315+
}
316+
317+
318+
/* Add spacing between correct answer fields */
319+
.correct-answer-group {
320+
display: flex;
321+
align-items: center;
322+
gap: 5px;
323+
margin-bottom: 5px;
324+
}
325+

quiz-frontend/quiz-frontend/src/App.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Login from './components/Login';
44
import Register from './components/Register';
55
import AdminDashboard from './components/AdminDashboard';
66
import Home from './components/Home'; // ✅ Import Home
7+
import CreateQuiz from './components/CreateQuiz';
78
import './App.css';
89

910
function App() {
@@ -13,6 +14,7 @@ function App() {
1314
<Route path="/login" element={<Login />} />
1415
<Route path="/register" element={<Register />} />
1516
<Route path="/home" element={<Home />} /> {/* ✅ Now uses Home.js */}
17+
<Route path="/create-quiz" element={<CreateQuiz />} />
1618
<Route path="/admin" element={<AdminDashboard />} />
1719
<Route path="/" element={<Login />} />
1820
</Routes>

0 commit comments

Comments
 (0)