Skip to content

Commit

Permalink
fix: deprecated unwrapped fragment expression
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Wang <i@ryanc.cc>
  • Loading branch information
ruibaby committed Nov 20, 2023
1 parent 04ef334 commit 83eff9c
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion templates/archives.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html
xmlns:th="https://www.thymeleaf.org"
th:replace="module/macro :: html(title = '归档 - ' + ${site.title}, content = ~{::content})"
th:replace="~{module/macro :: html(title = '归档 - ' + ${site.title}, content = ~{::content})}"
>
<th:block th:fragment="content">
<main class="mx-auto" id="container">
Expand Down
2 changes: 1 addition & 1 deletion templates/assets/dist/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion templates/categories.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html
xmlns:th="https://www.thymeleaf.org"
th:replace="module/macro :: html(title = '分类 - ' + ${site.title}, content = ~{::content})"
th:replace="~{module/macro :: html(title = '分类 - ' + ${site.title}, content = ~{::content})}"
>
<th:block th:fragment="content">
<main class="mx-auto" id="container">
Expand Down
6 changes: 3 additions & 3 deletions templates/category.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html
xmlns:th="https://www.thymeleaf.org"
th:replace="module/macro :: html(title = '分类:' + ${category.spec.displayName} + ' - ' + ${site.title}, content = ~{::content})"
th:replace="~{module/macro :: html(title = '分类:' + ${category.spec.displayName} + ' - ' + ${site.title}, content = ~{::content})}"
>
<th:block th:fragment="content">
<main class="mx-auto" id="container">
Expand Down Expand Up @@ -39,10 +39,10 @@
th:classappend="${theme.config.home_setting.posts_style}?'px-5 md:px-0 max-w-xl sm:max-w-2xl md:max-w-3xl lg:max-w-5xl':'px-5 max-w-4xl'"
>
<th:block th:if="${theme.config.home_setting.posts_style}">
<th:block th:replace="module/widget/post_cards :: post_cards" />
<th:block th:replace="~{module/widget/post_cards :: post_cards}" />
</th:block>
<th:block th:unless="${theme.config.home_setting.posts_style}">
<th:block th:replace="module/widget/post_list :: post_list" />
<th:block th:replace="~{module/widget/post_list :: post_list}" />
</th:block>
<!-- 分页 -->
<nav
Expand Down
6 changes: 3 additions & 3 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html
xmlns:th="https://www.thymeleaf.org"
th:replace="module/macro :: html(title = ${site.title},content = ~{::content})"
th:replace="~{module/macro :: html(title = ${site.title},content = ~{::content})}"
>
<th:block th:fragment="content">
<main class="mx-auto" id="container">
Expand Down Expand Up @@ -66,7 +66,7 @@ <h3 class="mb-4 mt-8 hidden dark:text-gray-300 md:block">
<span class="iconfont icon-new mr-2 text-base text-red-600"></span>
最新文章
</h3>
<th:block th:replace="module/widget/post_cards :: post_cards" />
<th:block th:replace="~{module/widget/post_cards :: post_cards}" />
</th:block>
<th:block th:unless="${theme.config.home_setting.posts_style}">
<div
Expand All @@ -87,7 +87,7 @@ <h3 class="mb-4 mt-8 dark:text-gray-300">
<span class="iconfont icon-new mr-2 text-base text-red-600"></span>
最新文章
</h3>
<th:block th:replace="module/widget/post_list :: post_list" />
<th:block th:replace="~{module/widget/post_list :: post_list}" />
</th:block>

<!-- 分页 -->
Expand Down
2 changes: 1 addition & 1 deletion templates/links.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html
xmlns:th="https://www.thymeleaf.org"
th:replace="module/macro :: html(title = '友情链接 - ' + ${site.title}, content = ~{::content})"
th:replace="~{module/macro :: html(title = '友情链接 - ' + ${site.title}, content = ~{::content})}"
>
<th:block th:fragment="content">
<main class="mx-auto" id="container">
Expand Down
2 changes: 1 addition & 1 deletion templates/module/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,5 @@
</div>
</footer>

<th:block th:replace="module/back2Top :: back2Top" />
<th:block th:replace="~{module/back2Top :: back2Top}" />
</th:block>
2 changes: 1 addition & 1 deletion templates/module/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
class="link fill-current text-gray-800 dark:text-gray-100"
style="padding-top: 0.8rem"
>
<th:block th:replace="module/dark_mode :: dark_mode" />
<th:block th:replace="~{module/dark_mode :: dark_mode}" />
</span>
<span
th:if="${pluginFinder.available('PluginSearchWidget')}"
Expand Down
10 changes: 5 additions & 5 deletions templates/module/macro.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
/>
<title th:text="${title}"></title>
<th:block th:replace="module/styles :: styles" />
<th:block th:replace="~{module/styles :: styles}" />
<script th:src="@{/assets/js/plugins/jquery.min.js}"></script>
<script
th:if="${theme.config.general.pjax_enabled} and ${pluginFinder.available('PluginCommentWidget')}"
Expand All @@ -21,15 +21,15 @@
</head>
<body class="m-0 h-full p-0 font-sans">
<div class="flex h-full flex-col">
<th:block th:replace="module/header :: header" />
<th:block th:replace="~{module/header :: header}" />
<div class="bg-gray-50 dark:bg-gray-900" style="flex: 1 0 auto">
<th:block th:replace="${content}" />
</div>
<th:block th:replace="module/footer :: footer" />
<th:block th:replace="~{module/footer :: footer}" />
</div>
</body>
<th:block th:replace="module/plugins :: plugins" />
<th:block th:replace="~{module/plugins :: plugins}" />
<script th:src="@{/assets/js/utils.js}"></script>
<script th:src="@{/assets/js/main.js}"></script>
<th:block th:replace="module/script :: script" />
<th:block th:replace="~{module/script :: script}" />
</html>
2 changes: 1 addition & 1 deletion templates/module/script.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@
</th:block>

<!-- Pjax 相关代码 -->
<th:block th:replace="module/pjax :: pjax" />
<th:block th:replace="~{module/pjax :: pjax}" />
</th:block>
2 changes: 1 addition & 1 deletion templates/moments.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html
xmlns:th="https://www.thymeleaf.org"
th:replace="module/macro :: html(title = |${title} - ${site.title}|, content = ~{::content})"
th:replace="~{module/macro :: html(title = |${title} - ${site.title}|, content = ~{::content})}"
>
<th:block th:fragment="content">
<main class="mx-auto" id="container">
Expand Down
2 changes: 1 addition & 1 deletion templates/page.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html
xmlns:th="https://www.thymeleaf.org"
th:replace="module/macro :: html(title = ${singlePage.spec.title} + ' - ' + ${site.title}, content = ~{::content})"
th:replace="~{module/macro :: html(title = ${singlePage.spec.title} + ' - ' + ${site.title}, content = ~{::content})}"
>
<th:block th:fragment="content">
<main class="mx-auto" id="container">
Expand Down
2 changes: 1 addition & 1 deletion templates/photos.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html
xmlns:th="https://www.thymeleaf.org"
th:replace="module/macro :: html(title = |${title} - ${site.title}|, content = ~{::content})"
th:replace="~{module/macro :: html(title = |${title} - ${site.title}|, content = ~{::content})}"
>
<th:block th:fragment="content">
<main class="mx-auto" id="container">
Expand Down
4 changes: 2 additions & 2 deletions templates/post.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html
xmlns:th="https://www.thymeleaf.org"
th:replace="module/macro :: html(title = ${post.spec.title} + ' - ' + ${site.title}, content = ~{::content})"
th:replace="~{module/macro :: html(title = ${post.spec.title} + ' - ' + ${site.title}, content = ~{::content})}"
>
<th:block th:fragment="content">
<main class="mx-auto" id="container">
Expand Down Expand Up @@ -146,7 +146,7 @@
<div
class="md-content mx-auto mt-8 max-w-4xl text-center tracking-wider sm:leading-normal md:leading-relaxed"
>
<th:block th:replace="module/widget/sponsor :: sponsor" />
<th:block th:replace="~{module/widget/sponsor :: sponsor}" />
<div class="my-4 inline-block text-center">
<span
role="button"
Expand Down
6 changes: 3 additions & 3 deletions templates/tag.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html
xmlns:th="https://www.thymeleaf.org"
th:replace="module/macro :: html(title = '标签:' + ${tag.spec.displayName} + ' - ' + ${site.title}, content = ~{::content})"
th:replace="~{module/macro :: html(title = '标签:' + ${tag.spec.displayName} + ' - ' + ${site.title}, content = ~{::content})}"
>
<th:block th:fragment="content">
<main class="mx-auto" id="container">
Expand Down Expand Up @@ -39,10 +39,10 @@
th:classappend="${theme.config.home_setting.posts_style}?'px-5 md:px-0 max-w-xl sm:max-w-2xl md:max-w-3xl lg:max-w-5xl':'px-5 max-w-4xl'"
>
<th:block th:if="${theme.config.home_setting.posts_style}">
<th:block th:replace="module/widget/post_cards :: post_cards" />
<th:block th:replace="~{module/widget/post_cards :: post_cards}" />
</th:block>
<th:block th:unless="${theme.config.home_setting.posts_style}">
<th:block th:replace="module/widget/post_list :: post_list" />
<th:block th:replace="~{module/widget/post_list :: post_list}" />
</th:block>
<!-- 分页 -->
<nav
Expand Down
2 changes: 1 addition & 1 deletion templates/tags.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html
xmlns:th="https://www.thymeleaf.org"
th:replace="module/macro :: html(title = '标签 - ' + ${site.title}, header = null, content = ~{::content})"
th:replace="~{module/macro :: html(title = '标签 - ' + ${site.title}, header = null, content = ~{::content})}"
>
<th:block th:fragment="content">
<main class="mx-auto" id="container">
Expand Down

0 comments on commit 83eff9c

Please sign in to comment.