diff --git a/web/src/main/resources/static/css/app.css b/web/src/main/resources/static/css/app.css index e8429e5..03bf3a2 100644 --- a/web/src/main/resources/static/css/app.css +++ b/web/src/main/resources/static/css/app.css @@ -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; } diff --git a/web/src/main/resources/templates/learn/chapter.html b/web/src/main/resources/templates/learn/chapter.html index bb9765b..bce40ee 100644 --- a/web/src/main/resources/templates/learn/chapter.html +++ b/web/src/main/resources/templates/learn/chapter.html @@ -35,8 +35,8 @@
- Перетаскивайте разделы и статьи за значок ⠿, чтобы менять порядок и переносить статьи между - разделами этой главы. Порядок сохраняется сразу. + Перетаскивайте за значок ⠿ слева, чтобы менять порядок разделов и переносить статьи + между разделами этой главы. Порядок сохраняется сразу.
-
-
-
-

- ⠿ - Раздел - скрыто -

-
- -
- - - - - -
- -
- - - -
-
-
- - + +
+ + + +
+
+
+ + + @@ -145,7 +149,7 @@ - + diff --git a/web/src/main/resources/templates/learn/index.html b/web/src/main/resources/templates/learn/index.html index 259f07a..c6a52c9 100644 --- a/web/src/main/resources/templates/learn/index.html +++ b/web/src/main/resources/templates/learn/index.html @@ -13,9 +13,8 @@
Режим администратора: скрытые главы, разделы и статьи помечены значком «скрыто» - и видны только вам. Кнопка-значок публикует материал для студентов или снова скрывает его. - Перетаскивайте за значок ⠿, чтобы менять порядок глав, разделов и статей, а также - переносить разделы в другую главу и статьи — в другой раздел. + и видны только вам. Перетаскивайте за значок ⠿ слева, чтобы менять порядок глав, разделов + и статей, а также переносить разделы в другую главу и статьи — в другой раздел.
-
- -

Глава

- -
-
-
-

- Глава - скрыто -

-
- ⠿ -
- - - - -
- -
- - -
-
+
+
+ ⠿ +

Глава

+ скрыто +
+
+ + + + +
+ +
+ + +
+
-

Разделов пока нет

+
+

Разделов пока нет

-
- -

- - Раздел - скрыто -

+
+ + ⠿ + + Раздел + скрыто -
-
-
- ⠿ -
- - - - -
- - -
- - -
-
-
-
    -
  • - Статья - скрыто - - ⠿ -
    +
    +
    +
    + - - + + + th:classappend="${section.published} ? 'btn-secondary' : 'btn-primary'" + th:text="${section.published} ? 'Скрыть раздел' : 'Опубликовать раздел'">Скрыть раздел - Править -
    + + + - +
    - -
  • -
  • Статей пока нет
  • -
+
+
+ +
    +
  • + ⠿ + Статья + скрыто +
    +
    + + + + +
    + Править +
    + + +
    +
    +
  • +
  • Статей пока нет
  • +
+
@@ -165,25 +160,26 @@
- - - - - - - + + + + + + + +