commit
0967717892
|
@ -70,53 +70,18 @@ spec:
|
|||
placeholder: 请输入小标题
|
||||
value: 更多信息请关注 GitHub
|
||||
help: 支持 HTML 语法
|
||||
- $formkit: repeater
|
||||
if: "$get(recentTop).value"
|
||||
name: bannersIconPair
|
||||
label: Banner 滚动图标
|
||||
help: 为空时会使用系统内置图标
|
||||
value: []
|
||||
children:
|
||||
- $formkit: group
|
||||
name: top
|
||||
label: 上图标
|
||||
value:
|
||||
url:
|
||||
name:
|
||||
background:
|
||||
children:
|
||||
- $formkit: url
|
||||
name: url
|
||||
label: 路径
|
||||
placeholder: 请输入图标路径
|
||||
validation: "url"
|
||||
- $formkit: text
|
||||
name: name
|
||||
label: 名称
|
||||
placeholder: 请输入名称
|
||||
- $formkit: color
|
||||
name: background
|
||||
label: 背景色
|
||||
- $formkit: group
|
||||
name: bottom
|
||||
label: 下图标
|
||||
value:
|
||||
url:
|
||||
name:
|
||||
background:
|
||||
children:
|
||||
- $formkit: url
|
||||
name: url
|
||||
label: 路径
|
||||
placeholder: 请输入图标路径
|
||||
validation: "url"
|
||||
- $formkit: text
|
||||
name: name
|
||||
label: 名称
|
||||
placeholder: 请输入名称
|
||||
- $formkit: color
|
||||
name: background
|
||||
label: 背景色
|
||||
- $formkit: select
|
||||
name: bannersBackground
|
||||
label: 文章列表布局
|
||||
value: default
|
||||
options:
|
||||
- label: 默认
|
||||
value: default
|
||||
- label: 技术栈
|
||||
value: techStack
|
||||
- label: 图片(WIP)
|
||||
value: img
|
||||
help: "Banner 底部背景,默认使用主题技术栈、自定义技术栈需要在【个人】中配置技术栈"
|
||||
- $formkit: url
|
||||
if: "$get(recentTop).value"
|
||||
name: bikan
|
||||
|
@ -126,13 +91,13 @@ spec:
|
|||
- $formkit: url
|
||||
if: "$get(recentTop).value"
|
||||
name: remen
|
||||
label: 必看精选
|
||||
label: 热门文章
|
||||
placeholder: 请输入地址
|
||||
validation: "url"
|
||||
- $formkit: url
|
||||
if: "$get(recentTop).value"
|
||||
name: shiyong
|
||||
label: 必看精选
|
||||
label: 实用教程
|
||||
placeholder: 请输入地址
|
||||
validation: "url"
|
||||
- $formkit: radio
|
||||
|
@ -500,6 +465,28 @@ spec:
|
|||
placeholder: '本文是原创文章,采用 <a target="_blank" href="/cc">CC BY-NC-ND 4.0</a> 协议,完整转载请注明来自 <a href="/" target="_blank" >程序员小航</a>'
|
||||
help: "版权声明内容,支持填入 HTML 标签"
|
||||
|
||||
- group: about
|
||||
label: 个人
|
||||
formSchema:
|
||||
- $formkit: repeater
|
||||
name: techStack
|
||||
label: 技术栈
|
||||
help: 个人技术栈
|
||||
value: []
|
||||
children:
|
||||
- $formkit: text
|
||||
name: name
|
||||
label: 名称
|
||||
placeholder: 请输入名称
|
||||
- $formkit: url
|
||||
name: url
|
||||
label: 路径
|
||||
placeholder: 请输入图标路径
|
||||
validation: "url"
|
||||
- $formkit: color
|
||||
name: background
|
||||
label: 背景色
|
||||
|
||||
- group: style
|
||||
label: 样式(WIP)
|
||||
formSchema:
|
||||
|
|
|
@ -7,8 +7,16 @@
|
|||
|
||||
<!-- 侧栏部件,不包含 toc 则直接遍历 -->
|
||||
<th:block th:if="${not #strings.contains(widgets, 'toc')}">
|
||||
<th:block th:each="widget : ${#strings.listSplit(widgets, ',')}">
|
||||
<th:block th:replace="'modules/widgets/aside/'+ ${widget}"/>
|
||||
<th:block th:each="widget,iterStat : ${#strings.listSplit(widgets, ',')}">
|
||||
|
||||
<th:block th:if="not ${iterStat.last}">
|
||||
<th:block th:replace="'modules/widgets/aside/'+ ${widget}"/>
|
||||
</th:block>
|
||||
<th:block th:if="${iterStat.last}">
|
||||
<div class="sticky_layout">
|
||||
<th:block th:replace="'modules/widgets/aside/'+ ${widget}"/>
|
||||
</div>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</th:block>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<!-- 社交链接,需要填入 href class title -->
|
||||
<div id="footer_deal"
|
||||
th:if="${not #lists.isEmpty(theme.config.footer.socialMedia)}"
|
||||
th:with="socialMedias = ${theme.config.sidebar.profile.socialMedia}">
|
||||
th:with="socialMedias = ${theme.config.footer.socialMedia}">
|
||||
<a class="deal_link" rel="external nofollow" target="_blank"
|
||||
th:each="socialMedia : ${socialMedias}"
|
||||
th:href="${socialMedia.url}"
|
||||
|
@ -52,7 +52,7 @@
|
|||
</div>
|
||||
<div class="footer-banner-right">
|
||||
<!-- 订阅 需要 RSS 插件支持 -->
|
||||
<!--<a class="footer-banner-link" href="/rss">订阅</a>-->
|
||||
<a class="footer-banner-link" href="/sitemap.xml" th:if="${pluginFinder.available('PluginSitemap')}">订阅</a>
|
||||
<a class="footer-banner-link" href="https://github.com/liuzhihang/halo-theme-hao">主题</a>
|
||||
<a class="footer-banner-link" href="/about">关于</a>
|
||||
<a class="footer-banner-link" href="https://beian.miit.gov.cn/#/Integrated/index"
|
||||
|
|
|
@ -70,7 +70,8 @@
|
|||
</div>
|
||||
|
||||
|
||||
<nav id="pagination" th:if="${posts.hasPrevious() || posts.hasNext()}" th:with="totalPages = ${posts.totalPages}, pageIndex = ${posts.page}">
|
||||
<nav id="pagination" th:if="${posts.hasPrevious() || posts.hasNext()}"
|
||||
th:with="totalPages = ${posts.totalPages}, pageIndex = ${posts.page}">
|
||||
<!-- 页面小于 7 -->
|
||||
<div class="pagination" th:if="${(totalPages le 7) && (totalPages gt 0)}">
|
||||
|
||||
|
@ -80,10 +81,10 @@
|
|||
<div class="pagination_tips_prev">上页</div>
|
||||
</a>
|
||||
|
||||
<!-- th:href="${PostFinder.list(index, posts.size)}" -->
|
||||
<a class="page-number"
|
||||
th:classappend="${index eq pageIndex} ? 'current'"
|
||||
th:each="index : ${#numbers.sequence(1, totalPages)}"
|
||||
th:href="@{'/page/' + ${index}}"
|
||||
th:text="${index}">
|
||||
</a>
|
||||
|
||||
|
@ -111,10 +112,10 @@
|
|||
|
||||
|
||||
<!-- 当前页面小于等于4 -->
|
||||
<!-- TODO 需要添加 th:href 跳转地址 -->
|
||||
<a class="page-number"
|
||||
th:classappend="${index eq pageIndex} ? 'current'"
|
||||
th:each="index:${#numbers.sequence(2,5)}"
|
||||
th:each="index : ${#numbers.sequence(2,5)}"
|
||||
th:href="@{'/page/' + ${index}}"
|
||||
th:if="${pageIndex le 4}"
|
||||
th:text="${index}">
|
||||
</a>
|
||||
|
@ -123,23 +124,21 @@
|
|||
|
||||
|
||||
<!-- 最后一页与当前页面之差小于等于3 -->
|
||||
<!-- 需要添加 th:href 跳转地址 -->
|
||||
<a class="page-number" th:if="${totalPages - pageIndex le 3}">...</a>
|
||||
<!-- 需要添加 th:href 跳转地址 -->
|
||||
<a class="page-number"
|
||||
th:classappend="${index eq pageIndex} ? 'current'"
|
||||
th:each="index : ${#numbers.sequence(totalPages - 4, totalPages - 1)}"
|
||||
th:href="@{'/page/' + ${index}}"
|
||||
th:if="${totalPages - pageIndex le 3}"
|
||||
th:text="${index}">
|
||||
</a>
|
||||
|
||||
|
||||
<!-- 最后一页与当前页面之差大于3 且当前页面大于4 -->
|
||||
<!-- 需要添加 th:href 跳转地址 -->
|
||||
<a class="page-number" th:if="${(pageIndex gt 4) && (totalPages - pageIndex gt 3)}">...</a>
|
||||
<!-- 需要添加 th:href 跳转地址 -->
|
||||
<a class="page-number"
|
||||
th:each="index : ${#numbers.sequence(pageIndex - 1,pageIndex + 1)}"
|
||||
th:href="@{'/page/' + ${index}}"
|
||||
th:if="${(pageIndex gt 4) && (totalPages - pageIndex gt 3)}"
|
||||
th:text="${index}">
|
||||
</a>
|
||||
|
|
|
@ -13,9 +13,10 @@
|
|||
th:utext="${theme.config.top.bannersTitleSmall}"></div>
|
||||
</div>
|
||||
|
||||
<!-- 后台可配置,未配置时使用默认值-->
|
||||
<div class="tags-group-all">
|
||||
<div class="tags-group-wrapper" th:if="${#lists.isEmpty(theme.config.top.bannersIconPair)}">
|
||||
|
||||
<!-- banners 使用默认值-->
|
||||
<div class="tags-group-wrapper" th:if="${#strings.equals(theme.config.top.bannersBackground, 'default')}">
|
||||
<div class="tags-group-icon-pair">
|
||||
<div class="tags-group-icon" style="background:#989bf8">
|
||||
<img th:src="@{/assets/images/icons/AfterEffect.png}" title="AfterEffect">
|
||||
|
@ -129,17 +130,26 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- banners 使用默认值-->
|
||||
<div class="tags-group-wrapper"
|
||||
th:if="${not #lists.isEmpty(theme.config.top.bannersIconPair)}"
|
||||
th:with="iconPairs = ${theme.config.top.bannersIconPair}" >
|
||||
<div class="tags-group-icon-pair" th:each="iconPair : ${iconPairs}">
|
||||
<div class="tags-group-icon" th:style="'background:' + ${iconPair.top.background}">
|
||||
<img th:src="@{${iconPair.top.url}}" th:title="${iconPair.top.name}">
|
||||
th:if="${#strings.equals(theme.config.top.bannersBackground, 'techStack')}"
|
||||
th:with="techs = ${theme.config.about.techStack}">
|
||||
<th:block th:each="tech,iterStat : ${techs}">
|
||||
<div class="tags-group-icon-pair" th:if="${iterStat.odd}">
|
||||
<div class="tags-group-icon"
|
||||
th:style="'background:' + ${techOdd.background}"
|
||||
th:with="techOdd = ${techs.get(iterStat.index - 1)}">
|
||||
<img th:src="@{${techOdd.url}}" th:title="${techOdd.name}">
|
||||
</div>
|
||||
|
||||
<div class="tags-group-icon"
|
||||
th:style="'background:' + ${techEven.background}"
|
||||
th:with="techEven = ${tech}">
|
||||
<img th:src="@{${techEven.url}}" th:title="${techEven.name}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags-group-icon" th:style="'background:' + ${iconPair.bottom.background}">
|
||||
<img th:src="@{${iconPair.bottom.url}}" th:title="${iconPair.bottom.name}">
|
||||
</div>
|
||||
</div>
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 随机前往一篇文章 -->
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<a class="site-page child" th:href="@{${childMenu.status.href}}">
|
||||
<!-- 这里应该有一个 icon 暂时还不支持 -->
|
||||
<!--<i class="fa-fw fa-duotone fa-list-timeline"></i>-->
|
||||
<span th:text="${menuItem.status.displayName}"></span>
|
||||
<span th:text="${childMenu.status.displayName}"></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue