fix: unify group matrix typography and dashboard order

- use one 12px font size for all matrix cell text
- center average score values while keeping the header left-aligned
- swap Groups and Labs panels on the admin dashboard
This commit is contained in:
2026-10-26 19:49:22 +03:00
parent 7fb3e13548
commit e2e3ed1eaf
3 changed files with 33 additions and 23 deletions

View File

@@ -467,7 +467,7 @@ code.code { padding: 0.125rem 0.5rem; border-radius: var(--radius-xs); font-fami
.variant-btn.manual .cell-none { font-weight: 600; } .variant-btn.manual .cell-none { font-weight: 600; }
.score-link { .score-link {
display: inline-block; padding: 0; border: none; background: none; display: inline-block; padding: 0; border: none; background: none;
font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums;
color: var(--c-text); cursor: pointer; color: var(--c-text); cursor: pointer;
} }
.score-link:hover { color: var(--c-accent); text-decoration: underline; } .score-link:hover { color: var(--c-accent); text-decoration: underline; }
@@ -555,7 +555,17 @@ dialog.dlg.dlg-lg .dlg-body { max-height: 88vh; min-height: 62vh; }
font-size: 0.75rem; font-weight: 500; color: var(--c-text-muted); font-size: 0.75rem; font-weight: 500; color: var(--c-text-muted);
background: var(--c-surface); white-space: nowrap; background: var(--c-surface); white-space: nowrap;
} }
.matrix td { vertical-align: middle; padding: 1rem; } .matrix td { vertical-align: middle; padding: 1rem; font-size: 0.75rem; }
#group-table td .student-name,
#group-table td .score-link,
#group-table td .attestation-select,
#group-table td .cell-sub,
#group-table td .sub-link,
#group-table td .cell-btn.st,
#group-table td .font-mono,
#group-table td .mini-count,
#group-table td .badge,
#group-table td .btn { font-size: 0.75rem; }
/* Непрозрачный фон обязателен: закреплённый столбец не должен просвечивать при прокрутке. */ /* Непрозрачный фон обязателен: закреплённый столбец не должен просвечивать при прокрутке. */
.matrix tbody tr:hover td { background: var(--c-row-hover); } .matrix tbody tr:hover td { background: var(--c-row-hover); }
.matrix tbody tr:hover td.matrix-sticky { background: var(--c-row-hover); } .matrix tbody tr:hover td.matrix-sticky { background: var(--c-row-hover); }
@@ -569,7 +579,7 @@ dialog.dlg.dlg-lg .dlg-body { max-height: 88vh; min-height: 62vh; }
#group-table td.actions-cell { border-left: 1px solid var(--c-border); } #group-table td.actions-cell { border-left: 1px solid var(--c-border); }
.matrix th.attestation-col, .matrix th.attestation-col,
.matrix td.attestation-cell { .matrix td.attestation-cell {
width: 10rem; min-width: 9.5rem; max-width: 10rem; width: 10.5rem; min-width: 10rem; max-width: 10.5rem;
padding-left: 0.35rem; padding-right: 0.35rem; padding-left: 0.35rem; padding-right: 0.35rem;
border-left: 1px solid var(--c-border); border-left: 1px solid var(--c-border);
} }
@@ -577,7 +587,7 @@ dialog.dlg.dlg-lg .dlg-body { max-height: 88vh; min-height: 62vh; }
.matrix td.average-cell { .matrix td.average-cell {
min-width: 7rem; border-left: 1px solid var(--c-border); text-align: left; min-width: 7rem; border-left: 1px solid var(--c-border); text-align: left;
} }
.matrix td.average-cell { font-weight: 600; } .matrix td.average-cell { font-weight: 600; text-align: center; }
.matrix th.password-col, .matrix th.password-col,
.matrix td.password-cell { border-left: 1px solid var(--c-border); } .matrix td.password-cell { border-left: 1px solid var(--c-border); }
.attestation-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; width: 100%; max-width: 9rem; text-align: left; } .attestation-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; width: 100%; max-width: 9rem; text-align: left; }
@@ -589,7 +599,7 @@ dialog.dlg.dlg-lg .dlg-body { max-height: 88vh; min-height: 62vh; }
width: 100%; max-width: 100%; min-width: 0; padding: 0.15rem 0.95rem 0.15rem 0.15rem; width: 100%; max-width: 100%; min-width: 0; padding: 0.15rem 0.95rem 0.15rem 0.15rem;
border: 1px solid transparent; border-radius: var(--radius-sm); border: 1px solid transparent; border-radius: var(--radius-sm);
background-color: transparent; color: var(--c-text); background-color: transparent; color: var(--c-text);
font-size: 0.7rem; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums;
text-align: left; text-align-last: left; cursor: pointer; text-align: left; text-align-last: left; cursor: pointer;
background-image: background-image:
linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(45deg, transparent 50%, currentColor 50%),

View File

@@ -16,23 +16,6 @@
</div> </div>
<div class="row g-4 mt-4"> <div class="row g-4 mt-4">
<div class="col-lg-6">
<div class="flex items-center justify-between mb-4">
<h2 class="section-title m-0">Лабораторные</h2>
<a th:href="@{/admin/labs}" class="text-sm">Все лабораторные →</a>
</div>
<div class="card card-flush">
<table>
<tbody>
<tr th:each="lab : ${labs}">
<td><a th:href="@{/admin/labs/{id}(id=${lab.id})}" th:text="|ЛР ${lab.number}. ${lab.title}|">—</a></td>
<td class="text-muted" th:text="${lab.variantCount} + ' вар.'">—</td>
</tr>
<tr th:if="${#lists.isEmpty(labs)}"><td class="empty">Лабораторных нет.</td></tr>
</tbody>
</table>
</div>
</div>
<div class="col-lg-6"> <div class="col-lg-6">
<div class="flex items-center justify-between mb-4"> <div class="flex items-center justify-between mb-4">
<h2 class="section-title m-0">Группы</h2> <h2 class="section-title m-0">Группы</h2>
@@ -50,6 +33,23 @@
</table> </table>
</div> </div>
</div> </div>
<div class="col-lg-6">
<div class="flex items-center justify-between mb-4">
<h2 class="section-title m-0">Лабораторные</h2>
<a th:href="@{/admin/labs}" class="text-sm">Все лабораторные →</a>
</div>
<div class="card card-flush">
<table>
<tbody>
<tr th:each="lab : ${labs}">
<td><a th:href="@{/admin/labs/{id}(id=${lab.id})}" th:text="|ЛР ${lab.number}. ${lab.title}|">—</a></td>
<td class="text-muted" th:text="${lab.variantCount} + ' вар.'">—</td>
</tr>
<tr th:if="${#lists.isEmpty(labs)}"><td class="empty">Лабораторных нет.</td></tr>
</tbody>
</table>
</div>
</div>
</div> </div>
</div> </div>
</body> </body>

View File

@@ -17,7 +17,7 @@
<!-- v=37: сброс кэша стилей после изменения геометрии; при изменении css поднимать версию --> <!-- v=37: сброс кэша стилей после изменения геометрии; при изменении css поднимать версию -->
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}"> <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
<link rel="stylesheet" th:href="@{/css/bootstrap-icons.min.css}"> <link rel="stylesheet" th:href="@{/css/bootstrap-icons.min.css}">
<link rel="stylesheet" th:href="@{/css/app.css(v='47')}"> <link rel="stylesheet" th:href="@{/css/app.css(v='49')}">
<link id="hljs-light" rel="stylesheet" th:href="@{/css/hljs-github.css(v='36')}"> <link id="hljs-light" rel="stylesheet" th:href="@{/css/hljs-github.css(v='36')}">
<link id="hljs-dark" rel="stylesheet" th:href="@{/css/hljs-github-dark.css(v='36')}" disabled> <link id="hljs-dark" rel="stylesheet" th:href="@{/css/hljs-github-dark.css(v='36')}" disabled>
<script th:src="@{/js/highlight.min.js(v='36')}" defer></script> <script th:src="@{/js/highlight.min.js(v='36')}" defer></script>