aa80c2ba3e
This PR fully implements the Global Chapter-Level Quiz Generation system in the NexusReader application. ### Key Accomplishments: 1. **SubmitQuizResultCommand**: Added MediatR command and handler to persist completed quiz results to the SQLite database securely, using our clean architecture result-pattern. 2. **Dynamic Dashboard Integration**: Re-engineered the user dashboard to fetch, calculate, and display real-time statistics (average score, total books read, total concept nodes mapped, and list of resolved quizzes with their dates and scores) directly from active database queries, eliminating static mockups. 3. **Haptic & Visual Feedback**: Enhanced the quiz flow with interactive CSS transitions, glowing hover feedback, and clear result visualization upon completion. 4. **Robust Verification**: Implemented comprehensive unit tests for `SubmitQuizResultCommandHandler` covering all success and failure/edge cases. Executed full `dotnet test` with 100% success rate. --------- Co-authored-by: Marek Jasiński <jasins.marek@gmail.com> Reviewed-on: #53 Co-authored-by: Antigravity <antigravity@google.com> Co-committed-by: Antigravity <antigravity@google.com>
467 lines
9.6 KiB
CSS
467 lines
9.6 KiB
CSS
.modal-backdrop {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
background-color: rgba(0, 0, 0, 0.6);
|
|
backdrop-filter: blur(8px);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
z-index: 1000;
|
|
animation: fadeIn 0.3s ease-out;
|
|
}
|
|
|
|
.modal-content {
|
|
background: linear-gradient(145deg, #1a1a1a 0%, #0a0a0a 100%);
|
|
border: 1px solid rgba(0, 255, 153, 0.2);
|
|
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 153, 0.05);
|
|
border-radius: 20px;
|
|
width: 90%;
|
|
max-width: 500px;
|
|
padding: 2.5rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2rem;
|
|
position: relative;
|
|
overflow: hidden;
|
|
backdrop-filter: blur(16px);
|
|
}
|
|
|
|
.modal-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.modal-header h2 {
|
|
margin: 0;
|
|
font-family: var(--nexus-font-sans);
|
|
color: var(--nexus-text);
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.close-btn {
|
|
background: none;
|
|
border: none;
|
|
color: var(--nexus-text-muted, #888);
|
|
cursor: pointer;
|
|
transition: color 0.2s;
|
|
}
|
|
|
|
.close-btn:hover {
|
|
color: var(--nexus-neon, #00ffaa);
|
|
transform: rotate(90deg);
|
|
}
|
|
|
|
.modal-body {
|
|
min-height: 250px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
}
|
|
|
|
/* Upload State */
|
|
.upload-state {
|
|
flex: 1;
|
|
display: flex;
|
|
}
|
|
|
|
.drop-zone {
|
|
flex: 1;
|
|
border: 2px dashed rgba(255, 255, 255, 0.1);
|
|
border-radius: 8px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
background: rgba(255, 255, 255, 0.02);
|
|
position: relative;
|
|
}
|
|
|
|
.drop-zone:hover, .upload-state.drag-over .drop-zone {
|
|
border-color: var(--nexus-accent, #00ffaa);
|
|
background: rgba(var(--nexus-accent-rgb, 0, 255, 170), 0.05);
|
|
}
|
|
|
|
.drop-zone-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
color: var(--nexus-text-muted, #888);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.drop-zone-content svg {
|
|
color: var(--nexus-accent, #00ffaa);
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.drop-zone-content p {
|
|
margin: 0;
|
|
font-size: 1.1rem;
|
|
color: var(--nexus-text);
|
|
}
|
|
|
|
.drop-zone ::deep .file-input-cover {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
opacity: 0;
|
|
cursor: pointer;
|
|
z-index: 10;
|
|
}
|
|
|
|
/* Parsing State */
|
|
.parsing-state {
|
|
flex: 1;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
border-radius: 8px;
|
|
background: rgba(255, 255, 255, 0.03);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.shimmer::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: -100%;
|
|
width: 50%;
|
|
height: 100%;
|
|
background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
|
|
animation: shimmer 2s infinite;
|
|
}
|
|
|
|
.shimmer-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.spinner {
|
|
width: 40px;
|
|
height: 40px;
|
|
border: 3px solid rgba(0, 255, 153, 0.1);
|
|
border-top-color: var(--nexus-neon, #00ffaa);
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
filter: drop-shadow(0 0 8px rgba(0, 255, 153, 0.3));
|
|
}
|
|
|
|
.parsing-state p {
|
|
color: var(--nexus-text);
|
|
font-family: var(--nexus-font-mono, monospace);
|
|
font-size: 0.9rem;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
/* Metadata State */
|
|
.metadata-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2rem;
|
|
}
|
|
|
|
.metadata-info {
|
|
text-align: center;
|
|
}
|
|
|
|
.metadata-info h3 {
|
|
margin: 0 0 0.5rem 0;
|
|
color: var(--nexus-text);
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
.metadata-info .author {
|
|
margin: 0;
|
|
color: var(--nexus-text-muted, #888);
|
|
}
|
|
|
|
.actions {
|
|
display: flex;
|
|
gap: 1rem;
|
|
justify-content: center;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.btn {
|
|
font-family: var(--nexus-font-sans);
|
|
font-weight: 600;
|
|
padding: 0.75rem 1.5rem;
|
|
border-radius: 8px;
|
|
border: 1px solid transparent;
|
|
cursor: pointer;
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
font-size: 0.85rem;
|
|
letter-spacing: 0.5px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--nexus-neon, #00ffaa);
|
|
color: #050505;
|
|
box-shadow: 0 4px 12px rgba(var(--nexus-accent-rgb, 0, 255, 170), 0.2);
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: #00e699;
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 6px 20px rgba(var(--nexus-accent-rgb, 0, 255, 170), 0.4);
|
|
}
|
|
|
|
.btn-primary:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: rgba(255, 255, 255, 0.03);
|
|
color: var(--nexus-text);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: rgba(255, 255, 255, 0.08);
|
|
border-color: rgba(255, 255, 255, 0.3);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.btn-secondary:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
/* Verification State */
|
|
.verification-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1.5rem;
|
|
animation: fadeIn 0.4s ease-out;
|
|
}
|
|
|
|
.verification-layout {
|
|
display: grid;
|
|
grid-template-columns: 140px 1fr;
|
|
gap: 2rem;
|
|
align-items: start;
|
|
}
|
|
|
|
.cover-preview {
|
|
width: 140px;
|
|
height: 200px;
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
background: rgba(255, 255, 255, 0.03);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
|
|
position: relative;
|
|
}
|
|
|
|
.cover-preview img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.glowing-placeholder {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.glowing-placeholder::after {
|
|
content: '';
|
|
position: absolute;
|
|
width: 150%;
|
|
height: 150%;
|
|
background: radial-gradient(circle, var(--nexus-neon-alpha, rgba(0, 255, 153, 0.15)) 0%, transparent 70%);
|
|
animation: pulseGlow 4s infinite alternate;
|
|
}
|
|
|
|
.glowing-placeholder svg {
|
|
color: var(--nexus-neon, #00ffaa);
|
|
opacity: 0.5;
|
|
z-index: 1;
|
|
filter: drop-shadow(0 0 10px var(--nexus-neon-alpha-deep, rgba(0, 255, 153, 0.3)));
|
|
}
|
|
|
|
.verification-form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1.25rem;
|
|
}
|
|
|
|
.form-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.form-group label {
|
|
font-size: 0.75rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
color: var(--nexus-text-muted, #888);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.form-input {
|
|
background: rgba(255, 255, 255, 0.03);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
border-radius: 8px;
|
|
padding: 0.75rem 1rem;
|
|
color: var(--nexus-text);
|
|
font-family: var(--nexus-font-sans);
|
|
transition: all 0.3s;
|
|
}
|
|
|
|
.form-input:focus {
|
|
outline: none;
|
|
border-color: var(--nexus-neon, #00ffaa);
|
|
background: rgba(255, 255, 255, 0.06);
|
|
box-shadow: 0 0 15px rgba(0, 255, 153, 0.1);
|
|
}
|
|
|
|
.error-message {
|
|
margin-top: 1rem;
|
|
color: var(--nexus-error, #ff5555);
|
|
text-align: center;
|
|
font-size: 0.9rem;
|
|
padding: 0.75rem;
|
|
background: var(--nexus-error-alpha, rgba(255, 85, 85, 0.1));
|
|
border-radius: 8px;
|
|
border: 1px solid var(--nexus-error-alpha-deep, rgba(255, 85, 85, 0.2));
|
|
}
|
|
|
|
@keyframes pulseGlow {
|
|
from { transform: scale(1); opacity: 0.5; }
|
|
to { transform: scale(1.2); opacity: 0.8; }
|
|
}
|
|
|
|
.btn:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
filter: grayscale(1);
|
|
}
|
|
|
|
.btn-loading {
|
|
position: relative;
|
|
color: transparent !important;
|
|
}
|
|
|
|
.btn-loading::after {
|
|
content: "";
|
|
position: absolute;
|
|
width: 20px;
|
|
height: 20px;
|
|
border: 2px solid rgba(0, 0, 0, 0.1);
|
|
border-top-color: #000;
|
|
border-radius: 50%;
|
|
animation: spin 0.8s linear infinite;
|
|
}
|
|
|
|
/* Indexing State */
|
|
.indexing-state {
|
|
flex: 1;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
border-radius: 12px;
|
|
background: rgba(255, 255, 255, 0.02);
|
|
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.02);
|
|
position: relative;
|
|
overflow: hidden;
|
|
padding: 2rem;
|
|
animation: fadeIn 0.4s ease-out;
|
|
}
|
|
|
|
.indexing-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
text-align: center;
|
|
width: 100%;
|
|
gap: 1.25rem;
|
|
}
|
|
|
|
.indexing-content h3 {
|
|
margin: 0;
|
|
font-size: 1.25rem;
|
|
color: var(--nexus-neon, #00ffaa);
|
|
text-shadow: 0 0 10px rgba(0, 255, 153, 0.2);
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.status-msg {
|
|
margin: 0;
|
|
font-size: 0.9rem;
|
|
color: var(--nexus-text-muted, #888);
|
|
min-height: 2.5rem;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.progress-bar-container {
|
|
width: 100%;
|
|
height: 8px;
|
|
background: rgba(255, 255, 255, 0.05);
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
position: relative;
|
|
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
.progress-bar-fill {
|
|
height: 100%;
|
|
background: linear-gradient(90deg, var(--nexus-neon, #00ffaa) 0%, #00b3ff 100%);
|
|
box-shadow: 0 0 10px rgba(0, 255, 153, 0.4);
|
|
border-radius: 4px;
|
|
transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
.percent {
|
|
font-family: var(--nexus-font-mono, monospace);
|
|
font-size: 1.1rem;
|
|
font-weight: 700;
|
|
color: var(--nexus-text);
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; }
|
|
to { opacity: 1; }
|
|
}
|
|
|
|
@keyframes shimmer {
|
|
100% { left: 200%; }
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.modal-backdrop,
|
|
.shimmer::before,
|
|
.spinner {
|
|
animation: none !important;
|
|
transition: none !important;
|
|
}
|
|
}
|