diff --git a/public/site/css/help.css b/public/site/css/help.css index fb85f031d..e5bde3a7f 100644 --- a/public/site/css/help.css +++ b/public/site/css/help.css @@ -191,8 +191,3 @@ position: sticky; top: 80px; } -.help-a{ - display: block; - width: 100%; - height: 100%; -} diff --git a/public/site/en/help.html b/public/site/en/help.html index e654eb0c2..4aa263b4b 100644 --- a/public/site/en/help.html +++ b/public/site/en/help.html @@ -765,5 +765,32 @@ document.addEventListener("DOMContentLoaded", function() { }); } }); +//获取导航链接元素 +const anchorLinks = document.querySelectorAll(".help-a"); +// 监听页面滚动事件 +window.addEventListener('scroll', () => { + // 遍历导航链接元素 + anchorLinks.forEach((link,index) => { + const sectionId = link.getAttribute('href'); // 获取锚点ID + const section = document.querySelector(sectionId); // 获取对应的锚点元素 + if ( + section && + section.getBoundingClientRect().top>=110&§ion.getBoundingClientRect().top<=150 + ) { + rm() + link.parentNode.classList.add('active'); + } + if(section &&index===0&§ion.getBoundingClientRect().top>150){ + rm() + link.parentNode.classList.add('active') + } + }); +}); + +const rm = () => { + anchorLinks.forEach(link1=>{ + link1.parentNode.classList.remove('active') + }) +} diff --git a/public/site/en/log.html b/public/site/en/log.html index 52b333cc0..b8df8aafe 100644 --- a/public/site/en/log.html +++ b/public/site/en/log.html @@ -385,7 +385,6 @@ document.addEventListener("DOMContentLoaded", function() { } }); } - }); diff --git a/public/site/zh/help.html b/public/site/zh/help.html index cf2ce6e24..6daa0f939 100644 --- a/public/site/zh/help.html +++ b/public/site/zh/help.html @@ -275,82 +275,82 @@
  • 基本
      -
    1. - 了解DooTask +
    2. + 了解DooTask
    3. -
    4. - 注册和登录 +
    5. + 注册和登录
    6. -
    7. - 通知公告 +
    8. + 通知公告
    9. -
    10. - 帐户设置 +
    11. + 帐户设置
  • 项目
      -
    1. - 了解项目 +
    2. + 了解项目
    3. -
    4. - 创建项目 +
    5. + 创建项目
    6. -
    7. - 任务列表 +
    8. + 任务列表
    9. -
    10. - 项目进展 +
    11. + 项目进展
  • 任务
      -
    1. - 任务的使用 +
    2. + 任务的使用
    3. -
    4. - 任务优先级 +
    5. + 任务优先级
    6. -
    7. - 评论与新闻 +
    8. + 评论与新闻
    9. -
    10. - 次要任务 +
    11. + 次要任务
  • 团队
      -
    1. - 团队和成员 +
    2. + 团队和成员
    3. -
    4. - 成员分组 +
    5. + 成员分组
    6. -
    7. - 团队管理 +
    8. + 团队管理
    9. -
    10. - 团队设置 +
    11. + 团队设置
  • 文件
      -
    1. - 文件类型 +
    2. + 文件类型
    3. -
    4. - 共享的文件 +
    5. + 共享的文件
    6. -
    7. - 访问权限 +
    8. + 访问权限
  • @@ -723,17 +723,28 @@