Доделал дезигн

This commit is contained in:
Кашин Максим 2023-05-14 19:16:12 +04:00
parent 9afbf32743
commit 10bc9bdb69
15 changed files with 56 additions and 74 deletions

Binary file not shown.

View File

@ -1,4 +1,3 @@
.footer {
position: fixed;
left: 0;

View File

@ -19,7 +19,7 @@
required="true">
</div>
<div class="mb-3">
<button type="submit" class="btn btn-primary button-fixed">
<button type="submit" class="btn btn-outline-dark text-center button-fixed">
<span th:if="${id == null}">Добавить</span>
<span th:if="${id != null}">Обновить</span>
</button>

View File

@ -9,9 +9,9 @@
<body>
<div layout:fragment="content">
<div>
<a sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" class="btn btn-success button-fixed"
<a sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5"
th:href="@{/buyer/edit}">
<i class="fa-solid fa-plus"></i> Добавить
Добавить
</a>
</div>
<div class="table-responsive">
@ -32,15 +32,15 @@
<td th:text="${buyer.buyerSecondName}" style="width: 40%"></td>
<td style="width: 10%">
<div class="btn-group" role="group" aria-label="Basic example">
<a class="btn btn-info button-fixed button-sm" style="min-width: 120px;"
<a class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5" style="min-width: 120px;"
th:href="@{/buyer/info/{id}(id=${buyer.id})}">
<i class="fa fa-info" aria-hidden="true"></i> Инфо
</a>
<a sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" class="btn btn-success button-fixed" style="min-width: 120px;"
<a sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5" style="min-width: 120px;"
th:href="@{/buyer/edit/{id}(id=${buyer.id})}">
<i class="fa fa-pencil" aria-hidden="true"></i> Изменить
</a>
<button sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" type="button" class="btn btn-danger button-fixed button-sm" style="min-width: 120px;"
<button sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" type="button" class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5" style="min-width: 120px;"
th:attr="onclick=|confirm('Удалить запись?') && document.getElementById('remove-${buyer.id}').click()|">
<i class="fa fa-trash" aria-hidden="true"></i> Удалить
</button>

View File

@ -8,11 +8,6 @@
<body>
<div layout:fragment="content" class="mw-100">
<div th:text="${errors}" class="margin-bottom alert-danger"></div>
<div>
<a class="btn btn-secondary button-fixed mx-4 mt-2" th:href="@{/car}">
Назад
</a>
</div>
<div class="d-flex container-fluid ">
<div style="width: 100%;" class="container-fluid">
<form action="#" th:action="@{/car/{id}/buyer(id=*{id})}" method="post" >
@ -27,8 +22,8 @@
</option>
</select>
</div>
<div class="mb-3">
<button sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" type="submit" class="btn btn-primary button-fixed">
<div>
<button sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5">
<span>Добавить</span>
</button>
</div>
@ -49,7 +44,7 @@
<td th:text="${carBuyer.buyerSecondName}"></td>
<td>
<div>
<a sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" type="button" class="m-1 btn btn-danger"
<a sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" type="button" class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5"
th:attr="onclick=|confirm('Удалить запись?') && document.getElementById('remove-${carBuyer.id}').click()|">
<i class="fa fa-trash"></i>
</a>
@ -65,6 +60,11 @@
</table>
</div>
</div>
<div>
<a class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5" th:href="@{/car}">
Назад
</a>
</div>
</div>
</body>
</html>

View File

@ -13,11 +13,11 @@
<input type="text" class="form-control" id="carName" th:field="*{carName}" required="true">
</div>
<div class="mb-3">
<button type="submit" class="btn btn-primary button-fixed">
<button type="submit" class="btn btn-outline-dark text-center button-fixed">
<span th:if="${id == null}">Добавить</span>
<span th:if="${id != null}">Обновить</span>
</button>
<a class="btn btn-secondary button-fixed mx-3" th:href="@{/car}">
<a class="btn btn-secondary button-fixed mx-1" th:href="@{/car}">
Назад
</a>
</div>

View File

@ -8,11 +8,6 @@
<body>
<div layout:fragment="content" class="mw-100">
<div th:text="${errors}" class="margin-bottom alert-danger"></div>
<div>
<a class="btn btn-secondary button-fixed mx-3 mt-2" th:href="@{/car}">
Назад
</a>
</div>
<div style="width: 100%;" class="container-fluid">
<form action="#" th:action="@{/car/{id}/store(id=*{id})}" method="post" class="mb-3">
<div sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" class="mb-3">
@ -25,7 +20,7 @@
</select>
</div>
<div class="mb-3">
<button sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" type="submit" class="btn btn-primary button-fixed">
<button sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5">
<span>Добавить</span>
</button>
</div>
@ -46,7 +41,7 @@
<td th:text="${carStore.price}"></td>
<td>
<div>
<a sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" type="button" class="m-1 btn btn-danger"
<a sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" type="button" class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5"
th:attr="onclick=|confirm('Удалить запись?') && document.getElementById('remove-${carStore.id}').click()|">
<i class="fa fa-trash"></i>
</a>
@ -61,6 +56,11 @@
</tbody>
</table>
</div>
<div>
<a class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5" th:href="@{/car}">
Назад
</a>
</div>
</div>
</div>
</body>

View File

@ -7,7 +7,7 @@
<body>
<div layout:fragment="content">
<div>
<a sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" class="btn btn-success button-fixed"
<a sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5"
th:href="@{/car/edit}">
<i class="fa-solid fa-plus"></i> Добавить
</a>
@ -29,19 +29,19 @@
<td th:text="${car.carName}" style="width: 60%"/>
<td style="width: 10%">
<div class="btn-group" role="group" aria-label="Basic example">
<a class="btn btn-info button-fixed button-sm" style="min-width: 120px;"
<a class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5" style="min-width: 120px;"
th:href="@{/car/edit/{id}?PW=W(id=${car.id})}">
<i class="fa fa-user-secret" aria-hidden="true"></i> Рабочие
<i class="fa fa-user-secret" aria-hidden="true"></i> Покупатели
</a>
<a class="btn btn-success button-fixed button-sm" style="min-width: 120px;"
<a class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5" style="min-width: 120px;"
th:href="@{/car/edit/{id}?PW=P(id=${car.id})}">
<i class="fa fa-tag" aria-hidden="true"></i> Продукты
<i class="fa fa-tag" aria-hidden="true"></i> Магазины
</a>
<a sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" class="btn btn-warning button-fixed button-sm" style="min-width: 120px;"
<a sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5" style="min-width: 120px;"
th:href="@{/car/edit/{id}?PW=N(id=${car.id})}">
<i class="fa fa-pencil" aria-hidden="true"></i> Изм. Имя
<i class="fa fa-pencil" aria-hidden="true"></i> Редактировать
</a>
<button sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" type="button" class="btn btn-danger button-fixed button-sm" style="min-width: 120px;"
<button sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" type="button" class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5" style="min-width: 120px;"
th:attr="onclick=|confirm('Удалить запись?') && document.getElementById('remove-${car.id}').click()|">
<i class="fa fa-trash" aria-hidden="true"></i> Удалить
</button>

View File

@ -4,7 +4,7 @@
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:sec="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8"/>
<title>Работаем с кайфом</title>
<title>Кашин Максим ПИбд-22</title>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<script type="text/javascript" src="/webjars/bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" href="/webjars/bootstrap/5.1.3/css/bootstrap.min.css"/>
@ -12,12 +12,8 @@
<link href="public/styles/style.css"/>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light" style="background-color: #708090;">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="/">
<i class="fa fa-wheelchair fa-spin fa-fw"></i>
Работаем с кайфом
</a>
<button class="navbar-toggler" type="button"
data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
@ -25,8 +21,6 @@
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav" th:with="activeLink=${#requestURI}">
<a class="nav-link" href="/"
th:classappend="${#strings.equals(activeLink, '/')} ? 'active' : ''">Главная</a>
<a class="nav-link" href="/store"
th:classappend="${#strings.equals(activeLink, '/store')} ? 'active' : ''">Магазин</a>
<a class="nav-link" href="/buyer"
@ -47,14 +41,16 @@
</div>
</div>
<footer class="ft d-flex justify-content-center"
style="background-color: #708090;
color: black;
position: absolute;
style=" position: fixed;
left: 0;
bottom: 0;
width: 100vw;">
ООО "Работаем" © 2022
width: 100%;
background-color: #f5f5f5;
color: #333;
text-align: center;
padding: 10px;">
Кашин Максим ПИбд-22
</footer>
</body>
<th:block layout:fragment="scripts">
</th:block>
</html>

View File

@ -5,11 +5,5 @@
<head>
</head>
<body>
<div layout:fragment="content">
<div class = "d-flex justify-content-center"><span text="error"></span></div>
<a href="/">
<img class = "container-fluid" src="2.png">
</a>
</div>
</body>
</html>

View File

@ -5,10 +5,5 @@
<head>
</head>
<body>
<div layout:fragment="content">
<a href="123">
<img class = "container-fluid" src="3.png">
</a>
</div>
</body>
</html>

View File

@ -8,25 +8,23 @@
</head>
<body>
<div layout:fragment="content">
<div th:if="${param.error}" class="alert alert-danger margin-bottom">
<div th:if="${param.error}" class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5">
Пользователь не найден или пароль указан не верно
</div>
<div th:if="${param.logout}" class="alert alert-success margin-bottom">
<div th:if="${param.logout}" class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5">
Выход успешно произведен
</div>
<div th:if="${param.created}" class="alert alert-success margin-bottom">
<div th:if="${param.created}" class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5">
Пользователь '<span th:text="${param.created}"></span>' успешно создан
</div>
<form th:action="@{/login}" method="post" class="w-50 ms-2">
<h2 class="py-3">Вход</h2>
<form th:action="@{/login}" method="post" class="center-m">
<h4>Логин</h4>
<input class="form-control my-2" name="username" id="username" type="text" placeholder="Логин" required="true" autofocus="true"/>
<h4>Пароль</h4>
<input class="form-control my-2" name="password" id="password" type="password" placeholder="Пароль" required="true" />
<div>
<button class="btn btn-primary m-2" type="submit">Войти</button>
<a href="/signup" style="margin-top: 1em; margin-left: 1em"
>Зарегистрируйтесь, если нет аккаунта, здесь</a>
<div class="d-flex justify-content-center">
<button class="btn btn-outline-dark text-center button-fixed">Войти</button>
<a class="btn btn-secondary button-fixed mx-1" href="/signup">Зарегистироваться</a>
</div>
</form>
</div>

View File

@ -20,8 +20,8 @@
placeholder="Пароль (подтверждение)" required="true" minlength="6" maxlength="64"/>
</div>
<div class="mx-4">
<button type="submit" class="btn btn-success button-fixed">Создать</button>
<a class="btn btn-primary button-fixed" href="/login">Назад</a>
<button class="btn btn-outline-dark text-center button-fixed">Создать</button>
<a class="btn btn-secondary button-fixed mx-1" href="/login">Назад</a>
</div>
</form>
</div>

View File

@ -17,7 +17,7 @@
<input type="number" class="form-control" id="price" th:field="*{price}" required="true">
</div>
<div class="mb-3">
<button type="submit" class="btn btn-primary button-fixed">
<button type="submit" class="btn btn-outline-dark text-center button-fixed">
<span th:if="${id == null}">Добавить</span>
<span th:if="${id != null}">Обновить</span>
</button>

View File

@ -7,7 +7,7 @@
<body>
<div layout:fragment="content">
<div>
<a sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" class="btn btn-success button-fixed"
<a sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5"
th:href="@{/store/edit}">
<i class="fa-solid fa-plus"></i> Добавить
</a>
@ -30,15 +30,15 @@
<td th:text="${store.price}" style="width: 40%"></td>
<td style="width: 10%">
<div class="btn-group" role="group" aria-label="Basic example">
<a class="btn btn-info button-fixed button-sm" style="min-width: 120px;"
<a class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5" style="min-width: 120px;"
th:href="@{/store/info/{id}(id=${store.id})}">
<i class="fa fa-info" aria-hidden="true"></i> Инфо
</a>
<a sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" class="btn btn-warning button-fixed button-sm" style="min-width: 120px;"
<a sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5" style="min-width: 120px;"
th:href="@{/store/edit/{id}(id=${store.id})}">
<i class="fa fa-pencil" aria-hidden="true"></i> Изменить
</a>
<button sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" type="button" class="btn btn-danger button-fixed button-sm" style="min-width: 120px;"
<button sec:authorize="isAuthenticated() and hasRole('ROLE_ADMIN')" type="button" class="btn btn-outline-dark text-center d-flex justify-content-md-center mx-5" style="min-width: 120px;"
th:attr="onclick=|confirm('Удалить запись?') && document.getElementById('remove-${store.id}').click()|">
<i class="fa fa-trash" aria-hidden="true"></i> Удалить
</button>