Files
LMS/web/src/main/resources/templates/fragments/base.html
Vladislav Kopnin b48cf1d1e3 Refactor web UI: CSS classes only, no inline styles; fix footer; add full lab1.zip
- Replace all inline style= with reusable CSS classes
- Add layout classes: page, page-header, page-main, page-footer
- Fix footer at bottom via flex column + flex:1 on main
- Remove jsessionid from static resource URLs
- Create lab1-full.zip with 30 variants from PDF metodichka
- All templates use CSS var classes for light/dark theme
2026-09-10 21:29:10 +03:00

39 lines
1.8 KiB
HTML

<!DOCTYPE html>
<html lang="ru" xmlns:th="http://www.thymeleaf.org" th:fragment="layout(title, content)">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title th:replace="${title}">LMS</title>
<link rel="stylesheet" th:href="@{/css/app.css}">
<script th:src="@{/js/htmx.min.js}" defer></script>
<script>
(function(){ var t = localStorage.getItem('lms-theme') || 'light'; document.documentElement.setAttribute('data-theme', t); })();
function toggleTheme(){ var e=document.documentElement; var t=e.getAttribute('data-theme')==='dark'?'light':'dark'; e.setAttribute('data-theme',t); localStorage.setItem('lms-theme',t); }
</script>
</head>
<body>
<div class="page">
<header class="page-header">
<div class="page-header-inner">
<a th:href="@{/}" class="logo">LMS</a>
<nav class="nav" th:if="${currentUser != null}">
<a th:if="${currentUser.admin}" th:href="@{/admin}" class="nav-link">Панель</a>
<a th:if="${currentUser.admin}" th:href="@{/admin/groups}" class="nav-link">Группы</a>
<a th:if="${currentUser.admin}" th:href="@{/admin/labs}" class="nav-link">Лабораторные</a>
<span class="nav-sep" th:text="${currentUser.name}">—</span>
<button onclick="toggleTheme()" class="btn btn-secondary btn-sm">☀/🌙</button>
<form th:action="@{/logout}" method="post">
<button class="btn btn-secondary" type="submit">Выйти</button>
</form>
</nav>
</div>
</header>
<main class="page-main">
<th:block th:replace="${content}" />
</main>
<footer class="page-footer">
LMS v0.1.1
</footer>
</div>
</body>
</html>