aboutsummaryrefslogtreecommitdiff
path: root/juick-spring-www/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'juick-spring-www/src/main')
-rw-r--r--juick-spring-www/src/main/resources/messages.properties4
-rw-r--r--juick-spring-www/src/main/resources/messages_ru.properties4
-rw-r--r--juick-spring-www/src/main/webapp/WEB-INF/templates/views/error.html32
-rw-r--r--juick-spring-www/src/main/webapp/WEB-INF/templates/views/index.html4
-rw-r--r--juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/blog_messages.html7
5 files changed, 20 insertions, 31 deletions
diff --git a/juick-spring-www/src/main/resources/messages.properties b/juick-spring-www/src/main/resources/messages.properties
index 469f05aa3..0d98f7d08 100644
--- a/juick-spring-www/src/main/resources/messages.properties
+++ b/juick-spring-www/src/main/resources/messages.properties
@@ -46,4 +46,6 @@ title.index.anonym=Juick microblogs: popular posts
title.index.user=Popular
message.comment=Comment
postForm.writeReply=Write a reply
-messages.next=Next \ No newline at end of file
+messages.next=Next
+error.pageNotFound=Page not found
+error.pageNotFound.description=Probably, user deleted this post, or this page never existed. \ No newline at end of file
diff --git a/juick-spring-www/src/main/resources/messages_ru.properties b/juick-spring-www/src/main/resources/messages_ru.properties
index 00d9018c1..20d53c8f1 100644
--- a/juick-spring-www/src/main/resources/messages_ru.properties
+++ b/juick-spring-www/src/main/resources/messages_ru.properties
@@ -46,4 +46,6 @@ title.index.anonym=Микроблоги Juick: популярные записи
title.index.user=Популярные
message.comment=Комментировать
postForm.writeReply=Написать ответ
-messages.next=Читать далее \ No newline at end of file
+messages.next=Читать далее
+error.pageNotFound=Страница не найдена
+error.pageNotFound.description=Сожалеем, но страницу с этим адресом удалил её автор, либо её никогда не существовало. \ No newline at end of file
diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/error.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/views/error.html
index 98ce70e44..0b22deb31 100644
--- a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/error.html
+++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/views/error.html
@@ -1,27 +1,15 @@
<!DOCTYPE html>
-<html xmlns:th="http://www.thymeleaf.org">
+<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
+ layout:decorate="~{layout/mainLayout}">
<head>
- <meta charset="UTF-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"/>
-
- <link rel="stylesheet" href="/style.css" th:href="@{/style.css}"/>
-
- <script type="text/javascript" src="/scripts.js" th:href="@{/scripts.js}"></script>
-
- <link rel="icon" href="//i.juick.com/favicon.png"/>
- <!--[if lt IE 9 & (!IEMobile 7)]>
- <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
- <![endif]-->
-
- <title th:text="#{error.title}">Error page</title>
+ <title th:text="#{error.pageNotFound}">Page not found</title>
</head>
-
-<body th:with="httpStatus=${T(org.springframework.http.HttpStatus).valueOf(#response.status)}">
- <h1 th:text="|${httpStatus} - ${httpStatus.reasonPhrase}|">404</h1>
-
- <p th:utext="${errorMessage}">Error java.lang.NullPointerException</p>
-
- <a href="/" th:href="@{/}" th:text="#{link.returnToMain}">Back to Home Page</a>
+<body>
+<section id="content">
+ <article layout:fragment="content">
+ <h1 th:text="#{error.pageNotFound}">Page not found</h1>
+ <p th:text="#{error.pageNotFound.description}">Probably, user deleted this post, or this page never existed.</p>
+ </article>
+</section>
</body>
</html> \ No newline at end of file
diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/index.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/views/index.html
index e67dcd7f7..24aa94720 100644
--- a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/index.html
+++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/views/index.html
@@ -7,11 +7,11 @@
</head>
<body>
-<section layout:fragment="content">
+<th:block layout:fragment="content">
<div th:replace="views/partial/blog_postform"></div>
<div th:replace="views/partial/blog_messages"></div>
<div th:replace="views/partial/blog_paginator"></div>
-</section>
+</th:block>
<aside id="column">
<p layout:fragment="column" th:replace="views/partial/homecolumn">Main side column</p>
diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/blog_messages.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/blog_messages.html
index d1a91217e..3c7e42382 100644
--- a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/blog_messages.html
+++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/blog_messages.html
@@ -1,6 +1,4 @@
-<!DOCTYPE html>
-<html xmlns:th="http://www.thymeleaf.org">
-<th:block th:each="msg:${msgs}">
+<th:block th:each="msg:${msgs}" xmlns:th="http://www.thymeleaf.org">
<article th:data-mid="${msg.getMid()}">
<header class="u">
@<a th:href="|/${msg.getUser().getName()}/|" th:text="${msg.getUser().getName()}">ugnich</a>:
@@ -53,5 +51,4 @@
</a>
</nav>
</article>
-</th:block>
-</html> \ No newline at end of file
+</th:block> \ No newline at end of file