Merge pull request #427 from chengzhongxue/main

添加配置主题基色
This commit is contained in:
困困鱼 2023-08-17 12:19:10 +08:00 committed by GitHub
commit 2e8559a283
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 109 additions and 6 deletions

View File

@ -2245,6 +2245,14 @@ spec:
value: dark
- label: 浅色
value: light
- $formkit: color
name: themeLightSkin
label: 主题浅色基色
value: "#425AEF"
- $formkit: color
name: themeDarkSkin
label: 主题深色基色
value: "#f2b94b"
- $formkit: radio
name: universe
label: 深色模式粒子效果

View File

@ -92,13 +92,13 @@
--heo-maskbgdeep: rgba(0, 0, 0, 0.85);
--heo-hovertext: #0A84FF;
--heo-ahoverbg: #fff;
--heo-lighttext: #f2b94b;
--heo-lighttext: var(--heo-theme);
--heo-secondtext: #a1a2b8;
--heo-scrollbar: rgba(200, 200, 223, 0.4);
--heo-card-btn-bg: #30343f;
--heo-post-blockquote-bg: #000;
--heo-post-tabs-bg: #121212;
--heo-secondbg: #30343f;
--heo-secondbg: #21232a;
--heo-shadow-nav: 0 5px 20px 0px rgba(28, 28, 28, 0.4);
--heo-card-bg: #1d1e22;
--heo-card-bg-op: var(--heo-white-op);
@ -17324,6 +17324,82 @@ img.rss-plan-icon {
opacity: .6
}
/* 分页搜索框 */
.pagination input {
width: 40px;
height: 40px;
border-radius: 8px;
border: var(--style-border-always);
transition: .3s;
outline-style: none;
font-size: 16px;
padding-left: 12px;
background: var(--heo-secondbg);
color: var(--heo-fontcolor)
}
.pagination .toPageGroup input:focus,.pagination .toPageGroup:hover input {
border: var(--style-border-hover-always);
outline-style: none;
width: 100px
}
.toPageGroup {
display: flex;
position: relative;
margin: 0 .3rem
}
a#toPageButton {
display: flex;
position: absolute;
width: 40px;
height: 40px;
right: 0;
top: 0;
border-radius: 8px;
justify-content: center;
align-items: center;
transition: .3s;
background: var(--heo-card-bg);
border: var(--style-border-always);
cursor: text;
pointer-events: none
}
.toPageGroup:focus-within a#toPageButton,.toPageGroup:hover a#toPageButton {
width: 30px;
height: 30px;
right: 4px;
top: 5px;
background: var(--heo-card-bg);
border: 1px solid var(--heo-none);
border-radius: 4px;
opacity: .2
}
.toPageGroup:focus-within a#toPageButton.haveValue {
opacity: 1;
cursor: pointer
}
a#toPageButton.haveValue {
opacity: 1!important;
cursor: pointer!important;
pointer-events: all
}
a#toPageButton.haveValue:hover {
background: var(--heo-theme);
color: var(--heo-white)
}
@media screen and (max-width: 768px) {
.toPageGroup {
display:none
}
}
/* 文章目录样式 */
a.toc-link {

View File

@ -249,8 +249,8 @@
cht_to_chs: "你已切换为简体",
day_to_night: "你已切换为深色模式",
night_to_day: "你已切换为浅色模式",
bgLight: "#49b1f5",
bgDark: "#121212",
bgLight: "[(${theme.config.style.themeLightSkin})]",
bgDark: "[(${theme.config.style.themeDarkSkin})]",
position: "top-center",
},
prism: {

View File

@ -205,6 +205,9 @@
</div>
<!-- 根据配置设置 css 变量值,全局 css 通过变量值进行处理 -->
<th:block th:replace="modules/variables/layout"></th:block>
<script data-pjax="">

View File

@ -0,0 +1,16 @@
<style type="text/css" th:inline="css" th:fragment="variables-root">
[data-theme=light] {
--heo-theme: [(${theme.config.style.themeLightSkin})] !important;
--heo-theme-op: [(${theme.config.style.themeLightSkin})]23 !important;
--heo-theme-op-deep: [(${theme.config.style.themeLightSkin})]dd !important;
--heo-theme-none: [(${theme.config.style.themeLightSkin})]00 !important;
}
[data-theme=dark] {
--heo-theme: [(${theme.config.style.themeDarkSkin})] !important;
--heo-theme-op: [(${theme.config.style.themeDarkSkin})]23 !important;
--heo-theme-op-deep: [(${theme.config.style.themeDarkSkin})]dd !important;
--heo-theme-none: [(${theme.config.style.themeDarkSkin})]00 !important;
}
</style>

View File

@ -38,7 +38,7 @@
<div class="pagination_tips_next">下页</div>
<i class="haofont hao-icon-chevron-right fa-fw"></i>
</a>
<div th:if="${pageInfo.totalPages > 2}" class="toPageGroup">
<div th:if="${pageInfo.totalPages > 1}" class="toPageGroup">
<input id="toPageText" maxlength="3" title="跳转到指定页面"
oninput="value=value.replace(/[^0-9]/g,'')"
onkeyup="if (this.value === '0') this.value = ''">
@ -50,4 +50,4 @@
</div>
</nav>
</html>
</html>