Skip to content

Commit

Permalink
feat: 允许关闭页底页码/仅有一页时隐藏页码
Browse files Browse the repository at this point in the history
  • Loading branch information
HowieHz committed Dec 6, 2024
1 parent 23b4845 commit 482fc2c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions i18n-settings/settings.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,15 @@ spec:
value: true
- label: Disable
value: false
- $formkit: radio
name: is_show_page_number
label: Display page number
value: true
options:
- label: Enable
value: true
- label: Disable
value: false
- $formkit: radio
name: is_footer_theme_info_show
label: Theme information in the footer
Expand Down
9 changes: 9 additions & 0 deletions settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,15 @@ spec:
value: true
- label: 关闭
value: false
- $formkit: radio
name: is_show_page_number
label: 是否显示页码
value: true
options:
- label: 开启
value: true
- label: 关闭
value: false
- $formkit: radio
name: is_footer_theme_info_show
label: 页面底部主题信息
Expand Down
1 change: 1 addition & 0 deletions templates/fragments/posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
class="page-number"
th:with="totalPage=${posts.totalPages}"
th:text="#{common.page-number.text(${posts.page}, ${totalPage})}"
th:if="${posts.totalPages > 1 and theme.config?.styles?.is_show_page_number}"
>Page 1 of 1 填充位</span
>
<a th:href="@{${posts.nextUrl}}" th:if="${posts.hasNext()}" th:aria-label="#{common.nextPage.aria-label}">
Expand Down
1 change: 1 addition & 0 deletions templates/moments.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
class="page-number"
th:with="totalPage=${moments.totalPages}"
th:text="#{common.page-number.text(${moments.page}, ${totalPage})}"
th:if="${moments.totalPages > 1 and theme.config?.styles?.is_show_page_number}"
>Page 1 of 1 填充位</span
>
<a th:href="@{${moments.nextUrl}}" th:if="${moments.hasNext()}" th:aria-label="#{common.nextPage.aria-label}">
Expand Down

0 comments on commit 482fc2c

Please sign in to comment.