简繁转换优化
This commit is contained in:
parent
0b58e05ae8
commit
d2b7a5885a
|
@ -56,7 +56,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function translatePage() {
|
function translatePage() {
|
||||||
if (rm) rm.hideRightMenu();
|
if (rm && GLOBAL_CONFIG.rightMenuEnable) rm.hideRightMenu();
|
||||||
if (targetEncoding === 1) {
|
if (targetEncoding === 1) {
|
||||||
currentEncoding = 1;
|
currentEncoding = 1;
|
||||||
targetEncoding = 2;
|
targetEncoding = 2;
|
||||||
|
|
|
@ -617,6 +617,7 @@ function listenToPageInputPress() {
|
||||||
function initBlog() {
|
function initBlog() {
|
||||||
// 图片主色
|
// 图片主色
|
||||||
GLOBAL_CONFIG.source.post.dynamicBackground && coverColor(),
|
GLOBAL_CONFIG.source.post.dynamicBackground && coverColor(),
|
||||||
|
GLOBAL_CONFIG.rightMenuEnable && addRightMenuClickEvent(),
|
||||||
percent(),
|
percent(),
|
||||||
heo.topCategoriesBarScroll(),
|
heo.topCategoriesBarScroll(),
|
||||||
heo.initIndexEssay(),
|
heo.initIndexEssay(),
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
<link rel="stylesheet" th:href="${assets_link + '/zhheo/custom.css' + theme_version}">
|
<link rel="stylesheet" th:href="${assets_link + '/zhheo/custom.css' + theme_version}">
|
||||||
|
|
||||||
<link rel="stylesheet" th:href="${assets_link + '/libs/twikoo/commentBarrage.css'}">
|
<link rel="stylesheet" th:href="${assets_link + '/zhheo/commentBarrage.css'}">
|
||||||
|
|
||||||
<style th:if="${theme.config.other.scrollbarLinearGradientEnable}">
|
<style th:if="${theme.config.other.scrollbarLinearGradientEnable}">
|
||||||
*::-webkit-scrollbar-thumb {
|
*::-webkit-scrollbar-thumb {
|
||||||
|
@ -262,8 +262,8 @@
|
||||||
translate: {
|
translate: {
|
||||||
defaultEncoding:[[${theme.config.style.translate.defaultEncoding}]],
|
defaultEncoding:[[${theme.config.style.translate.defaultEncoding}]],
|
||||||
translateDelay:0,
|
translateDelay:0,
|
||||||
msgToTraditionalChinese:"简",
|
msgToTraditionalChinese:"繁",
|
||||||
msgToSimplifiedChinese:"繁",
|
msgToSimplifiedChinese:"简",
|
||||||
rightMenuMsgToTraditionalChinese:"轉為繁體",
|
rightMenuMsgToTraditionalChinese:"轉為繁體",
|
||||||
rightMenuMsgToSimplifiedChinese:"转为简体"
|
rightMenuMsgToSimplifiedChinese:"转为简体"
|
||||||
},
|
},
|
||||||
|
|
|
@ -90,11 +90,14 @@
|
||||||
<!-- swiper 在瞬间滚动时会使用 -->
|
<!-- swiper 在瞬间滚动时会使用 -->
|
||||||
<script data-pjax src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/Swiper/6.6.2/swiper-bundle.min.js"></script>
|
<script data-pjax src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/Swiper/6.6.2/swiper-bundle.min.js"></script>
|
||||||
|
|
||||||
|
<!-- 右键菜单 -->
|
||||||
|
<script th:if="${theme.config.tool.rightMenu.rightMenuEnable}" th:src="${assets_link + '/zhheo/rightmenu.js'}"></script>
|
||||||
|
|
||||||
<!-- 评论弹幕 -->
|
<!-- 评论弹幕 -->
|
||||||
<script th:if="${theme.config.comments.twikooEnable && #strings.equals(theme.config.comments.use, 'Twikoo') &&
|
<script th:if="${theme.config.comments.twikooEnable && #strings.equals(theme.config.comments.use, 'Twikoo') &&
|
||||||
not #strings.isEmpty(theme.config.comments.twikoos.envId) &&
|
not #strings.isEmpty(theme.config.comments.twikoos.envId) &&
|
||||||
not #strings.isEmpty(theme.config.comments.twikoos.accessToken)}" data-pjax=""
|
not #strings.isEmpty(theme.config.comments.twikoos.accessToken)}" data-pjax=""
|
||||||
th:src="${assets_link + '/libs/twikoo/commentBarrage.js'}"></script>
|
th:src="${assets_link + '/zhheo/commentBarrage.js'}"></script>
|
||||||
|
|
||||||
<!-- Tocbot 目录生成 start -->
|
<!-- Tocbot 目录生成 start -->
|
||||||
<th:block th:replace="~{modules/common/toc-bot :: toc-bot}"></th:block>
|
<th:block th:replace="~{modules/common/toc-bot :: toc-bot}"></th:block>
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||||
<!-- 右键菜单 -->
|
<!-- 右键菜单 -->
|
||||||
<div th:fragment="right-menu" th:if="${theme.config.tool.rightMenu.rightMenuEnable}">
|
<div class="js-pjax" th:fragment="right-menu" th:if="${theme.config.tool.rightMenu.rightMenuEnable}">
|
||||||
<script th:src="${assets_link + '/zhheo/rightmenu.js'}"></script>
|
|
||||||
<div id="rightMenu">
|
<div id="rightMenu">
|
||||||
<div class="rightMenu-group rightMenu-small">
|
<div class="rightMenu-group rightMenu-small">
|
||||||
<div class="rightMenu-item" id="menu-backward"><i class="haofont hao-icon-arrow-left"></i></div>
|
<div class="rightMenu-item" id="menu-backward"><i class="haofont hao-icon-arrow-left"></i></div>
|
||||||
|
@ -119,9 +118,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="rightmenu-mask"></div>
|
<div id="rightmenu-mask"></div>
|
||||||
<script>
|
|
||||||
addRightMenuClickEvent();
|
|
||||||
</script>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</html>
|
</html>
|
|
@ -114,7 +114,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
<div class="console-btn-item">
|
<div class="console-btn-item">
|
||||||
<!-- 用到了 rightmenu.js 的功能,还需要调整 -->
|
|
||||||
<a class="darkmode_switchbutton" href="javascript:void(0);" onclick="navFn.switchDarkMode();" rel="external nofollow"
|
<a class="darkmode_switchbutton" href="javascript:void(0);" onclick="navFn.switchDarkMode();" rel="external nofollow"
|
||||||
title="显示模式切换"><i class="haofont hao-icon-moon" style="font-size:1rem"></i>
|
title="显示模式切换"><i class="haofont hao-icon-moon" style="font-size:1rem"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in New Issue