Merge pull request #356 from chengzhongxue/main

导航栏右侧添加切换模式,解决官方评论不加载问题
This commit is contained in:
困困鱼 2023-08-02 22:47:13 +08:00 committed by GitHub
commit b2c5340d66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 10 deletions

View File

@ -73,6 +73,15 @@ spec:
value: true value: true
- label: 关闭 - label: 关闭
value: false value: false
- $formkit: radio
name: darkMode
label: 切换模式
value: true
options:
- label: 打开
value: true
- label: 关闭
value: false
- group: top - group: top
label: 顶部 label: 顶部
@ -121,6 +130,8 @@ spec:
value: false value: false
- $formkit: attachment - $formkit: attachment
name: index_video name: index_video
key: index_video
id: index_video
if: $get(enable_above).value && $get(enable_above_video).value if: $get(enable_above).value && $get(enable_above_video).value
label: 动态壁纸 label: 动态壁纸
placeholder: 请填写动态壁纸地址 placeholder: 请填写动态壁纸地址

View File

@ -17,7 +17,6 @@ var randomPostTips = ["钓到了绝世好文!", "在河边打了个喷嚏,
var randomPostClick = 0; var randomPostClick = 0;
function fetchRandomPost() { function fetchRandomPost() {
console.log(fdata.apiurl)
if (randomPostWorking == false) { if (randomPostWorking == false) {
randomPostWorking = true; randomPostWorking = true;
//获取旋转角度 //获取旋转角度

View File

@ -154,7 +154,6 @@ function fetchNextArticle() {
} else if (start = articleNum) { } else if (start = articleNum) {
document.getElementById('cf-more').outerHTML = `<div id="cf-more" class="cf-new-add" onclick="loadNoArticle()"><small>一切皆有尽头!</small></div>` document.getElementById('cf-more').outerHTML = `<div id="cf-more" class="cf-new-add" onclick="loadNoArticle()"><small>一切皆有尽头!</small></div>`
} }
window.lazyLoadInstance.update()
} }
// 显示下一页文章,从本地缓存 nextArticle 中获取 // 显示下一页文章,从本地缓存 nextArticle 中获取

View File

@ -110,6 +110,9 @@
<!-- 动态标题 --> <!-- 动态标题 -->
<script th:replace="~{modules/common/diytitle :: diytitle}"></script> <script th:replace="~{modules/common/diytitle :: diytitle}"></script>
<!--官方评论插件js-->
<script th:if="${pluginFinder.available('PluginCommentWidget')}" src="/plugins/PluginCommentWidget/assets/static/comment-widget.iife.js"></script>
<div id="js-pjax"></div> <div id="js-pjax"></div>
<script th:if="${theme.config.envelope_comment.enable_danmu}" th:src="${assets_link + '/libs/twikoo/easy-Danmaku.js' + theme_version}" id="Danmaku"></script> <script th:if="${theme.config.envelope_comment.enable_danmu}" th:src="${assets_link + '/libs/twikoo/easy-Danmaku.js' + theme_version}" id="Danmaku"></script>

View File

@ -20,6 +20,14 @@
</a> </a>
</div> </div>
<!-- 切换模式 -->
<div class="nav-button" th:if="${theme.config.nav.right.darkMode}">
<a class="console_switchbutton" href="javascript:void(0);" onclick="rm.switchDarkMode()" rel="external nofollow"
title="切换模式 - 日夜交替,黑白互换。">
<i class="haofont hao-icon-circle-half-stroke" style="font-size: 1rem; font-weight: 700;"></i>
</a>
</div>
<!-- 搜索使用搜索插件 --> <!-- 搜索使用搜索插件 -->
<div class="nav-button" id="search-button" th:if="${pluginFinder.available('PluginSearchWidget')}"> <div class="nav-button" id="search-button" th:if="${pluginFinder.available('PluginSearchWidget')}">
<a class="site-page social-icon search" href="javascript:SearchWidget.open();" rel="external nofollow" <a class="site-page social-icon search" href="javascript:SearchWidget.open();" rel="external nofollow"
@ -28,14 +36,6 @@
</a> </a>
</div> </div>
<!-- 切换模式 -->
<!-- <div class="nav-button" th:if="${theme.config.nav.enableChangeColorScheme}">
<a class="console_switchbutton" href="javascript:void(0);" onclick="rm.switchDarkMode()" rel="external nofollow"
title="切换模式 - 日夜交替,黑白互换。">
<i class="haofont hao-icon-circle-half-stroke" style="font-size: 1rem; font-weight: 700;"></i>
</a>
</div> -->
<div class="nav-button" id="nav-console"> <div class="nav-button" id="nav-console">
<a class="console_switchbutton" href="javascript:void(0);" <a class="console_switchbutton" href="javascript:void(0);"
onclick="heo.showConsole()" rel="external nofollow" title="显示中控台"> onclick="heo.showConsole()" rel="external nofollow" title="显示中控台">