diff --git a/frontend/src/index.css b/frontend/src/index.css index edff504..68a32bb 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -437,4 +437,69 @@ body { background-color: #f0f0f0; color: var(--color-text-muted); text-decoration: line-through; +} + +.file-upload-wrapper { + position: relative; + display: flex; + align-items: center; + gap: 12px; + flex-wrap: wrap; +} + +.file-upload-button { + display: inline-flex; + align-items: center; + gap: 8px; + padding: 10px 18px; + background: var(--color-bg-secondary); + border: 1px dashed var(--color-border); + border-radius: 12px; + color: var(--color-text); + font-size: 14px; + font-weight: 500; + cursor: pointer; + transition: all 0.2s ease; +} + +.file-upload-button:hover { + border-color: var(--color-primary); + background: rgba(99, 102, 241, 0.08); + transform: translateY(-1px); +} + +.file-upload-button .icon { + font-size: 18px; +} + +.file-upload-input { + position: absolute; + opacity: 0; + width: 0; + height: 0; +} + +.file-selected-name { + font-size: 13px; + color: var(--color-text-muted); + max-width: 220px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + padding: 4px 0; +} + +.course-card-wrapper { + position: relative; + height: 100%; +} + +.course-card-wrapper .course-card { + width: 100%; + height: 100%; +} + +.course-card-wrapper button:hover { + background: rgba(99, 102, 241, 0.15) !important; + transform: scale(1.05); } \ No newline at end of file diff --git a/frontend/src/pages/CourseDetails.tsx b/frontend/src/pages/CourseDetails.tsx index cc7e34a..065d869 100644 --- a/frontend/src/pages/CourseDetails.tsx +++ b/frontend/src/pages/CourseDetails.tsx @@ -68,7 +68,7 @@ export default function CourseDetails() { .from('tasks') .select('*') .eq('course_id', id) - .order('created_at', { ascending: false }); + .order('deadline', { ascending: true, nullsFirst: false }); if (error) { console.error('Ошибка загрузки задач:', error); @@ -528,15 +528,27 @@ export default function CourseDetails() { }} /> - { - const file = e.target.files?.[0] || null; - setSelectedAttachmentFile(file); - }} - disabled={isAddingAttachment} - /> +
+ +
+ {course.description?.trim() || 'Описание курса пока не добавлено.'} +
+