feat:最近发布文章数量限制

This commit is contained in:
sunheyi 2023-02-09 17:51:06 +08:00
parent 2359f4a843
commit e6fb79f791
2 changed files with 6 additions and 1 deletions

View File

@ -550,6 +550,11 @@ spec:
label: 阅读建议
value: 4
help: "推荐阅读的文章数量"
- $formkit: number
name: recentPost
label: 最近发布文章
value: 4
help: "最近发布的文章数量"
- $formkit: radio
name: copyright
label: 版权声明

View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<div class="card-widget card-recent-post" th:fragment="recent-posts" th:with='posts = ${postFinder.list(1,6)},
<div class="card-widget card-recent-post" th:fragment="recent-posts" th:with='posts = ${postFinder.list(1,theme.config.post.recentPost)},
postRandomImg=${#strings.contains(theme.config.layout.postRandomImg,"?") ? theme.config.layout.postRandomImg : theme.config.layout.postRandomImg+"?"}'
>