From b6eb77ae63b37ec9059396d3772975a926bbd568 Mon Sep 17 00:00:00 2001 From: Pang Date: Sat, 24 Feb 2024 09:18:12 +0800 Subject: [PATCH] no message --- public/site/css/download.css | 16 ++++++++++------ public/site/en/download.html | 14 ++++++-------- public/site/en/help.html | 2 +- public/site/en/log.html | 13 +++++++++++-- public/site/zh/download.html | 14 ++++++-------- public/site/zh/help.html | 2 +- public/site/zh/log.html | 13 +++++++++++-- 7 files changed, 46 insertions(+), 28 deletions(-) diff --git a/public/site/css/download.css b/public/site/css/download.css index d19bc88c0..bf5cf4cd2 100644 --- a/public/site/css/download.css +++ b/public/site/css/download.css @@ -84,7 +84,7 @@ color: var(--text-color); } .update-ul{ - width: 515px; + width: 465px; } .update-item{ display: flex; @@ -127,7 +127,7 @@ background-size: contain; } .update-r{ - max-width: 622px; + max-width: 672px; margin-left: 123px; box-shadow: 0px 2px 8px 4px rgba(0, 0, 0, 0.05); border-radius: 45px; @@ -168,9 +168,13 @@ } .download-other-btn{ padding: 10px 16px; - color: var(--txt-theme-color); + color: var(--txt-gray-color); + opacity: .7; border-radius: 8px; - margin-top: 32px; - margin-bottom: 120px; - border: 1px solid var(--txt-theme-color); + margin-top: 64px; + margin-bottom: 100px; +} +.download-other-btn:hover{ + color: var(--txt-theme-color); + opacity: 1; } diff --git a/public/site/en/download.html b/public/site/en/download.html index 3115359a9..d6d39e0ac 100644 --- a/public/site/en/download.html +++ b/public/site/en/download.html @@ -105,10 +105,10 @@ ios ios -
+ Scan download,ios Download -
+
  • @@ -394,17 +394,15 @@ function movieHandle(flag=true){ } if(index==0){ if(isIos){ - // Safari - if (navigator.userAgent.indexOf('Safari') !== -1 && navigator.userAgent.indexOf('Chrome') === -1 && navigator.userAgent.indexOf('Edge') === -1) { - return (window.open(item.children[0].href,"_blank")); - } - return window.open(item.children[0].href,"_blank") + window.location.href = item.children[0].href + return } return showBox("Not supported on current device") } if(index==1){ if(isAndroid){ - return window.open(item.children[0].href,"_blank") + window.location.href = item.children[0].href + return } return showBox("Not supported on current device") } diff --git a/public/site/en/help.html b/public/site/en/help.html index 57c98bf65..e778a924f 100644 --- a/public/site/en/help.html +++ b/public/site/en/help.html @@ -2375,7 +2375,7 @@ const offset = 90; // 上偏移量(可以根据需要进行调整) const targetPosition = content.getBoundingClientRect().top + - window.pageYOffset; // 目标位置相对于视口的位置 + window.scrollY; // 目标位置相对于视口的位置 // 滚动到目标位置,并考虑上偏移量 window.scrollTo({ top: targetPosition - offset, diff --git a/public/site/en/log.html b/public/site/en/log.html index d5457db66..6f0e8bf7e 100644 --- a/public/site/en/log.html +++ b/public/site/en/log.html @@ -416,7 +416,16 @@ function domHandle (html){ value.classList.toggle('active', value === clickedItem); } } - window.location.hash = '#section-'+updateLogNum + window.history.scrollRestoration = 'manual'; + const topSection = changelog.querySelector(`#section-${updateLogNum}`) + if (topSection) { + const offset = 90; // 上偏移量(可以根据需要进行调整) + const targetPosition = topSection.getBoundingClientRect().top + window.scrollY; // 目标位置相对于视口的位置 + // 滚动到目标位置,并考虑上偏移量 + window.scrollTo({ + top: targetPosition-offset, + }); + } } handleMou() localStorage.removeItem('update_log_num') @@ -459,7 +468,7 @@ function logsHandler(){ const content = document.getElementById(`${id}`) if (content) { const offset = 90; // 上偏移量(可以根据需要进行调整) - const targetPosition = content.getBoundingClientRect().top + window.pageYOffset; // 目标位置相对于视口的位置 + const targetPosition = content.getBoundingClientRect().top + window.scrollY; // 目标位置相对于视口的位置 // 滚动到目标位置,并考虑上偏移量 window.scrollTo({ top: targetPosition-offset, diff --git a/public/site/zh/download.html b/public/site/zh/download.html index 6e7e31a1e..f28f613e1 100644 --- a/public/site/zh/download.html +++ b/public/site/zh/download.html @@ -105,10 +105,10 @@ ios ios - +
  • @@ -392,17 +392,15 @@ function movieHandle(flag=true){ } if(index==0){ if(isIos){ - // Safari - if (navigator.userAgent.indexOf('Safari') !== -1 && navigator.userAgent.indexOf('Chrome') === -1 && navigator.userAgent.indexOf('Edge') === -1) { - return (window.open(item.children[0].href,"_blank")); - } - return window.open(item.children[0].href,"_blank") + window.location.href = item.children[0].href + return } return showBox("当前终端不支持") } if(index==1){ if(isAndroid){ - return window.open(item.children[0].href,"_blank") + window.location.href = item.children[0].href + return } return showBox("当前终端不支持") } diff --git a/public/site/zh/help.html b/public/site/zh/help.html index b21ca2f83..10d7b2e1c 100644 --- a/public/site/zh/help.html +++ b/public/site/zh/help.html @@ -759,7 +759,7 @@ tabItems.forEach(item=>{ const content = document.getElementById(`${id}`) if (content) { const offset = 90; // 上偏移量(可以根据需要进行调整) - const targetPosition = content.getBoundingClientRect().top + window.pageYOffset; // 目标位置相对于视口的位置 + const targetPosition = content.getBoundingClientRect().top + window.scrollY; // 目标位置相对于视口的位置 // 滚动到目标位置,并考虑上偏移量 window.scrollTo({ top: targetPosition-offset, diff --git a/public/site/zh/log.html b/public/site/zh/log.html index b61ce94e4..405e0bed8 100644 --- a/public/site/zh/log.html +++ b/public/site/zh/log.html @@ -414,7 +414,16 @@ const domHandle = (html)=>{ value.classList.toggle('active', value === clickedItem); } } - window.location.hash = '#section-'+updateLogNum + window.history.scrollRestoration = 'manual'; + const topSection = changelog.querySelector(`#section-${updateLogNum}`) + if (topSection) { + const offset = 90; // 上偏移量(可以根据需要进行调整) + const targetPosition = topSection.getBoundingClientRect().top + window.scrollY; // 目标位置相对于视口的位置 + // 滚动到目标位置,并考虑上偏移量 + window.scrollTo({ + top: targetPosition-offset, + }); + } } handleMou() localStorage.removeItem('update_log_num') @@ -457,7 +466,7 @@ function logsHandler(){ const content = document.getElementById(`${id}`) if (content) { const offset = 90; // 上偏移量(可以根据需要进行调整) - const targetPosition = content.getBoundingClientRect().top + window.pageYOffset; // 目标位置相对于视口的位置 + const targetPosition = content.getBoundingClientRect().top + window.scrollY; // 目标位置相对于视口的位置 // 滚动到目标位置,并考虑上偏移量 window.scrollTo({ top: targetPosition-offset,