mirror of
https://github.com/halo-dev/theme-earth.git
synced 2025-10-14 14:30:50 +00:00

添加界面的 i18n 支持。 /kind feature Fixes https://github.com/halo-dev/theme-earth/issues/198 Fixes https://github.com/halo-dev/theme-earth/issues/75 ```release-note 添加界面的 i18n 支持。 ```
34 lines
1.6 KiB
HTML
34 lines
1.6 KiB
HTML
<!doctype html>
|
|
<html
|
|
xmlns:th="https://www.thymeleaf.org"
|
|
th:replace="~{modules/layout :: html(title = |#{page.tag.title(${tag.spec.displayName})} - ${site.title}|, hero = null, content = ~{::content}, head = null, footer = null, sidebar = null, contentClass = null)}"
|
|
>
|
|
<th:block th:fragment="content">
|
|
<div class="rounded-xl bg-white p-4 shadow transition-all duration-500 hover:shadow-md dark:bg-slate-800">
|
|
<th:block th:replace="~{modules/tag-filter}" />
|
|
</div>
|
|
|
|
<div
|
|
id="post-list"
|
|
th:if="${posts.total gt 0}"
|
|
th:with="postItems=${posts.items},list_layout=${theme.config.layout.post_list_layout}"
|
|
class="mt-6 grid grid-cols-1 gap-6"
|
|
th:classappend="|${list_layout == 'grid_3' ? 'md:grid-cols-2 xl:grid-cols-3' : ''} ${list_layout == 'grid_2' ? 'md:grid-cols-2' : ''}|"
|
|
>
|
|
<th:block th:each="post : ${postItems}">
|
|
<th:block
|
|
th:replace="~{modules/post-card :: post-card(${post},true,true,true,${list_layout == 'single' ? 'column' : 'row'})}"
|
|
/>
|
|
</th:block>
|
|
</div>
|
|
|
|
<div th:if="${posts.total == 0}" class="mt-6 flex items-center justify-center">
|
|
<span class="text-sm font-light text-gray-600 dark:text-slate-200" th:text="#{common.noPosts}"></span>
|
|
</div>
|
|
|
|
<th:block
|
|
th:replace="~{modules/pagination :: pagination(context = |${tag.status.permalink}/|, prevUrl = ${posts.prevUrl}, nextUrl = ${posts.nextUrl}, totalPages = ${posts.totalPages}, page = ${posts.page}, hasPrevious = ${posts.hasPrevious()}, hasNext = ${posts.hasNext()})}"
|
|
/>
|
|
</th:block>
|
|
</html>
|