From d893ab608efbe3e7cf825385ede69e5fbb363ef4 Mon Sep 17 00:00:00 2001 From: Thanh Hoang <126055913+hofang42@users.noreply.github.com> Date: Wed, 15 Oct 2025 13:50:49 +0700 Subject: [PATCH 01/51] [FLN-133][Hoang][UI] Update UI for add course [07.10.2025] (#110) --- .../CRUDCourseAndLesson/CourseCurriculum.css | 1000 ++++--- .../assets/CRUDCourseAndLesson/CourseForm.css | 27 +- .../CRUDCourseAndLesson/CourseCurriculum.jsx | 2453 +++++------------ .../CRUDCourseAndLesson/CourseForm.jsx | 46 +- .../CRUDCourseAndLesson/CourseFormAdvance.jsx | 28 +- .../CRUDCourseAndLesson/CoursePublish.jsx | 14 - 6 files changed, 1272 insertions(+), 2296 deletions(-) diff --git a/FrontEnd/src/assets/CRUDCourseAndLesson/CourseCurriculum.css b/FrontEnd/src/assets/CRUDCourseAndLesson/CourseCurriculum.css index dd8f402..462f3e2 100644 --- a/FrontEnd/src/assets/CRUDCourseAndLesson/CourseCurriculum.css +++ b/FrontEnd/src/assets/CRUDCourseAndLesson/CourseCurriculum.css @@ -1,729 +1,681 @@ -/* Base Styles */ -.acc-app-container { - display: flex; - min-height: 100vh; - margin-bottom: 24px; - margin: 32px 10px 10px 0; +/* Remove number input spinners locally inside the curriculum component to avoid confusion */ +.curriculum-container input[type="number"]::-webkit-outer-spin-button, +.curriculum-container input[type="number"]::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; } -/* Icon Sizes */ -.acc-icon-xs { - width: 16px; - height: 16px; +.curriculum-container input[type="number"] { + -moz-appearance: textfield; + appearance: textfield; } -.acc-icon-sm { - width: 20px; - height: 20px; +/* Button reset styles scoped to the curriculum component */ +.curriculum-container button { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: none; + border: none; + padding: 0; + font: inherit; + cursor: pointer; + outline: inherit; } -/* Sidebar Styles */ -.acc-sidebar { - width: 256px; - background-color: #1d2026; - color: white; - display: flex; - flex-direction: column; +/* Exception for scrollable areas */ +.modal-body { + overflow-y: auto !important; } -.acc-logo-section { +/* Curriculum Container */ +.curriculum-container { + max-width: 1200px; + margin: 0 auto; padding: 24px; - border-bottom: 1px solid rgba(110, 116, 133, 0.2); + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", + sans-serif; + overflow: visible; + position: relative; } -.acc-logo { - display: flex; - align-items: center; - gap: 8px; +.curriculum-header { + margin-bottom: 32px; } -.acc-logo-icon { - width: 32px; - height: 32px; - background-color: #ff6636; +.curriculum-title { + font-size: 32px; + font-weight: bold; + margin-bottom: 24px; + color: #1f2937; +} + +/* Stats Overview */ +.stats-overview { + background: white; border-radius: 8px; + padding: 24px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + margin-bottom: 24px; display: flex; - align-items: center; - justify-content: center; + gap: 32px; } -.acc-logo-text { - font-size: 20px; - font-weight: 600; +.stat-item { + text-align: center; } -.acc-navigation { - flex: 1; - padding: 16px; +.stat-number { + font-size: 48px; + font-weight: bold; + color: #f97316; /* Orange accent */ + line-height: 1; } -.acc-nav-items { - display: flex; - flex-direction: column; - gap: 8px; +.stat-label { + font-size: 14px; + color: #6b7280; + margin-top: 4px; } -.acc-nav-item { +/* Sections */ +.sections-container { display: flex; - align-items: center; - gap: 12px; - padding: 8px 12px; - border-radius: 8px; - color: #8c94a3; - text-decoration: none; - transition: all 0.2s ease; + flex-direction: column; + gap: 16px; + overflow: visible; position: relative; } -.acc-nav-item:hover { - background-color: rgba(110, 116, 133, 0.1); -} - -.acc-nav-item-active { - background-color: #ff6636; - color: white; -} - -.acc-nav-item-with-badge { +.section-card { + background: white; + border-radius: 8px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + overflow: visible; position: relative; } -.acc-notification-badge { - position: absolute; - top: -4px; - right: -4px; - background-color: #ff6636; - color: white; - font-size: 12px; - width: 20px; - height: 20px; - border-radius: 50%; +.section-header { + padding: 16px; + cursor: pointer; display: flex; align-items: center; - justify-content: center; - padding: 0; + justify-content: space-between; + transition: background-color 0.2s; + overflow: visible; + position: relative; } -.acc-sidebar-footer { - padding: 16px; - border-top: 1px solid rgba(110, 116, 133, 0.2); +.section-header:hover { + background-color: #f9fafb; } -/* Main Content Layout (like CourseForm, but acc- prefix) */ -.acc-content-area { - flex: 1; +.section-left { display: flex; - flex-direction: column; + align-items: center; + gap: 12px; + flex: 1; } -.acc-main-container { - width: 100%; - max-width: 1200px; - margin: 0 auto; - padding: 0; - background: #fff; - border-radius: 16px; - box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08); - min-height: calc(100vh - 96px); - display: flex; - flex-direction: column; +.section-chevron { + transition: transform 0.2s ease; + color: #6b7280; } -.acc-main-content { - flex: 1; - display: flex; - flex-direction: column; +.section-chevron.expanded { + transform: rotate(90deg); } -.acc-form-content { +.section-info { flex: 1; - padding: 32px; } -.acc-form-header { +.section-title-row { display: flex; align-items: center; - justify-content: space-between; - margin-bottom: 32px; - max-width: 1024px; + gap: 8px; + margin-bottom: 4px; } -.acc-form-title { - font-size: 24px; +.section-number { + font-size: 14px; + color: #6b7280; +} + +.section-title-input { font-weight: 600; - color: #1d2026; + font-size: 18px; + border: none; + outline: none; + background: transparent; + /* Hide progress percentage display as per design */ + .section-progress, + .lesson-progress { + display: none; + } + flex: 1; + color: #1f2937; } -.acc-form-actions { - display: flex; - gap: 12px; +.section-title-input::placeholder { + color: #9ca3af; } -/* Header Styles */ -.acc-header { - background-color: white; - border-bottom: 1px solid #e9eaf0; - padding: 16px 32px; +.section-meta { + font-size: 14px; + color: #6b7280; } -.acc-header-content { +.section-right { display: flex; align-items: center; - justify-content: space-between; + gap: 12px; + overflow: visible; + position: relative; } -.acc-greeting { - color: #8c94a3; +.section-progress { font-size: 14px; - margin: 0 0 4px 0; + font-weight: 500; + color: #f97316; /* Orange accent */ } -.acc-page-title { - font-size: 24px; - font-weight: 600; - color: #1d2026; - margin: 0; +.section-actions { + display: flex; + gap: 8px; } -.acc-header-right { +.dropdown-container { + position: relative; + display: inline-block; + z-index: 500; + overflow: visible; +} + +.curriculum-container .action-button { + padding: 8px !important; + border: none !important; + background: none; + border-radius: 4px; + cursor: pointer; display: flex; align-items: center; - gap: 16px; + justify-content: center; + transition: background-color 0.2s; + position: relative; + outline: none !important; + -webkit-appearance: none !important; + -moz-appearance: none !important; + appearance: none !important; + min-width: 36px; + min-height: 36px; + box-shadow: none !important; + color: #6b7280; + font-size: 16px; } -.acc-search-container { - position: relative; +.curriculum-container .action-button:hover { + background-color: #fff7ed !important; /* subtle warm hover */ } -.acc-search-icon { +.curriculum-container .action-button.delete:hover { + background-color: #fef2f2 !important; + color: #dc2626 !important; +} + +.lesson-type-dropdown { position: absolute; - left: 12px; - top: 50%; - transform: translateY(-50%); - color: #8c94a3; - width: 16px; - height: 16px; -} - -.acc-search-input { - padding-left: 40px; - width: 320px; - background-color: #f5f7fa; - border: none; + right: 0; + top: calc(100% + 8px); + background: #ffffff; + border: 1px solid rgba(15, 23, 42, 0.06); + border-radius: 12px; + box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12); + z-index: 1500; + width: auto; + min-width: 220px; /* larger by default */ + max-width: 340px; + overflow: visible; + pointer-events: auto; + padding: 12px; /* more breathing room */ +} + +.dropdown-item { + display: flex; + align-items: center; + gap: 14px; + padding: 12px 16px; + cursor: pointer; + transition: background-color 0.12s, transform 0.06s; + font-size: 15px; + color: #0f172a; + white-space: nowrap; + user-select: none; + border-radius: 6px; + border: 0; + background: transparent; + width: 100%; + text-align: left; + margin: 4px 0; /* space between options */ } -.acc-notification-icon { - width: 20px; - height: 20px; - color: #8c94a3; +.dropdown-item:hover { + background-color: #fff3e0; /* slightly stronger warm hover */ + color: #7c2d0e; + transform: translateY(-1px); } -.acc-user-avatar { - width: 32px; - height: 32px; +.dropdown-item:active { + background-color: rgba(249, 115, 22, 0.06); } -.acc-avatar-fallback { - background-color: #ff6636; - color: white; +/* Lessons */ +.lessons-container { + border-top: 1px solid #e5e7eb; } -/* Progress Section */ -.acc-progress-section { - background-color: white; - border-bottom: 1px solid #e9eaf0; - padding: 24px 32px; +.lesson-item { + border-bottom: 1px solid #e5e7eb; } -.acc-progress-steps { - display: flex; - align-items: center; - gap: 32px; +.lesson-item:last-child { + border-bottom: none; } -.acc-progress-step { +.lesson-header { + padding: 16px; + cursor: pointer; display: flex; align-items: center; gap: 12px; + transition: background-color 0.2s; } -.acc-step-icon { - width: 24px; - height: 24px; - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; +.lesson-header:hover { + background-color: #f9fafb; } -.acc-step-completed { - background-color: #23bd33; - color: white; +.lesson-drag-handle { + color: #9ca3af; } -.acc-step-current { - background-color: #ff6636; - color: white; +.lesson-icon { + color: #f97316; /* Primary web color */ } -.acc-step-pending { - border: 2px solid #e9eaf0; - background-color: white; +.lesson-info { + flex: 1; } -.acc-step-number { - color: #8c94a3; - font-size: 14px; +.lesson-title-row { + display: flex; + align-items: center; + gap: 8px; + margin-bottom: 4px; } -.acc-step-label { - color: #8c94a3; +.lesson-number { + font-size: 12px; + color: #6b7280; } -.acc-step-label-current { - color: #1d2026; +.lesson-title-input { font-weight: 500; + border: none; + outline: none; + background: transparent; + flex: 1; + color: #1f2937; } -.acc-step-counter { - color: #8c94a3; - font-size: 14px; -} - -/* Course Structure */ -.acc-course-structure { - display: flex; - flex-direction: column; - gap: 16px; -} - -.acc-section-card { - background-color: white; - border-radius: 8px; - border: 1px solid #e9eaf0; - padding: 24px; +.lesson-title-input::placeholder { + color: #9ca3af; } -.acc-section-header { - display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: 16px; +.lesson-meta { + font-size: 12px; + color: #6b7280; } -.acc-section-title-container { +.lesson-actions { display: flex; align-items: center; gap: 12px; } -.acc-section-indicator { - display: flex; - align-items: center; - gap: 8px; - color: #8c94a3; -} - -.acc-section-line { - width: 16px; - height: 2px; - background-color: #c2c8d0; - border-radius: 2px; - position: relative; - display: inline-block; - margin-right: 8px; +.lesson-chevron { + transition: transform 0.2s ease; + color: #6b7280; } -.acc-section-line::before, -.acc-section-line::after { - content: ""; - position: absolute; - left: 0; - width: 16px; - height: 2px; - background-color: #c2c8d0; - border-radius: 2px; -} - -.acc-section-line::before { - top: -5px; +.lesson-chevron.expanded { + transform: rotate(90deg); } -.acc-section-line::after { - top: 5px; +.lesson-progress { + font-size: 14px; + font-weight: 500; + color: #f97316; /* Primary web color */ } -.acc-section-label { - font-weight: 500; +/* Lesson Fields */ +.lesson-fields { + padding: 16px; + background-color: #f9fafb; + display: flex; + flex-direction: column; + gap: 16px; } -.acc-section-name { - color: #1d2026; +.field-card { + background: white; + padding: 16px; + border-radius: 8px; } -.acc-section-actions { +.field-header { display: flex; align-items: center; gap: 8px; + margin-bottom: 8px; } -.acc-action-button { - color: #8c94a3; +.field-title { + font-weight: 500; + color: #1f2937; } -.acc-action-button:hover { - color: #1d2026; +.field-check { + color: #10b981; } -/* Lectures */ -.acc-lectures-container { - display: flex; - flex-direction: column; - gap: 12px; - margin-left: 24px; +.field-input { + width: 100%; + padding: 8px; + border: 1px solid #d1d5db; + border-radius: 4px; + font-size: 14px; + color: #1f2937; } -.acc-lecture-item { - background-color: #f5f7fa; - border-radius: 8px; +.field-input:focus { + outline: none; + border-color: #2563eb; + box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); +} +/* File upload input styled as dashed upload button */ +.file-input { + width: 100%; padding: 12px; + border: 2px dashed #d1d5db; + border-radius: 8px; + background: none; + cursor: pointer; + color: #6b7280; + font-size: 14px; + transition: all 0.2s; +} +.file-input:hover { + border-color: #f97316; + background-color: #fff7ed; + color: #f97316; } -.acc-lecture-content { - display: flex; - align-items: center; - justify-content: space-between; +.field-textarea { + width: 100%; + padding: 8px; + border: 1px solid #d1d5db; + border-radius: 4px; + font-size: 14px; + color: #1f2937; + resize: none; } -.acc-lecture-title-container { - display: flex; - align-items: center; - gap: 12px; +.field-textarea:focus { + outline: none; + border-color: #2563eb; + box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); } -.acc-lecture-line { - width: 16px; - height: 2px; - background-color: #c2c8d0; - border-radius: 2px; - position: relative; - display: inline-block; - margin-right: 8px; +.field-note { + font-size: 12px; + color: #6b7280; + margin-top: 4px; } -.acc-lecture-line::before, -.acc-lecture-line::after { - content: ""; - position: absolute; - left: 0; - width: 16px; - height: 2px; - background-color: #c2c8d0; - border-radius: 2px; +.fields-grid { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 16px; } -.acc-lecture-line::before { - top: -5px; +.field-full { + grid-column: 1 / -1; } -.acc-lecture-line::after { - top: 5px; +/* Quiz Selection */ +.quiz-selector-button { + width: 100%; + margin-bottom: 12px; + padding: 8px; + border: 2px dashed #d1d5db; + border-radius: 8px; + background: none; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + gap: 8px; + transition: all 0.2s; + color: #6b7280; } -.acc-lecture-name { - color: #1d2026; +.quiz-selector-button:hover { + border-color: #2563eb; + background-color: #eff6ff; + color: #2563eb; } -.acc-lecture-actions { +.quiz-list { display: flex; - align-items: center; + flex-direction: column; gap: 8px; } -.acc-contents-button { - color: #ff6636; +.quiz-item { display: flex; - align-items: center; /* Add this line to vertically center children */ + align-items: center; + justify-content: space-between; + padding: 12px; + background-color: #eff6ff; + border: 1px solid #bfdbfe; + border-radius: 8px; } -.acc-contents-button:hover { - background-color: #ffeee8; +.quiz-info { + flex: 1; } -.acc-chevron { - margin-left: 4px; - display: flex; /* Add this line */ - align-items: center; /* Add this line */ +.quiz-title { + font-weight: 500; + font-size: 14px; + color: #1f2937; } -.acc-dropdown-content { - width: 192px; +.quiz-meta { + font-size: 12px; + color: #6b7280; } -.acc-dropdown-item { - display: flex; - align-items: center; - gap: 8px; +.quiz-remove { + padding: 4px; + border: none; + background: none; + border-radius: 4px; + cursor: pointer; + color: #dc2626; + transition: background-color 0.2s; } -/* Expanded Content */ -.acc-expanded-content { - margin-left: 24px; - padding: 16px; - background-color: white; - border: 1px solid #e9eaf0; - border-radius: 8px; - margin-top: 12px; +.quiz-remove:hover { + background-color: #fef2f2; } -.acc-content-options { - display: flex; - flex-direction: column; - gap: 8px; +.empty-state { + font-size: 14px; + color: #6b7280; + text-align: center; + padding: 16px; } -.acc-content-option { +/* Add Section Button */ +.add-section-button { + width: 100%; + padding: 14px 20px; + border: 2px solid #f97316; /* orange outline */ + border-radius: 8px; + background: transparent; + cursor: pointer; display: flex; align-items: center; + justify-content: center; gap: 8px; - color: #8c94a3; - cursor: pointer; - transition: color 0.2s ease; -} - -.acc-content-option:hover { - color: #1d2026; + transition: background-color 0.2s, color 0.2s, border-color 0.2s; + color: #f97316; + font-weight: 600; } -/* Add Sections Button */ -.acc-add-sections-button { - width: 100%; - padding: 24px; - color: #ff6636; - border-color: #ff6636; - border-style: dashed; - background-color: rgba(255, 238, 232, 0.3); - display: flex; -} -.acc-add-sections-container { - display: flex; +.add-section-button { + display: inline-flex; align-items: center; justify-content: center; + gap: 8px; + min-width: 180px; + padding: 8px 20px; + border: 2px solid #f97316; + border-radius: 9999px; /* pill */ + background: #ffffff; + color: #f97316; + font-size: 16px; + font-weight: 600; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + transition: background-color 0.2s, color 0.2s, box-shadow 0.2s; } -.acc-add-sections-button:hover { - background-color: #ffeee8; -} - -.acc-add-icon { - margin-right: 8px; +.add-section-button:hover { + background-color: #f97316; + color: #ffffff; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); } -/* Navigation Buttons */ -.acc-navigation-buttons { +.modal-header { display: flex; justify-content: space-between; - margin-top: 48px; + align-items: center; + margin-bottom: 16px; } -.acc-nav-button { - padding: 8px 32px; +.modal-title { + font-size: 18px; + font-weight: 500; + color: #1f2937; } -.acc-nav-button-primary { - background-color: #ff6636; +.modal-close { + font-size: 24px; + border: none; + background: none; + cursor: pointer; + color: #6b7280; + transition: color 0.2s; } -.acc-nav-button-primary:hover { - background-color: rgba(255, 102, 54, 0.9); +.modal-close:hover { + color: #374151; } -/* Footer */ -.acc-footer { - background-color: white; - border-top: 1px solid #e9eaf0; - padding: 16px 32px; +.modal-body { + max-height: 384px; + overflow-y: auto; + display: flex; + flex-direction: column; + gap: 8px; } - -.acc-footer-content { +/* Overlay for quiz selection modal */ +.modal-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.4); display: flex; align-items: center; - justify-content: space-between; - font-size: 14px; - color: #8c94a3; + justify-content: center; + z-index: 2000; +} +/* Constrain modal content size */ +.modal-content { + width: 90%; + max-width: 600px; + margin: auto; + overflow: visible; + background: white; + border-radius: 8px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); } -.acc-footer-highlight { - color: #1d2026; +.modal-content { + background: #fff; + border-radius: 8px; + max-width: 550px; + width: 100%; + padding: 16px; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + display: flex; + flex-direction: column; } - -.acc-footer-links { +.modal-header { display: flex; - align-items: center; - gap: 24px; + justify-content: center; + position: relative; + padding-bottom: 8px; + border-bottom: 1px solid #e5e7eb; } - -.acc-footer-link { - color: #8c94a3; - text-decoration: none; - transition: color 0.2s ease; +.modal-close { + position: absolute; + top: 12px; + right: 12px; + font-size: 20px; + background: transparent; + border: none; + cursor: pointer; } - -.acc-footer-link:hover { - color: #1d2026; +.modal-body { + max-height: 60vh; + overflow-y: auto; + gap: 12px; + padding: 8px 0; } -/* Responsive Design */ -@media (max-width: 1200px) { - .acc-main-container { - max-width: 100vw; - } +/* Quiz options restyle */ +.quiz-option { + padding: 12px 16px; + border: 1px solid #d1d5db; + border-radius: 6px; + background: #fff; + margin-bottom: 8px; + transition: background-color 0.2s, border-color 0.2s; } - -@media (max-width: 768px) { - .acc-form-content { - padding: 16px; - } - .acc-form-header { - align-items: flex-start; - gap: 8px; - margin-bottom: 16px; - max-width: 100vw; - } - .acc-form-title { - font-size: 18px; - } - .acc-main-container { - border-radius: 8px; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); - padding: 0; - min-height: unset; - max-width: 100vw; - width: 100vw; - } +.quiz-option:hover { + background: #fff7ed; + border-color: #f97316; } - -@media (max-width: 600px) { - .acc-main-container { - padding: 0 !important; - width: 100vw !important; - max-width: 100vw !important; - } - .acc-form-content { - padding: 4px !important; - width: 100vw !important; - max-width: 100vw !important; - } - .acc-form-header { - flex-direction: row; - align-items: flex-start; - gap: 8px; - margin-bottom: 12px; - max-width: 100vw; - justify-self: center; - } - .acc-form-title { - font-size: 16px; - } - .acc-lecture-content { - flex-direction: column !important; - align-items: flex-start !important; - gap: 6px !important; - width: 100% !important; - } - .acc-lecture-title-container { - flex-wrap: wrap !important; - gap: 6px !important; - min-width: 0 !important; - width: 100% !important; - } - .acc-lecture-name, - .acc-lecture-label, - .acc-section-label { - min-width: 0 !important; - max-width: 100% !important; - overflow: hidden !important; - text-overflow: ellipsis !important; - white-space: nowrap !important; - display: block !important; - } - .acc-lecture-item { - width: 100% !important; - box-sizing: border-box !important; - } - .acc-lecture-title-container input { - width: 100% !important; - min-width: 0 !important; - max-width: 100% !important; - } - /* Modal overlay */ - .cf-app-container > div[style*="position: fixed"] { - align-items: center !important; - justify-content: center !important; - padding-top: 0 !important; - } - /* Modal content */ - .cf-app-container > div[style*="position: fixed"] > div { - width: 98vw !important; - min-width: 0 !important; - max-width: 98vw !important; - padding: 12px !important; - border-radius: 8px !important; - box-sizing: border-box !important; - margin: 0 auto !important; - } - /* Modal textarea/input */ - .cf-app-container textarea, - .cf-app-container input[type="text"], - .cf-app-container input[type="file"] { - width: 100% !important; - min-width: 0 !important; - max-width: 100% !important; - box-sizing: border-box !important; - } - /* Modal footer buttons */ - .cf-app-container .CustomButton { - min-width: 80px !important; - font-size: 15px !important; - padding: 8px 12px !important; - } - .acc-expanded-content .lucide { - display: none !important; - } - .acc-expanded-content > div > div { - display: flex !important; - flex-direction: row !important; - align-items: center !important; - gap: 8px !important; - width: 100% !important; - margin-bottom: 10px !important; - box-sizing: border-box !important; - padding: 8px 4px !important; - } - .acc-expanded-content .acc-lecture-label, - .acc-expanded-content .acc-section-label, - .acc-expanded-content span, - .acc-expanded-content .acc-lecture-name { - font-size: 15px !important; - white-space: nowrap !important; - overflow: hidden !important; - text-overflow: ellipsis !important; - word-break: normal !important; - } - .acc-expanded-content .acc-lecture-label { - margin-bottom: 0 !important; - } - .acc-expanded-content [data-video-preview] { - width: 100% !important; - max-width: 100% !important; - min-width: 0 !important; - margin-top: 8px !important; - margin-bottom: 8px !important; - } - .acc-expanded-content video { - width: 100% !important; - height: auto !important; - max-height: 180px !important; - object-fit: contain !important; - border-radius: 6px !important; - } +.quiz-option.selected { + background: #fff1e6; + border-color: #f97316; +} +.acc-navigation-buttons { + display: flex; + justify-content: space-between; + margin-top: 24px; } diff --git a/FrontEnd/src/assets/CRUDCourseAndLesson/CourseForm.css b/FrontEnd/src/assets/CRUDCourseAndLesson/CourseForm.css index 882926c..7eabbd9 100644 --- a/FrontEnd/src/assets/CRUDCourseAndLesson/CourseForm.css +++ b/FrontEnd/src/assets/CRUDCourseAndLesson/CourseForm.css @@ -127,11 +127,27 @@ body { margin-bottom: 24px; } +.cf-form-row-3 { + display: grid; + grid-template-columns: 1fr auto auto; + gap: 24px; + margin-bottom: 24px; +} + .cf-duration-container { display: flex; gap: 8px; } +/* Custom field sizing */ +.cf-small-input { + max-width: 250px; +} + +.cf-price-input { + max-width: 300px; +} + .cf-form-actions-bottom { display: flex; justify-content: space-between; @@ -187,6 +203,14 @@ body { .cf-form-row-4 { grid-template-columns: 1fr 1fr; } + + .cf-form-row-3 { + grid-template-columns: 1fr 1fr; + } + + .cf-form-row-3 .cf-price-input { + grid-column: 1 / -1; + } } @media (max-width: 768px) { @@ -194,7 +218,8 @@ body { padding: 16px; } - .cf-form-row { + .cf-form-row, + .cf-form-row-3 { grid-template-columns: 1fr; } diff --git a/FrontEnd/src/components/CRUDCourseAndLesson/CourseCurriculum.jsx b/FrontEnd/src/components/CRUDCourseAndLesson/CourseCurriculum.jsx index 5951376..cefa205 100644 --- a/FrontEnd/src/components/CRUDCourseAndLesson/CourseCurriculum.jsx +++ b/FrontEnd/src/components/CRUDCourseAndLesson/CourseCurriculum.jsx @@ -1,58 +1,59 @@ import { useState, useEffect } from "react"; -import CustomButton from "../common/CustomButton/CustomButton"; -import { Plus, Trash2, FileText, Video, Type, StickyNote } from "lucide-react"; +import { + Plus, + Trash2, + Video, + BookOpen, + HelpCircle, + Clock, + Upload, + Check, + GripVertical, + ChevronRight, + FileText, + X, +} from "lucide-react"; import "../../assets/CRUDCourseAndLesson/CourseCurriculum.css"; import ProgressTabs from "./ProgressTabs"; -import apiClient from "../../services/authService"; -import { toast } from "react-toastify"; +import CustomButton from "../common/CustomButton/CustomButton"; + +// Mock quiz data - Replace with API call later +const MOCK_QUIZZES = [ + { + _id: "quiz1", + title: "Introduction to JavaScript Quiz", + questions: 10, + duration: 600, + }, + { + _id: "quiz2", + title: "React Fundamentals Assessment", + questions: 15, + duration: 900, + }, + { + _id: "quiz3", + title: "Advanced CSS Techniques", + questions: 8, + duration: 480, + }, + { _id: "quiz4", title: "Node.js Backend Quiz", questions: 12, duration: 720 }, + { + _id: "quiz5", + title: "Database Design Principles", + questions: 10, + duration: 600, + }, +]; function Modal({ open, onClose, title, children }) { if (!open) return null; return ( -