Mobile sidebar nav (burger, overlay, Esc), bigger bolder accordion arrow, text/arrow centering, nav active on both menus

This commit is contained in:
2026-10-02 22:52:58 +03:00
parent df919507d7
commit 6c560fdd80
11 changed files with 161 additions and 71 deletions

View File

@@ -344,7 +344,7 @@
<div class="modal-body" id="assign-modal-body"></div>
</dialog>
<script th:src="@{/js/admin-group.js(v='13')}" defer></script>
<script th:src="@{/js/admin-group.js(v='14')}" defer></script>
</div>
</body>
</html>

View File

@@ -196,7 +196,7 @@
</dialog>
</th:block>
</div>
<script th:src="@{/js/admin-lab.js(v='13')}" defer></script>
<script th:src="@{/js/admin-lab.js(v='14')}" defer></script>
</div>
</body>
</html>

View File

@@ -15,17 +15,17 @@
</noscript>
<link rel="icon" type="image/svg+xml" th:href="@{/favicon.svg(v='2')}">
<!-- v=4: сброс кэша стилей после редизайна; при изменении css поднимать версию -->
<link rel="stylesheet" th:href="@{/css/app.css(v='13')}">
<link id="hljs-light" rel="stylesheet" th:href="@{/css/hljs-github.css(v='13')}">
<link id="hljs-dark" rel="stylesheet" th:href="@{/css/hljs-github-dark.css(v='13')}" disabled>
<script th:src="@{/js/highlight.min.js(v='13')}" defer></script>
<script th:src="@{/js/table-scroll.js(v='13')}" defer></script>
<script th:src="@{/js/tablekit.js(v='13')}" defer></script>
<script th:src="@{/js/theme-init.js(v='13')}"></script>
<script th:src="@{/js/app.js(v='13')}" defer></script>
<script th:src="@{/js/ui-state.js(v='13')}" defer></script>
<script th:src="@{/js/md-content.js(v='13')}" defer></script>
<script th:src="@{/js/submit-guard.js(v='13')}" defer></script>
<link rel="stylesheet" th:href="@{/css/app.css(v='14')}">
<link id="hljs-light" rel="stylesheet" th:href="@{/css/hljs-github.css(v='14')}">
<link id="hljs-dark" rel="stylesheet" th:href="@{/css/hljs-github-dark.css(v='14')}" disabled>
<script th:src="@{/js/highlight.min.js(v='14')}" defer></script>
<script th:src="@{/js/table-scroll.js(v='14')}" defer></script>
<script th:src="@{/js/tablekit.js(v='14')}" defer></script>
<script th:src="@{/js/theme-init.js(v='14')}"></script>
<script th:src="@{/js/app.js(v='14')}" defer></script>
<script th:src="@{/js/ui-state.js(v='14')}" defer></script>
<script th:src="@{/js/md-content.js(v='14')}" defer></script>
<script th:src="@{/js/submit-guard.js(v='14')}" defer></script>
</head>
<body>
<div class="page">
@@ -41,6 +41,10 @@
<a th:href="@{/change-password}" class="nav-link">Смена пароля</a>
</th:block>
</nav>
<button type="button" id="nav-burger" class="btn btn-secondary btn-sm nav-burger"
aria-label="Меню" aria-expanded="false">
<span class="ico ico-menu"></span>
</button>
<div class="user">
<th:block th:if="${currentUser != null}">
<a th:href="@{/admin}" th:if="${currentUser.admin}" class="nav-user" th:text="${currentUser.name}" title="Личный кабинет">—</a>
@@ -58,6 +62,36 @@
</div>
</div>
</header>
<div id="mobile-nav-overlay" class="mobile-nav-overlay" hidden></div>
<nav id="mobile-nav" class="mobile-nav" aria-label="Меню">
<div class="mobile-nav-head">
<span class="logo">LMS<b>.</b></span>
<button class="modal-close mobile-nav-close" type="button" aria-label="Закрыть меню">✕</button>
</div>
<div class="mobile-nav-links nav">
<th:block th:if="${currentUser != null}">
<a th:if="${currentUser.admin}" th:href="@{/admin/groups}" class="nav-link">Группы</a>
<a th:if="${currentUser.admin}" th:href="@{/admin/users}" class="nav-link">Пользователи</a>
<a th:if="${currentUser.admin}" th:href="@{/admin/labs}" class="nav-link">Лабораторные</a>
<a th:unless="${currentUser.admin}" th:href="@{/student/labs}" class="nav-link">Лабораторные</a>
<a th:href="@{/change-password}" class="nav-link">Смена пароля</a>
</th:block>
</div>
<div class="mobile-nav-user">
<th:block th:if="${currentUser != null}">
<a th:href="@{/admin}" th:if="${currentUser.admin}" class="nav-user" th:text="${currentUser.name}" title="Личный кабинет">—</a>
<a th:href="@{/student}" th:unless="${currentUser.admin}" class="nav-user" th:text="${currentUser.name}" title="Личный кабинет">—</a>
</th:block>
<button type="button" class="btn btn-secondary btn-sm theme-btn" aria-label="Сменить тему" title="Сменить тему">
<span class="ico ico-theme"></span>
</button>
<form th:if="${currentUser != null}" th:action="@{/logout}" method="post">
<button class="btn btn-secondary btn-sm" type="submit">Выйти</button>
<input type="hidden" name="_csrf" th:value="${csrfToken}">
</form>
</div>
</nav>
<main class="page-main">
<th:block th:replace="${content}" />
</main>

View File

@@ -124,7 +124,7 @@
</div>
<script th:src="@{/js/mdeditor.js(v='13')}" defer></script>
<script th:src="@{/js/mdeditor.js(v='14')}" defer></script>
</div>
</body>
</html>

View File

@@ -183,7 +183,7 @@
</div>
</dialog>
<script th:src="@{/js/content-sort.js(v='13')}" defer></script>
<script th:src="@{/js/content-sort.js(v='14')}" defer></script>
</div>
</body>
</html>

View File

@@ -232,8 +232,8 @@
</div>
</dialog>
<script th:src="@{/js/mdeditor.js(v='13')}" defer></script>
<script th:src="@{/js/content-sort.js(v='13')}" defer></script>
<script th:src="@{/js/mdeditor.js(v='14')}" defer></script>
<script th:src="@{/js/content-sort.js(v='14')}" defer></script>
</div>
</body>
</html>

View File

@@ -143,7 +143,7 @@
</div>
</dialog>
<script th:src="@{/js/content-sort.js(v='13')}" defer></script>
<script th:src="@{/js/content-sort.js(v='14')}" defer></script>
</div>
</body>
</html>

View File

@@ -107,7 +107,7 @@
<p class="text-sm text-muted">Ожидайте преподавателя с проверкой.</p>
</div>
</div>
<script th:src="@{/js/defense-timer.js(v='13')}" defer></script>
<script th:src="@{/js/defense-timer.js(v='14')}" defer></script>
</div>
</body>
</html>