Learn: drag handles on the left, chapters always expanded

This commit is contained in:
2026-09-17 19:56:35 +03:00
parent a4ea358d27
commit 65b94f11cb
3 changed files with 183 additions and 181 deletions

View File

@@ -246,19 +246,20 @@ code.code { padding: 0.125rem 0.5rem; border-radius: 0.25rem; font-family: monos
.chip-neg { background: #b3283b; color: #fff; }
/* Defense timer */
/* Accordion (главы/разделы в /learn) */
details.accordion > summary.acc-head { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
details.accordion > summary::-webkit-details-marker { display: none; }
details.accordion[open] > .acc-head, details.accordion > summary { margin-bottom: 0; }
.acc-arrow { width: 10px; height: 10px; border-right: 2px solid var(--c-text-muted); border-bottom: 2px solid var(--c-text-muted); transform: rotate(45deg); transition: transform 0.2s; margin-left: .75rem;}
details.accordion[open] > summary > .acc-arrow { transform: rotate(-135deg); }
.acc-title { margin: 0; font-size: 1.0625rem; }
.acc-body { border-top: 1px solid var(--c-border); }
details.sub-acc > summary.sub-head { list-style: none; cursor: pointer; }
/* Материалы: ряды и ручки перетаскивания слева, одним столбцом */
.sort-row { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.sort-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sort-actions { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.sort-list { list-style: none; margin: 0; padding: 0; }
.sort-list > li { display: flex; align-items: center; gap: 0.5rem; min-width: 0; padding: 0.15rem 0; }
.chapter-card { padding: 0.75rem 1rem; }
details.sub-acc { margin-top: 0.25rem; border-top: 1px solid var(--c-border); }
[data-section-list] > details.sub-acc:first-of-type { border-top: none; }
details.sub-acc > summary.sub-head { list-style: none; cursor: pointer; padding: 0.4rem 0; }
details.sub-acc > summary::-webkit-details-marker { display: none; }
.sub-arrow { display: inline-block; width: 8px; height: 8px; border-right: 2px solid var(--c-text-muted); border-bottom: 2px solid var(--c-text-muted); transform: rotate(45deg); transition: transform 0.2s; margin-right: 6px; vertical-align: 2px;}
.sub-arrow { flex: 0 0 auto; width: 8px; height: 8px; border-right: 2px solid var(--c-text-muted); border-bottom: 2px solid var(--c-text-muted); transform: rotate(45deg); transition: transform 0.2s; }
details.sub-acc[open] > summary .sub-arrow { transform: rotate(-135deg); }
.sub-actions { margin: 0 0 2px 18px; }
.section-body { padding-bottom: 0.4rem; }
/* ---- Матрица группы и карточки защиты ---- */
.m-0 { margin: 0; }
@@ -351,8 +352,9 @@ th.th-filterable { padding-bottom: 0.35rem; }
/* drag & drop материалов */
.drag-handle {
display: inline-block; flex: 0 0 auto; width: 1.5rem; text-align: center;
cursor: grab; user-select: none; color: var(--c-text-muted);
font-size: 1rem; line-height: 1; padding: 0.15rem 0.3rem; border-radius: 0.35rem;
font-size: 1rem; line-height: 1; padding: 0.15rem 0; border-radius: 0.35rem;
}
.drag-handle:hover { background: var(--c-bg); color: var(--c-text); }
.drag-handle:active { cursor: grabbing; }