From eca356b36094242a6ada2cefc59bb60f8924e28b Mon Sep 17 00:00:00 2001 From: liuzhihang Date: Wed, 19 Oct 2022 21:38:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=A4=9A=E7=A7=8D=E5=88=86?= =?UTF-8?q?=E5=88=97=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings.yaml | 10 +++++----- templates/modules/post-list.html | 7 +++++-- 2 files changed, 10 insertions(+), 7 deletions(-) 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}"> -
+ +