mirror of
https://github.com/halo-dev/theme-earth.git
synced 2025-11-30 01:02:18 +08:00
fix: deprecated unwrapped fragment expression
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html
|
||||
xmlns:th="https://www.thymeleaf.org"
|
||||
th:replace="modules/layout :: html(header = null, content = ~{::content}, head = null, footer = null, sidebar = null, contentClass = null)"
|
||||
th:replace="~{modules/layout :: html(header = null, content = ~{::content}, head = null, footer = null, sidebar = null, contentClass = null)}"
|
||||
>
|
||||
<th:block th:fragment="content">
|
||||
<th:block th:replace="modules/category-filter" />
|
||||
<th:block th:replace="~{modules/category-filter}" />
|
||||
|
||||
<div
|
||||
id="post-list"
|
||||
@@ -15,7 +15,7 @@
|
||||
>
|
||||
<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:replace="~{modules/post-card :: post-card(${post},true,true,true,${list_layout == 'single' ? 'column' : 'row'})}"
|
||||
/>
|
||||
</th:block>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html
|
||||
xmlns:th="https://www.thymeleaf.org"
|
||||
th:replace="modules/layout :: html(header = null, content = ~{::content}, head = null, footer = null, sidebar = null, contentClass = null)"
|
||||
th:replace="~{modules/layout :: html(header = null, content = ~{::content}, head = null, footer = null, sidebar = null, contentClass = null)}"
|
||||
>
|
||||
<th:block th:fragment="content">
|
||||
<th:block th:replace="modules/category-filter" />
|
||||
<th:block th:replace="~{modules/category-filter}" />
|
||||
|
||||
<div
|
||||
id="post-list"
|
||||
@@ -15,7 +15,7 @@
|
||||
>
|
||||
<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:replace="~{modules/post-card :: post-card(${post},true,true,true,${list_layout == 'single' ? 'column' : 'row'})}"
|
||||
/>
|
||||
</th:block>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html
|
||||
xmlns:th="https://www.thymeleaf.org"
|
||||
th:replace="modules/layout :: html(header = null, content = ~{::content}, head = null, footer = null, sidebar = ~{::sidebar}, contentClass = '')"
|
||||
th:replace="~{modules/layout :: html(header = null, content = ~{::content}, head = null, footer = null, sidebar = ~{::sidebar}, contentClass = '')}"
|
||||
>
|
||||
<th:block th:fragment="content">
|
||||
<div class="rounded-xl bg-white p-4">
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</span>
|
||||
</a>
|
||||
<th:block th:if="${not #lists.isEmpty(category.children)}">
|
||||
<th:block th:replace="modules/category-tree :: next (categories=${category.children})"></th:block>
|
||||
<th:block th:replace="~{modules/category-tree :: next (categories=${category.children})}"></th:block>
|
||||
</th:block>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -93,21 +93,21 @@
|
||||
<th:block th:switch="${theme.config.layout.header_widget}">
|
||||
<th:block th:case="latest_post" th:with="posts = ${postFinder.list(1,1)}">
|
||||
<div class="container mx-auto py-6" th:if="${posts.total gt 0}">
|
||||
<th:block th:replace="modules/featured-post-card :: featured-post-card(post=${posts.items[0]})" />
|
||||
<th:block th:replace="~{modules/featured-post-card :: featured-post-card(post=${posts.items[0]})}" />
|
||||
</div>
|
||||
</th:block>
|
||||
<th:block th:case="latest_post_grid" th:with="posts = ${postFinder.list(1,5)}">
|
||||
<div class="container mx-auto grid grid-cols-1 gap-3 py-6 sm:grid-cols-5" th:if="${posts.total gt 0}">
|
||||
<div class="col-span-1 sm:col-span-3">
|
||||
<th:block
|
||||
th:replace="modules/post-card :: post-card(post=${posts.items[0]},cover=true,animation=false,border=false,direction='row')"
|
||||
th:replace="~{modules/post-card :: post-card(post=${posts.items[0]},cover=true,animation=false,border=false,direction='row')}"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-span-1 grid grid-cols-1 gap-3 sm:col-span-2 sm:grid-cols-2">
|
||||
<th:block th:each="post,postStat : ${posts.items}">
|
||||
<th:block th:if="${postStat.index != 0}">
|
||||
<th:block
|
||||
th:replace="modules/post-card :: post-card(post=${post},cover=false,animation=false,border=false,direction='row')"
|
||||
th:replace="~{modules/post-card :: post-card(post=${post},cover=false,animation=false,border=false,direction='row')}"
|
||||
/>
|
||||
</th:block>
|
||||
</th:block>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<th:block th:replace="${header}" />
|
||||
</th:block>
|
||||
<th:block th:if="${header == null}">
|
||||
<th:block th:replace="modules/header :: header(isHome = true)" />
|
||||
<th:block th:replace="~{modules/header :: header(isHome = true)}" />
|
||||
</th:block>
|
||||
<section class="container mx-auto"></section>
|
||||
<section class="container mx-auto mt-6 grid grid-cols-4 gap-6" th:classappend="${contentClass}">
|
||||
@@ -28,13 +28,13 @@
|
||||
<th:block th:replace="${sidebar}" />
|
||||
</th:block>
|
||||
<th:block th:if="${sidebar == null}">
|
||||
<th:block th:replace="modules/sidebar :: sidebar(prepend = null)" />
|
||||
<th:block th:replace="~{modules/sidebar :: sidebar(prepend = null)}" />
|
||||
</th:block>
|
||||
</section>
|
||||
<th:block th:replace="modules/footer" />
|
||||
<th:block th:replace="~{modules/footer}" />
|
||||
<th:block th:if="${footer != null}">
|
||||
<th:block th:replace="${footer}" />
|
||||
</th:block>
|
||||
<th:block th:replace="modules/overlay-menu" />
|
||||
<th:block th:replace="~{modules/overlay-menu}" />
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<th:block th:replace="${prepend}" />
|
||||
</th:block>
|
||||
<th:block th:each="widget : ${widgets}">
|
||||
<th:block th:replace="'modules/widgets/'+${widget}" />
|
||||
<th:block th:replace="~{'modules/widgets/'+${widget}}" />
|
||||
</th:block>
|
||||
</th:block>
|
||||
</aside>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</h2>
|
||||
<div class="mt-2" th:with="categories = ${categoryFinder.listAsTree()}">
|
||||
<ul class="space-y-1">
|
||||
<li th:replace="modules/category-tree :: single(categories=${categories})" />
|
||||
<li th:replace="~{modules/category-tree :: single(categories=${categories})}" />
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html
|
||||
xmlns:th="https://www.thymeleaf.org"
|
||||
th:replace="modules/layout :: html(header = ~{::header}, content = ~{::content}, head = null, footer = ~{::footer}, sidebar = null, contentClass = ${theme.config.layout.content_header} and ${not #strings.isEmpty(singlePage.spec.cover)} ? '!-mt-20' : '')"
|
||||
th:replace="~{modules/layout :: html(header = ~{::header}, content = ~{::content}, head = null, footer = ~{::footer}, sidebar = null, contentClass = ${theme.config.layout.content_header} and ${not #strings.isEmpty(singlePage.spec.cover)} ? '!-mt-20' : '')}"
|
||||
>
|
||||
<th:block th:fragment="header">
|
||||
<th:block
|
||||
th:replace="modules/header :: header(isHome = false, cover = ${singlePage.spec.cover}, title = ${singlePage.spec.title})"
|
||||
th:replace="~{modules/header :: header(isHome = false, cover = ${singlePage.spec.cover}, title = ${singlePage.spec.title})}"
|
||||
/>
|
||||
</th:block>
|
||||
<th:block th:fragment="content">
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html
|
||||
xmlns:th="https://www.thymeleaf.org"
|
||||
th:replace="modules/layout :: html(header = ~{::header}, content = ~{::content}, head = null, footer = ~{::footer}, sidebar = ~{::sidebar}, contentClass = ${theme.config.layout.content_header} and ${not #strings.isEmpty(post.spec.cover)} ? '!-mt-20' : '')"
|
||||
th:replace="~{modules/layout :: html(header = ~{::header}, content = ~{::content}, head = null, footer = ~{::footer}, sidebar = ~{::sidebar}, contentClass = ${theme.config.layout.content_header} and ${not #strings.isEmpty(post.spec.cover)} ? '!-mt-20' : '')}"
|
||||
>
|
||||
<th:block th:fragment="header">
|
||||
<th:block
|
||||
th:replace="modules/header :: header(isHome = false, cover = ${post.spec.cover}, title = ${post.spec.title})"
|
||||
th:replace="~{modules/header :: header(isHome = false, cover = ${post.spec.cover}, title = ${post.spec.title})}"
|
||||
/>
|
||||
</th:block>
|
||||
<th:block th:fragment="footer">
|
||||
@@ -26,7 +26,7 @@
|
||||
</div>
|
||||
</th:block>
|
||||
<th:block th:fragment="sidebar">
|
||||
<th:block th:replace="modules/sidebar :: sidebar(prepend = ~{::sidebar_prepend})"></th:block>
|
||||
<th:block th:replace="~{modules/sidebar :: sidebar(prepend = ~{::sidebar_prepend})}"></th:block>
|
||||
</th:block>
|
||||
<th:block th:fragment="content">
|
||||
<div class="rounded-xl bg-white p-4">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html
|
||||
xmlns:th="https://www.thymeleaf.org"
|
||||
th:replace="modules/layout :: html(header = null, content = ~{::content}, head = null, footer = null, sidebar = null, contentClass = null)"
|
||||
th:replace="~{modules/layout :: html(header = null, content = ~{::content}, head = null, footer = null, sidebar = null, contentClass = null)}"
|
||||
>
|
||||
<th:block th:fragment="content">
|
||||
<div class="flex text-gray-900">
|
||||
@@ -17,7 +17,7 @@
|
||||
>
|
||||
<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:replace="~{modules/post-card :: post-card(${post},true,true,true,${list_layout == 'single' ? 'column' : 'row'})}"
|
||||
/>
|
||||
</th:block>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user