mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-27 21:28:12 +00:00
fix:修复导航按钮
This commit is contained in:
parent
45746684d5
commit
fd5088836b
3
public/site/css/common.css
vendored
3
public/site/css/common.css
vendored
@ -64,9 +64,6 @@ img {
|
||||
line-height: 16px;
|
||||
}
|
||||
.txt-4001620{
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
line-height: 20px;
|
||||
|
||||
9
public/site/css/log.css
vendored
9
public/site/css/log.css
vendored
@ -60,7 +60,7 @@
|
||||
overflow-y:scroll;
|
||||
}
|
||||
.logs-r::-webkit-scrollbar{
|
||||
width: 0 !important
|
||||
width: 0 !important
|
||||
}
|
||||
.logs-h1{
|
||||
color: var(--text-color);
|
||||
@ -131,4 +131,9 @@
|
||||
}
|
||||
.filings{
|
||||
border-top: 1px solid var(--border-color);
|
||||
}
|
||||
}
|
||||
.log-a{
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@ -239,7 +239,7 @@ const domHandle = (html)=>{
|
||||
const rlog = document.querySelector('.logs-l-1920');
|
||||
const rlog2 = document.querySelector('.logs-l-768');
|
||||
const versions = html.match(/<h2>(.*?)<\/h2>/g).slice(0, 10);
|
||||
|
||||
|
||||
const versionsNumbers = versions.map(str => str.split('<h2>[')[1].split(']</h2>')[0]);
|
||||
for (let i = 0; i < versionsNumbers.length; i++) {
|
||||
const updatesHtml = html.split(versionsNumbers[i])[1].split('<h2>')[0].match(/<li>(.*?)<\/li>/g);
|
||||
@ -247,7 +247,7 @@ const domHandle = (html)=>{
|
||||
const rLi = document.createElement('li');
|
||||
rLi.className = `l-ul-item ${i==0?'active':''}`;
|
||||
rLi.innerHTML = `
|
||||
<a class="txt-4001620 txt" href="#section-${i+1}">v${versionsNumbers[i]} 更新</a>
|
||||
<a class="txt-4001620 txt log-a" href="#section-${i+1}">v${versionsNumbers[i]} 更新</a>
|
||||
`;
|
||||
const rLi2 = document.createElement('li');
|
||||
rLi2.className = `l-ul-item`;
|
||||
@ -256,7 +256,7 @@ const domHandle = (html)=>{
|
||||
logsDrawer.classList.remove('open-logs-drawer');
|
||||
});
|
||||
rLi2.innerHTML = `
|
||||
<a class="txt-4001620 txt" href="#section-${i+1}" >v${versionsNumbers[i]} 更新</a>
|
||||
<a class="txt-4001620 txt log-a" href="#section-${i+1}" >v${versionsNumbers[i]} 更新</a>
|
||||
`;
|
||||
rlog.appendChild(rLi);
|
||||
rlog2.appendChild(rLi2);
|
||||
@ -271,7 +271,7 @@ const domHandle = (html)=>{
|
||||
getUpdatesFromHtml(updatesHtmlText,li)
|
||||
}
|
||||
let updateLogNum = localStorage.getItem('update_log_num')
|
||||
/* logs点击激活函数 */
|
||||
/* logs点击激活函数 */
|
||||
let isThrottled = false;
|
||||
let timerId;
|
||||
const logs_tabs = document.querySelector('.logs-l-1920');
|
||||
@ -348,4 +348,4 @@ if(!logs) {
|
||||
domHandle(logs)
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user