diff --git a/settings.yaml b/settings.yaml index 5b471103..5c1f2a8e 100644 --- a/settings.yaml +++ b/settings.yaml @@ -61,16 +61,16 @@ spec: label: 布局 formSchema: - $formkit: select - name: post_list_layout + name: columns label: 文章列表布局 - value: grid_3 + value: 2 options: - label: 网格(一行三列) - value: grid_3 + value: 3 - label: 网格(一行两列) - value: grid_2 + value: 2 - label: 单条 - value: single + value: 1 help: "选择单条时,文章卡片的图片将位于左侧" - $formkit: select name: header_widget diff --git a/templates/modules/post-list.html b/templates/modules/post-list.html index fedb90bd..aad4f59b 100644 --- a/templates/modules/post-list.html +++ b/templates/modules/post-list.html @@ -2,10 +2,13 @@ + th:with="postItems=${posts.items}, + columns = ${theme.config.layout.columns}, + totalPages = ${(posts.total - 1) / posts.size + 1}, pageIndex = ${posts.page}"> -
+ +