简繁转换优化

This commit is contained in:
1152958806@qq.com 2023-09-07 22:14:33 +08:00
parent 0b58e05ae8
commit d2b7a5885a
9 changed files with 10 additions and 11 deletions

View File

@ -56,7 +56,7 @@ document.addEventListener("DOMContentLoaded", function () {
}
}
function translatePage() {
if (rm) rm.hideRightMenu();
if (rm && GLOBAL_CONFIG.rightMenuEnable) rm.hideRightMenu();
if (targetEncoding === 1) {
currentEncoding = 1;
targetEncoding = 2;

View File

@ -617,6 +617,7 @@ function listenToPageInputPress() {
function initBlog() {
// 图片主色
GLOBAL_CONFIG.source.post.dynamicBackground && coverColor(),
GLOBAL_CONFIG.rightMenuEnable && addRightMenuClickEvent(),
percent(),
heo.topCategoriesBarScroll(),
heo.initIndexEssay(),

View File

@ -20,7 +20,7 @@
<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}">
*::-webkit-scrollbar-thumb {
@ -262,8 +262,8 @@
translate: {
defaultEncoding:[[${theme.config.style.translate.defaultEncoding}]],
translateDelay:0,
msgToTraditionalChinese:"",
msgToSimplifiedChinese:"",
msgToTraditionalChinese:"",
msgToSimplifiedChinese:"",
rightMenuMsgToTraditionalChinese:"轉為繁體",
rightMenuMsgToSimplifiedChinese:"转为简体"
},

View File

@ -90,11 +90,14 @@
<!-- 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 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') &&
not #strings.isEmpty(theme.config.comments.twikoos.envId) &&
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 -->
<th:block th:replace="~{modules/common/toc-bot :: toc-bot}"></th:block>

View File

@ -1,8 +1,7 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!-- 右键菜单 -->
<div th:fragment="right-menu" th:if="${theme.config.tool.rightMenu.rightMenuEnable}">
<script th:src="${assets_link + '/zhheo/rightmenu.js'}"></script>
<div class="js-pjax" th:fragment="right-menu" th:if="${theme.config.tool.rightMenu.rightMenuEnable}">
<div id="rightMenu">
<div class="rightMenu-group rightMenu-small">
<div class="rightMenu-item" id="menu-backward"><i class="haofont hao-icon-arrow-left"></i></div>
@ -119,9 +118,6 @@
</div>
</div>
<div id="rightmenu-mask"></div>
<script>
addRightMenuClickEvent();
</script>
</div>
</html>

View File

@ -114,7 +114,6 @@
</div>
<div class="button-group">
<div class="console-btn-item">
<!-- 用到了 rightmenu.js 的功能,还需要调整 -->
<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>
</a>