Merge pull request #373 from liuzhihang/dev
6 篇推荐文章,不再受到今日推荐影响,即隐藏今日推荐后可以独立自定义推荐文章。默认是前六篇文章
This commit is contained in:
commit
7f3baa1755
|
@ -320,8 +320,6 @@ spec:
|
|||
todayRecommendTitle:
|
||||
todayRecommendCover:
|
||||
todayRecommendxTitle:
|
||||
recommendPost:
|
||||
recommendPostCustom:
|
||||
children:
|
||||
- $formkit: url
|
||||
name: todayRecommendUrl
|
||||
|
@ -343,33 +341,33 @@ spec:
|
|||
label: 背景图
|
||||
placeholder: 请输入地址
|
||||
value: https://liuzhihang.com/upload/hao_dark.jpg
|
||||
- $formkit: select
|
||||
name: recommendPost
|
||||
id: recommendPost
|
||||
key: recommendPost
|
||||
label: 推荐文章
|
||||
- $formkit: select
|
||||
name: recommendPost
|
||||
id: recommendPost
|
||||
key: recommendPost
|
||||
label: 推荐文章
|
||||
value: latest
|
||||
options:
|
||||
- label: 最新文章
|
||||
value: latest
|
||||
options:
|
||||
- label: 最新文章
|
||||
value: latest
|
||||
- label: 自定义
|
||||
value: custom
|
||||
- $formkit: repeater
|
||||
if: $get(recommendPost).value === custom
|
||||
name: recommendPostCustom
|
||||
label: 自定义文章
|
||||
help: 建议设置六篇文章
|
||||
value: [ ]
|
||||
children:
|
||||
- $formkit: url
|
||||
name: url
|
||||
label: 链接
|
||||
- $formkit: text
|
||||
name: title
|
||||
label: 标题
|
||||
- $formkit: attachment
|
||||
name: cover
|
||||
label: 封面地址
|
||||
- label: 自定义
|
||||
value: custom
|
||||
- $formkit: repeater
|
||||
if: $get(recommendPost).value === custom
|
||||
name: recommendPostCustom
|
||||
label: 自定义文章
|
||||
help: 建议设置六篇文章
|
||||
value: [ ]
|
||||
children:
|
||||
- $formkit: url
|
||||
name: url
|
||||
label: 链接
|
||||
- $formkit: text
|
||||
name: title
|
||||
label: 标题
|
||||
- $formkit: attachment
|
||||
name: cover
|
||||
label: 封面地址
|
||||
|
||||
- group: layout
|
||||
label: 布局
|
||||
|
@ -2768,3 +2766,4 @@ spec:
|
|||
label: 结束时间
|
||||
placeholder: 请输入结束时间(小时)
|
||||
help: 可以与开始时间相同,表示一个小时内的问候
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 默认设置前 6 篇文章 -->
|
||||
<div class="aside-list">
|
||||
<div class="aside-list-group"
|
||||
th:with='topGroupPosts = ${postFinder.list(1,6)},
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
>
|
||||
<div class="recent-post-item"
|
||||
th:each="post : ${topGroupPosts}"
|
||||
th:if="${#strings.equals(theme.config.top.BannerRight.todayRecommendContent.recommendPost, 'latest')}">
|
||||
th:if="${#strings.equals(theme.config.top.BannerRight.recommendPost, 'latest')}">
|
||||
|
||||
<div class="post_cover">
|
||||
<a th:href="@{${post.status.permalink}}" th:title="${post.spec.title}">
|
||||
|
@ -29,8 +29,8 @@
|
|||
</div>
|
||||
<!-- 自定义的文章右上角的推荐文章 -->
|
||||
<div class="recent-post-item"
|
||||
th:each="cuscomPost : ${theme.config.top.BannerRight.todayRecommendContent.recommendPostCustom}"
|
||||
th:if="${#strings.equals(theme.config.top.BannerRight.todayRecommendContent.recommendPost, 'custom')}">
|
||||
th:each="cuscomPost : ${theme.config.top.BannerRight.recommendPostCustom}"
|
||||
th:if="${#strings.equals(theme.config.top.BannerRight.recommendPost, 'custom')}">
|
||||
<div class="post_cover">
|
||||
<a th:href="@{${cuscomPost.url}}" th:title="${cuscomPost.title}">
|
||||
<span class="recent-post-top-text"
|
||||
|
|
Loading…
Reference in New Issue