feat(ui/quiz): implement real-time global chapter quiz generation, submit results to database, and display dynamic statistics on dashboard
This commit is contained in:
@@ -121,3 +121,217 @@
|
||||
0% { background-position: -200% 0; }
|
||||
100% { background-position: 200% 0; }
|
||||
}
|
||||
|
||||
.option-revealed-correct {
|
||||
border-color: #00ff99 !important;
|
||||
background: rgba(0, 255, 153, 0.08) !important;
|
||||
box-shadow: 0 0 8px rgba(0, 255, 153, 0.15);
|
||||
}
|
||||
|
||||
.option-faded {
|
||||
opacity: 0.45;
|
||||
}
|
||||
|
||||
.submitted-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
padding: 2rem 1rem;
|
||||
animation: fadeIn 0.4s ease-out;
|
||||
}
|
||||
|
||||
.success-icon-wrapper {
|
||||
background: rgba(0, 255, 153, 0.1);
|
||||
border: 1px solid rgba(0, 255, 153, 0.3);
|
||||
border-radius: 50%;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 1.5rem;
|
||||
box-shadow: 0 0 20px rgba(0, 255, 153, 0.15);
|
||||
}
|
||||
|
||||
.success-glow {
|
||||
color: var(--nexus-neon, #00ff99);
|
||||
filter: drop-shadow(0 0 8px var(--nexus-neon, #00ff99));
|
||||
}
|
||||
|
||||
.submitted-title {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
color: #fff;
|
||||
margin-bottom: 0.5rem;
|
||||
letter-spacing: -0.5px;
|
||||
}
|
||||
|
||||
.submitted-text {
|
||||
font-size: 0.9rem;
|
||||
color: #888;
|
||||
margin-bottom: 2rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.score-card {
|
||||
background: rgba(255, 255, 255, 0.02);
|
||||
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||
border-radius: 16px;
|
||||
padding: 1.5rem 2.5rem;
|
||||
margin-bottom: 2rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
.score-main {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 0.2rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.score-num {
|
||||
font-size: 3rem;
|
||||
font-weight: 800;
|
||||
color: var(--nexus-neon, #00ff99);
|
||||
line-height: 1;
|
||||
text-shadow: 0 0 15px rgba(0, 255, 153, 0.3);
|
||||
}
|
||||
|
||||
.score-divider {
|
||||
font-size: 1.8rem;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.score-total {
|
||||
font-size: 1.8rem;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.score-percent {
|
||||
font-size: 0.85rem;
|
||||
color: #666;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.reset-quiz-btn {
|
||||
padding: 0.8rem 3rem;
|
||||
background: transparent;
|
||||
border: 1px solid rgba(255, 255, 255, 0.15);
|
||||
border-radius: 30px;
|
||||
color: #fff;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.reset-quiz-btn:hover {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border-color: #fff;
|
||||
box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(10px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.empty-quiz-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
padding: 2.5rem 1rem;
|
||||
animation: fadeIn 0.4s ease-out;
|
||||
}
|
||||
|
||||
.empty-icon-wrapper {
|
||||
background: rgba(0, 255, 153, 0.03);
|
||||
border: 1px solid rgba(0, 255, 153, 0.15);
|
||||
border-radius: 50%;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 1.5rem;
|
||||
box-shadow: 0 0 30px rgba(0, 255, 153, 0.05);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.empty-quiz-state:hover .empty-icon-wrapper {
|
||||
background: rgba(0, 255, 153, 0.08);
|
||||
border-color: rgba(0, 255, 153, 0.4);
|
||||
box-shadow: 0 0 35px rgba(0, 255, 153, 0.15);
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.neon-glow {
|
||||
color: var(--nexus-neon, #00ff99);
|
||||
filter: drop-shadow(0 0 6px var(--nexus-neon, #00ff99));
|
||||
}
|
||||
|
||||
.empty-title {
|
||||
font-size: 1.3rem;
|
||||
font-weight: 700;
|
||||
color: #fff;
|
||||
margin-bottom: 0.5rem;
|
||||
letter-spacing: -0.3px;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 0.9rem;
|
||||
color: #888;
|
||||
margin-bottom: 2rem;
|
||||
line-height: 1.5;
|
||||
max-width: 280px;
|
||||
}
|
||||
|
||||
.generate-quiz-btn {
|
||||
padding: 0.85rem 2rem;
|
||||
background: rgba(0, 255, 153, 0.08);
|
||||
border: 1px solid var(--nexus-neon, #00ff99);
|
||||
border-radius: 30px;
|
||||
color: var(--nexus-neon, #00ff99);
|
||||
font-size: 0.85rem;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
letter-spacing: 0.8px;
|
||||
text-shadow: 0 0 10px rgba(0, 255, 153, 0.3);
|
||||
box-shadow: 0 0 15px rgba(0, 255, 153, 0.1);
|
||||
}
|
||||
|
||||
.generate-quiz-btn:not(:disabled):hover {
|
||||
background: var(--nexus-neon, #00ff99);
|
||||
color: #000;
|
||||
box-shadow: 0 0 25px rgba(0, 255, 153, 0.4);
|
||||
transform: translateY(-2px);
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.generate-quiz-btn:disabled {
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
border-color: rgba(255, 255, 255, 0.15);
|
||||
background: rgba(255, 255, 255, 0.02);
|
||||
color: #666;
|
||||
text-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user