wip: student profile/report

This commit is contained in:
dev
2026-09-19 13:06:21 +03:00
parent 72eeb5cf9b
commit 1ef81f9d1c
10 changed files with 3269 additions and 480 deletions
+20
View File
@@ -43,6 +43,18 @@
<label>Количество занятий</label>
<input type="number" name="lessons_count" id="moduleLessons" class="settings-input" min="0" max="10000" step="1" value="0">
</div>
<div class="settings-field">
<label>Картинка модуля</label>
<div class="module-photo-controls">
<img id="modulePhotoPreview" class="module-photo-preview" alt="" style="display:none">
<div class="module-photo-actions">
<label class="btn-primary ghost module-photo-pick" for="modulePhotoFile">Выбрать файл</label>
<input type="file" id="modulePhotoFile" accept="image/*" style="display:none">
<button type="button" id="modulePhotoDeleteBtn" class="btn-link danger" style="display:none">Удалить</button>
</div>
<span id="modulePhotoNote" class="hint">jpg, png, gif, webp, avif, heic и др., до 10 МБ · или вставьте из буфера (Ctrl+V)</span>
</div>
</div>
<div class="card-foot" style="justify-content:flex-end;gap:8px">
<button type="button" class="btn-primary ghost" id="moduleCancelBtn">Отмена</button>
<button type="submit" class="btn-primary" id="moduleSubmitBtn">Создать</button>
@@ -78,6 +90,7 @@
.module-item{display:flex;justify-content:space-between;align-items:center;gap:12px}
.module-info{min-width:0;display:flex;flex-direction:column;gap:4px}
.module-name{font-weight:600;font-size:.95rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.module-thumb{width:48px;height:48px;border-radius:8px;object-fit:cover;flex-shrink:0}
.module-meta{font-size:.78rem;color:var(--muted)}
.module-item.module-off .module-name{color:var(--muted)}
.module-badge{display:inline-block;margin-left:8px;padding:1px 8px;border-radius:999px;font-size:.7rem;font-weight:600;background:rgba(239,68,68,.12);color:#ef4444;vertical-align:middle}
@@ -85,6 +98,13 @@
.module-item .btn-link.danger:hover{border-color:#ef4444}
#batchModuleModal .hint{font-size:.78rem;color:var(--muted);line-height:1.5;display:block}
#batchModuleModal .hint b{color:var(--text)}
.module-photo-controls{display:flex;flex-direction:column;gap:10px;align-items:flex-start;width:100%}
.module-photo-preview{width:100%;max-height:180px;object-fit:contain;border:1px solid var(--border);border-radius:10px;background:var(--bg)}
.module-photo-actions{display:flex;align-items:center;gap:8px}
.module-photo-pick{text-align:center;cursor:pointer;margin:0}
.module-photo-actions .btn-link.danger{color:#ef4444;border-color:rgba(239,68,68,.35)}
.module-photo-actions .btn-link.danger:hover{border-color:#ef4444}
#moduleModal .hint{font-size:.78rem;color:var(--muted);line-height:1.5;display:block}
@media (max-width:640px){.module-item{flex-direction:column;align-items:flex-start}}
</style>
</body>