html: вход, регистрация, дефолт и начало категорий
This commit is contained in:
parent
61f0899395
commit
793f596fa4
@ -5,8 +5,9 @@
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
<!-- <link rel="image" type="image/svg+xml" src="../public/images/logo_livecinema.png" /> -->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<link rel="image" src="../static/images/logo_livecinema.png">
|
||||||
|
<meta name=" viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title layout:title-pattern="$LAYOUT_TITLE - $CONTENT_TITLE">LiveCinema</title>
|
<title layout:title-pattern="$LAYOUT_TITLE - $CONTENT_TITLE">LiveCinema</title>
|
||||||
<script type="text/javascript" src="/webjars/bootstrap/5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
<script type="text/javascript" src="/webjars/bootstrap/5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
<link rel="stylesheet" href="/webjars/bootstrap/5.3.3/dist/css/bootstrap.min.css" />
|
<link rel="stylesheet" href="/webjars/bootstrap/5.3.3/dist/css/bootstrap.min.css" />
|
||||||
@ -14,12 +15,12 @@
|
|||||||
<link rel="stylesheet" href="/css/style.css" />
|
<link rel="stylesheet" href="/css/style.css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="h-100 d-flex flex-column">
|
<body class="">
|
||||||
<nav expand='md' data-bs-theme='dark' class='my-navbar'>>
|
<nav expand="md" data-bs-theme="dark" class="my-navbar">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<a class="navbar-brand" href="/">
|
<a class="navbar-brand" href="/">
|
||||||
<!-- <i class="bi bi-cart2 d-inline-block align-top me-1 logo"></i> -->
|
<!-- <i class="bi bi-cart2 d-inline-block align-top me-1 logo"></i> -->
|
||||||
<img src="backend\src\main\resources\public\images\logo_livecinema.png" alt="" className='logo' />
|
<img src="../static/images/logo_livecinema.png" alt="" class="logo" />
|
||||||
LiveCinema
|
LiveCinema
|
||||||
</a>
|
</a>
|
||||||
<th:block sec:authorize="isAuthenticated()" th:with="userName=${#authentication.name}">
|
<th:block sec:authorize="isAuthenticated()" th:with="userName=${#authentication.name}">
|
||||||
@ -30,20 +31,18 @@
|
|||||||
<div class="collapse navbar-collapse" id="main-navbar">
|
<div class="collapse navbar-collapse" id="main-navbar">
|
||||||
<ul class="navbar-nav me-auto link" th:with="activeLink=${#objects.nullSafe(servletPath, '')}">
|
<ul class="navbar-nav me-auto link" th:with="activeLink=${#objects.nullSafe(servletPath, '')}">
|
||||||
<th:block sec:authorize="hasRole('ADMIN')">
|
<th:block sec:authorize="hasRole('ADMIN')">
|
||||||
<a class="nav-link" href="/admin/movies"
|
<a class="nav-link" href="/admin/movies" th:classappend="${activeLink.startsWith('/admin/movies')
|
||||||
th:classappend="${activeLink.startsWith('/admin/movies') ? 'active' : ''}">
|
? 'active' : '' }">
|
||||||
Фильмы
|
Фильмы
|
||||||
</a>
|
</a>
|
||||||
<a class="nav-link" href="/admin/type"
|
|
||||||
th:classappend="${activeLink.startsWith('/admin/type') ? 'active' : ''}">
|
|
||||||
Типы заказов
|
|
||||||
</a>
|
|
||||||
<a class="nav-link" href="/admin/subscription"
|
|
||||||
th:classappend="${activeLink.startsWith('/admin/subscription') ? 'active' : ''}">
|
|
||||||
Списки рассылки
|
|
||||||
</a>
|
|
||||||
<a class="nav-link" href="/h2-console/" target="_blank">Консоль H2</a>
|
<a class="nav-link" href="/h2-console/" target="_blank">Консоль H2</a>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
<a class="nav-link" href="/categories"
|
||||||
|
th:classappend="${activeLink.startsWith('/movies') ? 'active' : '' }"></a>
|
||||||
|
<a class="nav-link" href="/login"
|
||||||
|
th:classappend="${activeLink.startsWith('/login') ? 'active' : '' }"></a>
|
||||||
|
<a class="nav-link" href="/signup"
|
||||||
|
th:classappend="${activeLink.startsWith('/signup') ? 'active' : '' }"></a>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="navbar-nav" th:if="${not #strings.isEmpty(userName)}">
|
<ul class="navbar-nav" th:if="${not #strings.isEmpty(userName)}">
|
||||||
<form th:action="@{/logout}" method="post">
|
<form th:action="@{/logout}" method="post">
|
||||||
@ -56,7 +55,7 @@
|
|||||||
</th:block>
|
</th:block>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<main class="container-fluid p-2" layout:fragment="content">
|
<main class="w-100 flex-fill d-flex justify-content-center p-0 m-0" layout:fragment="content">
|
||||||
</main>
|
</main>
|
||||||
<footer class="my-footer mt-auto d-flex flex-shrink-0 justify-content-center align-items-center">
|
<footer class="my-footer mt-auto d-flex flex-shrink-0 justify-content-center align-items-center">
|
||||||
Бакальская Е.Д. (@)LiveCinema [[${#dates.year(#dates.createNow())}]]. Все права защищены
|
Бакальская Е.Д. (@)LiveCinema [[${#dates.year(#dates.createNow())}]]. Все права защищены
|
||||||
|
@ -0,0 +1,48 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ru" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{default}">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Вход</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<main layout:fragment="content" class='main-bg-into d-flex flex-fill'>
|
||||||
|
<form action="#" th:action="@{/login}" method="post"
|
||||||
|
class="body flex-fill d-flex flex-column justify-content-around align-items-center" id="into-page">
|
||||||
|
|
||||||
|
<p class="text-label mt-4 d-flex flex-column align-items-center align-content-center">
|
||||||
|
Имя пользователя / электронная почта
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="mb-2 w-50">
|
||||||
|
<input id="login" class="form-control" placeholder="Имя пользователя / Эл. Почта" type="email"
|
||||||
|
name='login' required minlength="3" maxlength="50">
|
||||||
|
</input>
|
||||||
|
<p th:if="${param.error}" class="error mt-2">
|
||||||
|
Введите правильное имя пользователя
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="text-label d-flex flex-column align-items-center">
|
||||||
|
Пароль
|
||||||
|
</p>
|
||||||
|
<div class="mb-2 w-50">
|
||||||
|
<input id="password" class="form-control" placeholder="Пароль" type="password" name='password' required
|
||||||
|
minlength="4" maxlength="20">
|
||||||
|
</input>
|
||||||
|
<p th:if="${param.error}" class="error mt-2">
|
||||||
|
Введите верный пароль
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-4 h-25 d-flex flex-column justify-content-center mb-4">
|
||||||
|
<a class="btn btn-secondary button-fixed-width" href="/signup">Регистрация</a>
|
||||||
|
<button type="submit" class="btn btn-light">Войти</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
62
backend/src/main/resources/templates/signup.html
Normal file
62
backend/src/main/resources/templates/signup.html
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ru" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{default}">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Регистрация</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="d-flex flex-column">
|
||||||
|
<main layout:fragment="content">
|
||||||
|
<form action="#" th:action="@{/signup}" th:object="${user}" method="post" class="flex-fill d-flex"
|
||||||
|
id="login-page">
|
||||||
|
|
||||||
|
<div class="container d-flex flex-column justify-content-center align-items-center">
|
||||||
|
|
||||||
|
<p class="input-fill mt-4 d-flex flex-column align-items-center">
|
||||||
|
Имя пользователя
|
||||||
|
</p>
|
||||||
|
<div class="mb-4 w-50">
|
||||||
|
<input th:field="*{login}" id="login" class="form-control" placeholder="Имя пользователя"
|
||||||
|
type="text" name='login' required minlength="3" maxlength="50">
|
||||||
|
</input>
|
||||||
|
</div>
|
||||||
|
<div th:if="${#fields.hasErrors('login')}" th:errors="*{login}" class="invalid-feedback"></div>
|
||||||
|
|
||||||
|
<p class="input-fill d-flex flex-column align-items-center">
|
||||||
|
Пароль
|
||||||
|
</p>
|
||||||
|
<div class="mb-4 w-50">
|
||||||
|
<input th:field="*{password}" id="password" class="form-control" placeholder="Пароль"
|
||||||
|
type="password" name='password' required minlength="3" maxlength="20">
|
||||||
|
</input>
|
||||||
|
</div>
|
||||||
|
<div th:if="${#fields.hasErrors('password')}" th:errors="*{password}" class="invalid-feedback">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="input-fill d-flex flex-column align-items-center">
|
||||||
|
Пароль повторно
|
||||||
|
</p>
|
||||||
|
<div class="mb-4 w-50">
|
||||||
|
<input th:field="*{passwordConfirm}" id="passwordConfirm" class="form-control"
|
||||||
|
placeholder="Пароль повторно" type="password" required minlength="3" maxlength="20">
|
||||||
|
</input>
|
||||||
|
</div>
|
||||||
|
<div th:if="${#fields.hasErrors('passwordConfirm')}" th:errors="*{passwordConfirm}"
|
||||||
|
class="invalid-feedback">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="check-admin mt-4 d-flex flex-row justify-content-center mb-4">
|
||||||
|
<input th:field="*{isAdmin}" class='isAdmin-check' type="checkbox" />
|
||||||
|
<label for="isAdmin" class='are-you-admin'> Вы админ? </label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-4 h-25 d-flex flex-column justify-content-center mb-4">
|
||||||
|
<button type="submit" class="btn btn-light">Зарегистрироваться</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user