Try to add topic pages
This commit is contained in:
1 parent
58e927cc87
commit
fd9d9579b0
10 files changed
+120
-55
No files matched your search
@@ -7,6 +7,5 @@ spring.sql.init.mode=always
|
||||
spring.sql.init.platform=postgres
|
||||
spring.datasource.url=jdbc:postgresql://localhost:5432/testdb
|
||||
spring.datasource.username=postgres
|
||||
#spring.datasource.password=root
|
||||
spring.datasource.password=postgres
|
||||
spring.datasource.password=root
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<h1>Пожалуйста, войдите</h1>
|
||||
|
||||
<div>
|
||||
<input type="text" class="form-control" minlength="3" size="25" id="username" name="username" required placeholder="UserName">
|
||||
<input type="text" minlength="3" size="25" id="username" name="username" required placeholder="UserName">
|
||||
<label for="username">Логин</label>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -6,18 +6,6 @@
|
||||
<meta charset="utf-8">
|
||||
<title>Вход</title>
|
||||
|
||||
<style>
|
||||
div.error {
|
||||
color: #ff5967;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.logout {
|
||||
color: #2c84ec;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
@@ -28,7 +16,7 @@
|
||||
<p>Мои обсуждения</p>
|
||||
<div th:each="el : ${discussions}">
|
||||
<h2 th:text="${el.title}"/>
|
||||
<p th:text="'Автор: ' + ${el.title}"/>
|
||||
<p th:text="'Автор: ' + ${el.author}"/>
|
||||
<p th:text="'Дата создания: ' + ${#dates.format(el.date, 'hh:mm dd MMM yyyy')}"/>
|
||||
<p th:text="'Последнее обновление: ' + ${#dates.format(el.last_update, 'hh:mm dd MMM yyyy')}"/>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org"
|
||||
xmlns:sec="https://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Вход</title>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<main>
|
||||
<h2>Закреплённые сообщения</h2>
|
||||
<div th:each="el : ${pinned_discussions}">
|
||||
<h2 th:text="${el.title}"/>
|
||||
<p th:text="'Автор: ' + ${el.author}"/>
|
||||
<p th:text="'Дата создания: ' + ${#dates.format(el.date, 'hh:mm dd MMM yyyy')}"/>
|
||||
<p th:text="'Последнее обновление: ' + ${#dates.format(el.last_update, 'hh:mm dd MMM yyyy')}"/>
|
||||
</div>
|
||||
<h2>Остальные сообщения</h2>
|
||||
<div th:each="el : ${discussions}">
|
||||
<h2 th:text="${el.title}"/>
|
||||
<p th:text="'Автор: ' + ${el.author}"/>
|
||||
<p th:text="'Дата создания: ' + ${#dates.format(el.date, 'hh:mm dd MMM yyyy')}"/>
|
||||
<p th:text="'Последнее обновление: ' + ${#dates.format(el.last_update, 'hh:mm dd MMM yyyy')}"/>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,20 +3,8 @@
|
||||
xmlns:sec="https://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Вход</title>
|
||||
<title>Новая тема</title>
|
||||
|
||||
<style>
|
||||
div.error {
|
||||
color: #ff5967;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.logout {
|
||||
color: #2c84ec;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
@@ -29,28 +17,16 @@
|
||||
<h1>Пожалуйста, введите данные новой темы</h1>
|
||||
|
||||
<div>
|
||||
<input type="text" class="form-control" minlength="3" size="25" id="username" name="username" required placeholder="UserName">
|
||||
<label for="username">Логин</label>
|
||||
<input type="text" name="title" id="title" size="3" maxlength="15" required placeholder="Новая тема">
|
||||
<label for="title">Титул</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="password" name="password" minlength="3" id="password" required placeholder="Password123">
|
||||
<label for="password">Пароль</label>
|
||||
<input type="text" name="description" id="description" placeholder="Описание">
|
||||
<label for="description">Описание</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label>
|
||||
<input type="checkbox" name="remember-me"> Запомнить меня
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit">Создать тему</button>
|
||||
|
||||
<button type="submit">Войти</button>
|
||||
|
||||
<div th:if="${param.error}" class="error">
|
||||
Неправильный логин или пароль.
|
||||
</div>
|
||||
<div th:if="${param.logout}" class="logout">
|
||||
Вы вышли из аккаунта.
|
||||
</div>
|
||||
<input type="hidden" name="_csrf" th:value="${_csrf.token}">
|
||||
<p>© 2022</p>
|
||||
</form>
|
||||
|
||||
Reference in new issue
Block a user