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
This commit is contained in:
@@ -1,59 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru" xmlns:th="http://www.thymeleaf.org"
|
||||
th:replace="~{fragments/base :: layout(~{::title}, ~{::#content})}">
|
||||
<html lang="ru" xmlns:th="http://www.thymeleaf.org" th:replace="~{fragments/base :: layout(~{::title}, ~{::#content})}">
|
||||
<head><title>Группы — LMS</title></head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<h1 style="margin:0 0 1.5rem;font-size:1.5rem;font-weight:600;">Группы</h1>
|
||||
|
||||
<div th:if="${notice}" style="margin-bottom:1rem;padding:0.75rem 1rem;border-radius:0.5rem;font-size:0.875rem;background:#dcfce7;color:#166534;" th:text="${notice}"></div>
|
||||
<div th:if="${error}" style="margin-bottom:1rem;padding:0.75rem 1rem;border-radius:0.5rem;font-size:0.875rem;background:#fef2f2;color:#991b1b;" th:text="${error}"></div>
|
||||
|
||||
<div style="display:grid;gap:1rem;grid-template-columns:repeat(auto-fill,minmax(22rem,1fr));">
|
||||
<form class="card" style="padding:1.5rem;display:flex;flex-direction:column;gap:1rem;" th:action="@{/admin/groups}" method="post">
|
||||
<h2 style="margin:0;font-size:1.125rem;font-weight:500;">Создать группу</h2>
|
||||
<div>
|
||||
<label class="label" for="name">Название</label>
|
||||
<input class="input" id="name" name="name" placeholder="ПИ-11БО" required>
|
||||
</div>
|
||||
<h1 class="page-title">Группы</h1>
|
||||
<div th:if="${notice}" class="alert alert-success" th:text="${notice}"></div>
|
||||
<div th:if="${error}" class="alert alert-error" th:text="${error}"></div>
|
||||
<div class="grid grid-2">
|
||||
<form class="card form-card form-stack" th:action="@{/admin/groups}" method="post">
|
||||
<h2 class="section-title">Создать группу</h2>
|
||||
<div><label class="label" for="name">Название</label><input class="input" id="name" name="name" placeholder="ПИ-11БО" required></div>
|
||||
<button class="btn btn-primary" type="submit">Создать</button>
|
||||
</form>
|
||||
|
||||
<form class="card" style="padding:1.5rem;display:flex;flex-direction:column;gap:1rem;" th:action="@{/admin/groups/import}" method="post" enctype="multipart/form-data">
|
||||
<h2 style="margin:0;font-size:1.125rem;font-weight:500;">Импорт студентов</h2>
|
||||
<p style="margin:0;font-size:0.875rem;color:var(--c-text-muted);">
|
||||
Файл .xls, .xlsx или .csv со столбцами: студенческий номер, ФИО, основа обучения.
|
||||
</p>
|
||||
<div>
|
||||
<label class="label" for="file">Файл со списком</label>
|
||||
<input class="input" id="file" name="file" type="file" accept=".xls,.xlsx,.csv" required>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label" for="groupName">Название группы (необязательно)</label>
|
||||
<input class="input" id="groupName" name="name" placeholder="Возьмём из файла">
|
||||
</div>
|
||||
<form class="card form-card form-stack" th:action="@{/admin/groups/import}" method="post" enctype="multipart/form-data">
|
||||
<h2 class="section-title">Импорт студентов</h2>
|
||||
<p class="text-sm text-muted">Файл .xls, .xlsx или .csv со столбцами: студенческий номер, ФИО, основа обучения.</p>
|
||||
<div><label class="label" for="file">Файл со списком</label><input class="input" id="file" name="file" type="file" accept=".xls,.xlsx,.csv" required></div>
|
||||
<div><label class="label" for="groupName">Название группы (необязательно)</label><input class="input" id="groupName" name="name" placeholder="Возьмём из файла"></div>
|
||||
<button class="btn btn-primary" type="submit">Импортировать</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card" style="margin-top:2rem;padding:0;">
|
||||
<div class="card card-flush mt-8">
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Название</th><th>Студентов</th><th>Выгрузка</th></tr>
|
||||
</thead>
|
||||
<thead><tr><th>Название</th><th>Студентов</th><th>Выгрузка</th></tr></thead>
|
||||
<tbody>
|
||||
<tr th:each="group : ${groups}">
|
||||
<td><a th:href="@{/admin/groups/{id}(id=${group.id})}" th:text="${group.name}">—</a></td>
|
||||
<td th:text="${group.studentCount}">0</td>
|
||||
<td>
|
||||
<a th:href="@{/admin/groups/{id}/credentials(id=${group.id}, format='xlsx')}">XLSX</a>
|
||||
<span style="margin:0 0.5rem;color:var(--c-text-muted);">·</span>
|
||||
<a th:href="@{/admin/groups/{id}/credentials(id=${group.id}, format='csv')}">CSV</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr th:if="${#lists.isEmpty(groups)}">
|
||||
<td colspan="3" style="text-align:center;color:var(--c-text-muted);padding:1.5rem;">Групп пока нет.</td>
|
||||
<td><a th:href="@{/admin/groups/{id}/credentials(id=${group.id}, format='xlsx')}">XLSX</a><span class="nav-sep ml-2">·</span><a class="ml-2" th:href="@{/admin/groups/{id}/credentials(id=${group.id}, format='csv')}">CSV</a></td>
|
||||
</tr>
|
||||
<tr th:if="${#lists.isEmpty(groups)}"><td colspan="3" class="empty">Групп пока нет.</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user