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