refactor: simplify error page markup
This commit is contained in:
@@ -4,16 +4,17 @@
|
|||||||
th:replace="~{modules/layout :: html(title = '404 - ' + ${site.title}, header = null, content = ~{::content}, footer = null)}"
|
th:replace="~{modules/layout :: html(title = '404 - ' + ${site.title}, header = null, content = ~{::content}, footer = null)}"
|
||||||
>
|
>
|
||||||
<th:block th:fragment="content">
|
<th:block th:fragment="content">
|
||||||
<div class="content">
|
<article class="post">
|
||||||
<div class="post">
|
<header>
|
||||||
<h1 class="post-title" th:text="${error.title}">404</h1>
|
<h1 class="post-title" th:text="${error.status}">Error status</h1>
|
||||||
|
</header>
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
<p th:text="${error?.detail}"></p>
|
<h2 th:text="${#strings.defaultString(error.title, #messages.msg('page.error.title'))}">Error</h2>
|
||||||
|
<p th:if="${not #strings.isEmpty(error.detail)}" th:text="${error.detail}">Error detail</p>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" th:onclick="|location.href='@{/}'|" th:text="#{page.error.back}">
|
<a data-pjax class="button inline" th:href="@{/}" th:text="#{page.error.back}">
|
||||||
Back to home page
|
Back to home page
|
||||||
</button>
|
</a>
|
||||||
</div>
|
</article>
|
||||||
</div>
|
|
||||||
</th:block>
|
</th:block>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -4,16 +4,17 @@
|
|||||||
th:replace="~{modules/layout :: html(title = '5xx - ' + ${site.title}, header = null, content = ~{::content}, footer = null)}"
|
th:replace="~{modules/layout :: html(title = '5xx - ' + ${site.title}, header = null, content = ~{::content}, footer = null)}"
|
||||||
>
|
>
|
||||||
<th:block th:fragment="content">
|
<th:block th:fragment="content">
|
||||||
<div class="content">
|
<article class="post">
|
||||||
<div class="post">
|
<header>
|
||||||
<h1 class="post-title" th:text="${error.title}">5xx</h1>
|
<h1 class="post-title" th:text="${error.status}">Error status</h1>
|
||||||
|
</header>
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
<p th:text="${error?.detail}"></p>
|
<h2 th:text="${#strings.defaultString(error.title, #messages.msg('page.error.title'))}">Error</h2>
|
||||||
|
<p th:if="${not #strings.isEmpty(error.detail)}" th:text="${error.detail}">Error detail</p>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" th:onclick="|location.href='@{/}'|" th:text="#{page.error.back}">
|
<a data-pjax class="button inline" th:href="@{/}" th:text="#{page.error.back}">
|
||||||
Back to home page
|
Back to home page
|
||||||
</button>
|
</a>
|
||||||
</div>
|
</article>
|
||||||
</div>
|
|
||||||
</th:block>
|
</th:block>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -4,16 +4,17 @@
|
|||||||
th:replace="~{modules/layout :: html(title = |#{page.error.title} - ${site.title}|, header = null, content = ~{::content}, footer = null)}"
|
th:replace="~{modules/layout :: html(title = |#{page.error.title} - ${site.title}|, header = null, content = ~{::content}, footer = null)}"
|
||||||
>
|
>
|
||||||
<th:block th:fragment="content">
|
<th:block th:fragment="content">
|
||||||
<div class="content">
|
<article class="post">
|
||||||
<div class="post">
|
<header>
|
||||||
<h1 class="post-title" th:text="${error.title}">5xx</h1>
|
<h1 class="post-title" th:text="${error.status}">Error status</h1>
|
||||||
|
</header>
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
<p th:text="${error?.detail}"></p>
|
<h2 th:text="${#strings.defaultString(error.title, #messages.msg('page.error.title'))}">Error</h2>
|
||||||
|
<p th:if="${not #strings.isEmpty(error.detail)}" th:text="${error.detail}">Error detail</p>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" th:onclick="|location.href='@{/}'|" th:text="#{page.error.back}">
|
<a data-pjax class="button inline" th:href="@{/}" th:text="#{page.error.back}">
|
||||||
Back to home page
|
Back to home page
|
||||||
</button>
|
</a>
|
||||||
</div>
|
</article>
|
||||||
</div>
|
|
||||||
</th:block>
|
</th:block>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user