mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
fix:优化官网布局与样式
This commit is contained in:
parent
1ca7e257ee
commit
4b62aa04aa
9
public/site/css/help.css
vendored
9
public/site/css/help.css
vendored
@ -187,3 +187,12 @@
|
||||
.filings {
|
||||
border-top: 1px solid var(--border-color);
|
||||
}
|
||||
.help-fiexd{
|
||||
position: sticky;
|
||||
top: 80px;
|
||||
}
|
||||
.help-a{
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
16
public/site/css/log.css
vendored
16
public/site/css/log.css
vendored
@ -15,7 +15,7 @@
|
||||
.logs-layout{
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
height: 929px;
|
||||
/* height: 929px; */
|
||||
}
|
||||
.logs-l{
|
||||
padding: 24px;
|
||||
@ -56,8 +56,8 @@
|
||||
.logs-r{
|
||||
border-left: 1px solid var(--border-color);
|
||||
padding-left: 32px;
|
||||
height: 929px;
|
||||
overflow-y:scroll;
|
||||
/* height: 929px; */
|
||||
/* overflow-y:scroll; */
|
||||
}
|
||||
.logs-r::-webkit-scrollbar{
|
||||
width: 0 !important
|
||||
@ -133,7 +133,11 @@
|
||||
border-top: 1px solid var(--border-color);
|
||||
}
|
||||
.log-a{
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.logs-sticky{
|
||||
position: sticky;
|
||||
top: 80px;
|
||||
}
|
||||
|
||||
2
public/site/css/product.css
vendored
2
public/site/css/product.css
vendored
@ -39,7 +39,7 @@
|
||||
.prooduct-list .prooduct-list-item.top{
|
||||
max-width: 180px;
|
||||
}
|
||||
.prooduct-list .prooduct-list-item:nth-of-type(5),.prooduct-list .prooduct-list-item:nth-of-type(9){
|
||||
.prooduct-list .prooduct-list-item:nth-of-type(6),.prooduct-list .prooduct-list-item:nth-of-type(10){
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
.prooduct-list .prooduct-list-item.bot{
|
||||
|
||||
@ -202,7 +202,7 @@
|
||||
</li>
|
||||
<li class="drawer-item-b">
|
||||
<div class="drawer-item">
|
||||
<a class="txt-4001620 txt" href="https://demo.dootask.com">Try Now</a>
|
||||
<a class="txt-4001620 txt" href="https://www.dootask.com/manage/dashboard">Try Now</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -212,7 +212,7 @@
|
||||
</li>
|
||||
<li class="drawer-item-b">
|
||||
<div class="drawer-item">
|
||||
<a class="txt-4001620 txt" href="https://demo.dootask.com">Try Now</a>
|
||||
<a class="txt-4001620 txt" href="https://www.dootask.com/manage/dashboard">Try Now</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@ -319,6 +319,8 @@
|
||||
</div>
|
||||
</body>
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/axios/1.3.6/axios.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/markdown-it@12"></script>
|
||||
<script src="../js/common.js"></script>
|
||||
<script>
|
||||
/* 下载应用的hover处理函数 */
|
||||
@ -358,6 +360,37 @@ const animateBoxes = ()=> {
|
||||
}
|
||||
window.addEventListener('scroll', animateBoxes);
|
||||
animateBoxes();
|
||||
|
||||
// 获取日志
|
||||
const logsItem = getItem('logs_dowmload_en')
|
||||
const updates = document.getElementById('releases');
|
||||
if(!logsItem) {
|
||||
const url = "http://192.168.100.122:2222/api/system/get/showitem"
|
||||
axios.get(url).then(res=>{
|
||||
const changelog=res.data.data.updateLog
|
||||
const regex = /## \[(.*?)\]\n([\s\S]*?)(?=\n\n## \[|$)/g;
|
||||
let match;
|
||||
const Versions = []
|
||||
while ((match = regex.exec(changelog)) !== null) {
|
||||
Versions.push(match[1])
|
||||
}
|
||||
const releases = Versions.slice(0,3).map((item,index)=>{
|
||||
return `
|
||||
<li class="update-item" onclick="localStorageHandle(${index+1})">
|
||||
<h5 class="txt-4001624 update-h5">DooTask ${item} update</h5>
|
||||
</li>
|
||||
`;
|
||||
}).join('')
|
||||
let record = {value: releases, expired: new Date().getTime() + 30 * 60 * 1000};
|
||||
localStorage.setItem('logs_dowmload_en', JSON.stringify(record))
|
||||
updates.innerHTML = releases;
|
||||
}).catch(err=>{
|
||||
console.log(err,"err");
|
||||
})
|
||||
}else{
|
||||
updates.innerHTML = logsItem;
|
||||
}
|
||||
|
||||
/* 生成网页二维码二维码 */
|
||||
if(window.location.host !== ''){
|
||||
const url = window.location.href;
|
||||
|
||||
@ -250,7 +250,7 @@
|
||||
</li>
|
||||
<li class="drawer-item-b">
|
||||
<div class="drawer-item">
|
||||
<a class="txt-4001620 txt" href="https://demo.dootask.com">Try Now</a>
|
||||
<a class="txt-4001620 txt" href="https://www.dootask.com/manage/dashboard">Try Now</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@ -266,7 +266,7 @@
|
||||
<i class="help-t-tit">Help Center</i>
|
||||
</div>
|
||||
<div class="help-layout">
|
||||
<div class="help-l">
|
||||
<div class="help-l help-fiexd">
|
||||
<form role="search" class="search-form">
|
||||
<i class="search-icon"></i>
|
||||
<input class="search-input mb-24" placeholder="Search" type="text">
|
||||
@ -276,16 +276,16 @@
|
||||
<h5 class="txt-4001620 help-h5 mb-16">Basic</h5>
|
||||
<ol class="help-l-ol">
|
||||
<li class="l-ul-item active">
|
||||
<a class="txt-4001620 txt" href="#section-1">Understanding DooTask</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-1">Understanding DooTask</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-2">Registration and Login</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-2">Registration and Login</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-3">Notification</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-3">Notification</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-4">Account Settings</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-4">Account Settings</a>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
@ -293,16 +293,16 @@
|
||||
<h5 class="txt-4001620 help-h5 mb-16">Projects</h5>
|
||||
<ol class="help-l-ol">
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-5">Understand Project</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-5">Understand Project</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-6">Create project</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-6">Create project</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-7">Task List</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-7">Task List</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-8">Project Progress</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-8">Project Progress</a>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
@ -310,16 +310,16 @@
|
||||
<h5 class="txt-4001620 help-h5 mb-16">Mission</h5>
|
||||
<ol class="help-l-ol">
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-9">Use of tasks</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-9">Use of tasks</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-10">Task Priority</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-10">Task Priority</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-11">Comments & News</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-11">Comments & News</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-12">Subtasks</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-12">Subtasks</a>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
@ -327,16 +327,16 @@
|
||||
<h5 class="txt-4001620 help-h5 mb-16">Team</h5>
|
||||
<ol class="help-l-ol">
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-13">Team and Members</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-13">Team and Members</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-14">Member Grouping</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-14">Member Grouping</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-15">Team Management</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-15">Team Management</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-16">Team Setup</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-16">Team Setup</a>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
@ -344,13 +344,13 @@
|
||||
<h5 class="txt-4001620 help-h5 mb-16">Files</h5>
|
||||
<ol class="help-l-ol">
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-17">File Type</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-17">File Type</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-18">Shared Files</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-18">Shared Files</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-19">Access Permissions</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-19">Access Permissions</a>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
@ -745,5 +745,25 @@ helpMenuBtn.addEventListener('click', () => {
|
||||
const closeHelpDraweHandle = ()=>{
|
||||
helpDrawer.classList.remove('open-help-drawer');
|
||||
}
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const anchors = document.querySelectorAll("a[href^='#section-']");
|
||||
// 遍历所有锚点链接
|
||||
for (const anchor of anchors) {
|
||||
anchor.addEventListener("click", function(event) {
|
||||
event.preventDefault(); // 阻止默认的跳转行为
|
||||
const targetId = anchor.getAttribute("href").substring(1); // 获取目标锚点的 id
|
||||
const targetElement = document.getElementById(targetId); // 获取目标锚点元素
|
||||
if (targetElement) {
|
||||
const offset = 90; // 上偏移量(可以根据需要进行调整)
|
||||
const targetPosition = targetElement.getBoundingClientRect().top + window.pageYOffset; // 目标位置相对于视口的位置
|
||||
// 滚动到目标位置,并考虑上偏移量
|
||||
window.scrollTo({
|
||||
top: targetPosition-offset,
|
||||
behavior: "smooth"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
|
||||
@ -183,7 +183,7 @@
|
||||
</li>
|
||||
<li class="drawer-item-b">
|
||||
<div class="drawer-item">
|
||||
<a class="txt-4001620 txt" href="https://demo.dootask.com">Try Now</a>
|
||||
<a class="txt-4001620 txt" href="https://www.dootask.com/manage/dashboard">Try Now</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -168,7 +168,7 @@
|
||||
</li>
|
||||
<li class="drawer-item-b">
|
||||
<div class="drawer-item">
|
||||
<a class="txt-4001620 txt" href="https://demo.dootask.com">Try Now</a>
|
||||
<a class="txt-4001620 txt" href="https://www.dootask.com/manage/dashboard">Try Now</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@ -184,14 +184,14 @@
|
||||
<i class="logs-t-tit">Logs</i>
|
||||
</div>
|
||||
<div class="logs-layout">
|
||||
<div class="logs-l">
|
||||
<div class="logs-l logs-sticky">
|
||||
<h5 class="logs-h5 mb-16">Logs</h5>
|
||||
<ul class="logs-l-ul logs-l-1920"></ul>
|
||||
</div>
|
||||
<div class="logs-r">
|
||||
<div class="logs-r" id="google_translate_element">
|
||||
<h1 class="txt-6003645 logs-h1 mb-36">DooTask Update Log </h1>
|
||||
<ul class="logs-r-ul"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
@ -209,7 +209,21 @@
|
||||
</body>
|
||||
<script src="https://cdn.jsdelivr.net/npm/markdown-it/dist/markdown-it.min.js"></script>
|
||||
<script src="../js/common.js"></script>
|
||||
<script src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
const targetId = window.location.hash.substring(1); // 获取 URL 中的锚点 id
|
||||
const targetElement = document.getElementById(targetId); // 获取目标锚点元素
|
||||
if (targetElement) {
|
||||
const offset = 80; // 上偏移量(可以根据需要进行调整)
|
||||
const targetPosition = targetElement.getBoundingClientRect().top + window.pageYOffset; // 目标位置相对于视口的位置
|
||||
// 滚动到目标位置,并考虑上偏移量
|
||||
window.scrollTo({
|
||||
top: targetPosition - offset,
|
||||
behavior: "smooth"
|
||||
});
|
||||
}
|
||||
};
|
||||
const getItem = (key)=> {
|
||||
var record = JSON.parse(localStorage.getItem(key));
|
||||
if (!record) return null;
|
||||
@ -234,12 +248,11 @@ const logsDrawer = document.querySelector('.logs-drawer');
|
||||
const closeLogsDraweHandle = ()=>{
|
||||
logsDrawer.classList.remove('open-logs-drawer');
|
||||
}
|
||||
const domHandle = (html)=>{
|
||||
function domHandle (html){
|
||||
const changelog = document.querySelector('.logs-r-ul');
|
||||
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);
|
||||
@ -270,6 +283,7 @@ const domHandle = (html)=>{
|
||||
`;
|
||||
changelog.appendChild(li);
|
||||
getUpdatesFromHtml(updatesHtmlText,li)
|
||||
// translateAllText()
|
||||
}
|
||||
let updateLogNum = localStorage.getItem('update_log_num')
|
||||
/* logs点击激活函数 */
|
||||
@ -322,7 +336,7 @@ const domHandle = (html)=>{
|
||||
});
|
||||
/* 从下载页跳转过来执行的函数 */
|
||||
const handleMou = ()=>{
|
||||
const clickedItem = logs_tabItems[updateLogNum];
|
||||
const clickedItem = logs_tabItems[updateLogNum-1];
|
||||
if (clickedItem && !clickedItem.classList.contains('active')) {
|
||||
// 切换激活状态
|
||||
for (let value of logs_tabItems) {
|
||||
@ -336,17 +350,42 @@ const domHandle = (html)=>{
|
||||
}
|
||||
const logs = getItem('logs')
|
||||
if(!logs) {
|
||||
fetch('https://raw.githubusercontent.com/kuaifan/dootask/pro/CHANGELOG.md')
|
||||
.then(response => response.text())
|
||||
.then(data => {
|
||||
const url = "http://192.168.100.122:2222/api/system/get/showitem"
|
||||
axios.get(url).then(res=>{
|
||||
const changelog=res.data.data.updateLog
|
||||
const md = new markdownit();
|
||||
const html = md.render(data);
|
||||
const html = md.render(changelog);
|
||||
let record = {value: html, expired: new Date().getTime() + 30 * 60 * 1000};
|
||||
localStorage.setItem('logs',JSON.stringify(record))
|
||||
domHandle(html)
|
||||
}).catch(err=>{
|
||||
console.log(err,"err");
|
||||
})
|
||||
}else{
|
||||
domHandle(logs)
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const anchors = document.querySelectorAll("a[href^='#section-']");
|
||||
// 遍历所有锚点链接
|
||||
for (const anchor of anchors) {
|
||||
anchor.addEventListener("click", function(event) {
|
||||
event.preventDefault(); // 阻止默认的跳转行为
|
||||
const targetId = anchor.getAttribute("href").substring(1); // 获取目标锚点的 id
|
||||
const targetElement = document.getElementById(targetId); // 获取目标锚点元素
|
||||
if (targetElement) {
|
||||
const offset = 80; // 上偏移量(可以根据需要进行调整)
|
||||
const targetPosition = targetElement.getBoundingClientRect().top + window.pageYOffset; // 目标位置相对于视口的位置
|
||||
// 滚动到目标位置,并考虑上偏移量
|
||||
window.scrollTo({
|
||||
top: targetPosition-offset,
|
||||
behavior: "smooth"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
|
||||
@ -281,7 +281,7 @@
|
||||
</li>
|
||||
<li class="drawer-item-b">
|
||||
<div class="drawer-item">
|
||||
<a class="txt-4001620 txt" href="https://demo.dootask.com">Try Now</a>
|
||||
<a class="txt-4001620 txt" href="https://www.dootask.com/manage/dashboard">Try Now</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -458,7 +458,7 @@
|
||||
</li>
|
||||
<li class="drawer-item-b">
|
||||
<div class="drawer-item">
|
||||
<a class="txt-4001620 txt" href="https://demo.dootask.com">Try Now</a>
|
||||
<a class="txt-4001620 txt" href="https://www.dootask.com/manage/dashboard">Try Now</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -173,7 +173,7 @@
|
||||
</li>
|
||||
<li class="drawer-item-b">
|
||||
<div class="drawer-item">
|
||||
<a class="txt-4001620 txt" href="https://demo.dootask.com">Try Now</a>
|
||||
<a class="txt-4001620 txt" href="https://www.dootask.com/manage/dashboard">Try Now</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -184,7 +184,7 @@
|
||||
</li>
|
||||
<li class="drawer-item-b">
|
||||
<div class="drawer-item">
|
||||
<a class="txt-4001620 txt" href="https://demo.dootask.com">立即体验</a>
|
||||
<a class="txt-4001620 txt" href="https://www.dootask.com/manage/dashboard">立即体验</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
2
public/site/js/common.js
vendored
2
public/site/js/common.js
vendored
@ -198,7 +198,7 @@ window.addEventListener('scroll', () => {
|
||||
});
|
||||
/* 去登录函数 */
|
||||
const goToLoginHandle = ()=>{
|
||||
window.location.href = `https://demo.dootask.com`
|
||||
window.location.href = `https://www.dootask.com/manage/dashboard`
|
||||
}
|
||||
const openInNewTab = (url)=> {
|
||||
const win = window.open(url, '_blank');
|
||||
|
||||
@ -202,7 +202,7 @@
|
||||
</li>
|
||||
<li class="drawer-item-b">
|
||||
<div class="drawer-item">
|
||||
<a class="txt-4001620 txt" href="https://demo.dootask.com">立即体验</a>
|
||||
<a class="txt-4001620 txt" href="https://www.dootask.com/manage/dashboard">立即体验</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -212,7 +212,7 @@
|
||||
</li>
|
||||
<li class="drawer-item-b">
|
||||
<div class="drawer-item">
|
||||
<a class="txt-4001620 txt" href="https://demo.dootask.com">立即体验</a>
|
||||
<a class="txt-4001620 txt" href="https://www.dootask.com/manage/dashboard">立即体验</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@ -317,8 +317,46 @@
|
||||
</div>
|
||||
</body>
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/axios/1.3.6/axios.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/markdown-it@12"></script>
|
||||
<script src="../js/common.js"></script>
|
||||
<script>
|
||||
window.onload = function(){
|
||||
// 获取日志
|
||||
const logsItem = getItem('logs_dowmload_zh')
|
||||
const updates = document.getElementById('releases');
|
||||
if(!logsItem) {
|
||||
const url = "http://192.168.100.122:2222/api/system/get/showitem"
|
||||
axios.get(url).then(res=>{
|
||||
const changelog=res.data.data.updateLog
|
||||
const regex = /## \[(.*?)\]\n([\s\S]*?)(?=\n\n## \[|$)/g;
|
||||
let match;
|
||||
const Versions = []
|
||||
while ((match = regex.exec(changelog)) !== null) {
|
||||
Versions.push(match[1])
|
||||
}
|
||||
const releases = Versions.slice(0,3).map((item,index)=>{
|
||||
return `
|
||||
<li class="update-item" onclick="localStorageHandle(${index+1})">
|
||||
<h5 class="txt-4001624 update-h5">DooTask ${item} 更新</h5>
|
||||
</li>
|
||||
`;
|
||||
}).join('')
|
||||
let record = {value: releases, expired: new Date().getTime() + 30 * 60 * 1000};
|
||||
localStorage.setItem('logs_dowmload_zh', JSON.stringify(record))
|
||||
updates.innerHTML = releases;
|
||||
const md = new markdownit();
|
||||
const html = md.render(changelog);
|
||||
console.log(html,"html");
|
||||
let record1 = {value: html, expired: new Date().getTime() + 30 * 60 * 1000};
|
||||
localStorage.setItem('logs',JSON.stringify(record1))
|
||||
}).catch(err=>{
|
||||
console.log(err,"err");
|
||||
})
|
||||
}else{
|
||||
updates.innerHTML = logsItem;
|
||||
}
|
||||
}
|
||||
/* 下载应用的hover处理函数 */
|
||||
const download = document.querySelector('.download-ul');
|
||||
const downloadItems = download.querySelectorAll('.download-ul-item');
|
||||
@ -357,6 +395,40 @@ const animateBoxes = ()=> {
|
||||
window.addEventListener('scroll', animateBoxes);
|
||||
animateBoxes();
|
||||
|
||||
// 获取日志
|
||||
const logsItem = getItem('logs_dowmload_zh')
|
||||
const updates = document.getElementById('releases');
|
||||
if(!logsItem) {
|
||||
const url = "http://192.168.100.122:2222/api/system/get/showitem"
|
||||
axios.get(url).then(res=>{
|
||||
const changelog=res.data.data.updateLog
|
||||
const regex = /## \[(.*?)\]\n([\s\S]*?)(?=\n\n## \[|$)/g;
|
||||
let match;
|
||||
const Versions = []
|
||||
while ((match = regex.exec(changelog)) !== null) {
|
||||
Versions.push(match[1])
|
||||
}
|
||||
const releases = Versions.slice(0,3).map((item,index)=>{
|
||||
return `
|
||||
<li class="update-item" onclick="localStorageHandle(${index+1})">
|
||||
<h5 class="txt-4001624 update-h5">DooTask ${item} 更新</h5>
|
||||
</li>
|
||||
`;
|
||||
}).join('')
|
||||
let record = {value: releases, expired: new Date().getTime() + 30 * 60 * 1000};
|
||||
localStorage.setItem('logs_dowmload_zh', JSON.stringify(record))
|
||||
updates.innerHTML = releases;
|
||||
const md = new markdownit();
|
||||
const html = md.render(changelog);
|
||||
let record1 = {value: html, expired: new Date().getTime() + 30 * 60 * 1000};
|
||||
localStorage.setItem('logs',JSON.stringify(record1))
|
||||
}).catch(err=>{
|
||||
console.log(err,"err");
|
||||
})
|
||||
}else{
|
||||
updates.innerHTML = logsItem;
|
||||
}
|
||||
|
||||
/* 生成网页二维码二维码 */
|
||||
if(window.location.host !== ''){
|
||||
const url = window.location.href;
|
||||
|
||||
@ -250,7 +250,7 @@
|
||||
</li>
|
||||
<li class="drawer-item-b">
|
||||
<div class="drawer-item">
|
||||
<a class="txt-4001620 txt" href="https://demo.dootask.com">立即体验</a>
|
||||
<a class="txt-4001620 txt" href="https://www.dootask.com/manage/dashboard">立即体验</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@ -266,7 +266,7 @@
|
||||
<i class="help-t-tit">帮助中心</i>
|
||||
</div>
|
||||
<div class="help-layout">
|
||||
<div class="help-l">
|
||||
<div class="help-l help-fiexd">
|
||||
<form role="search" class="search-form">
|
||||
<i class="search-icon"></i>
|
||||
<input class="search-input mb-24" placeholder="Search" type="text">
|
||||
@ -276,16 +276,16 @@
|
||||
<h5 class="txt-4001620 help-h5 mb-16" style="font-weight: 500;">基本</h5>
|
||||
<ol class="help-l-ol">
|
||||
<li class="l-ul-item active">
|
||||
<a class="txt-4001620 txt" href="#section-1">了解DooTask</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-1">了解DooTask</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-2">注册和登录</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-2">注册和登录</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-3">通知公告</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-3">通知公告</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-4">帐户设置</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-4">帐户设置</a>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
@ -293,16 +293,16 @@
|
||||
<h5 class="txt-4001620 help-h5 mb-16" style="font-weight: 500;">项目</h5>
|
||||
<ol class="help-l-ol">
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-5">了解项目</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-5">了解项目</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-6">创建项目</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-6">创建项目</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-7">任务列表</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-7">任务列表</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-8">项目进展</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-8">项目进展</a>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
@ -310,16 +310,16 @@
|
||||
<h5 class="txt-4001620 help-h5 mb-16" style="font-weight: 500;">任务</h5>
|
||||
<ol class="help-l-ol">
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-9">任务的使用</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-9">任务的使用</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-10">任务优先级</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-10">任务优先级</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-11">评论与新闻</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-11">评论与新闻</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-12">次要任务</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-12">次要任务</a>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
@ -327,16 +327,16 @@
|
||||
<h5 class="txt-4001620 help-h5 mb-16" style="font-weight: 500;">团队</h5>
|
||||
<ol class="help-l-ol">
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-13">团队和成员</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-13">团队和成员</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-14">成员分组</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-14">成员分组</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-15">团队管理</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-15">团队管理</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-16">团队设置</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-16">团队设置</a>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
@ -344,13 +344,13 @@
|
||||
<h5 class="txt-4001620 help-h5 mb-16" style="font-weight: 500;">文件</h5>
|
||||
<ol class="help-l-ol">
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-17">文件类型</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-17">文件类型</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-18">共享的文件</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-18">共享的文件</a>
|
||||
</li>
|
||||
<li class="l-ul-item">
|
||||
<a class="txt-4001620 txt" href="#section-19">访问权限</a>
|
||||
<a class="txt-4001620 txt help-a" href="#section-19">访问权限</a>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
@ -743,5 +743,25 @@ helpMenuBtn.addEventListener('click', () => {
|
||||
const closeHelpDraweHandle = ()=>{
|
||||
helpDrawer.classList.remove('open-help-drawer');
|
||||
}
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const anchors = document.querySelectorAll("a[href^='#section-']");
|
||||
// 遍历所有锚点链接
|
||||
for (const anchor of anchors) {
|
||||
anchor.addEventListener("click", function(event) {
|
||||
event.preventDefault(); // 阻止默认的跳转行为
|
||||
const targetId = anchor.getAttribute("href").substring(1); // 获取目标锚点的 id
|
||||
const targetElement = document.getElementById(targetId); // 获取目标锚点元素
|
||||
if (targetElement) {
|
||||
const offset = 90; // 上偏移量(可以根据需要进行调整)
|
||||
const targetPosition = targetElement.getBoundingClientRect().top + window.pageYOffset; // 目标位置相对于视口的位置
|
||||
// 滚动到目标位置,并考虑上偏移量
|
||||
window.scrollTo({
|
||||
top: targetPosition-offset,
|
||||
behavior: "smooth"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
|
||||
@ -183,7 +183,7 @@
|
||||
</li>
|
||||
<li class="drawer-item-b">
|
||||
<div class="drawer-item">
|
||||
<a class="txt-4001620 txt" href="https://demo.dootask.com">立即体验</a>
|
||||
<a class="txt-4001620 txt" href="https://www.dootask.com/manage/dashboard">立即体验</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -168,7 +168,7 @@
|
||||
</li>
|
||||
<li class="drawer-item-b">
|
||||
<div class="drawer-item">
|
||||
<a class="txt-4001620 txt" href="https://demo.dootask.com">立即体验</a>
|
||||
<a class="txt-4001620 txt" href="https://www.dootask.com/manage/dashboard">立即体验</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@ -184,7 +184,7 @@
|
||||
<i class="logs-t-tit">更新日志</i>
|
||||
</div>
|
||||
<div class="logs-layout">
|
||||
<div class="logs-l">
|
||||
<div class="logs-l logs-sticky">
|
||||
<h5 class="logs-h5 mb-16" style="font-weight: 500;">更新日志</h5>
|
||||
<ul class="logs-l-ul logs-l-1920"></ul>
|
||||
</div>
|
||||
@ -208,8 +208,23 @@
|
||||
</div>
|
||||
</body>
|
||||
<script src="https://cdn.jsdelivr.net/npm/markdown-it/dist/markdown-it.min.js"></script>
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/axios/1.3.6/axios.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/markdown-it@12"></script>
|
||||
<script src="../js/common.js"></script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
const targetId = window.location.hash.substring(1); // 获取 URL 中的锚点 id
|
||||
const targetElement = document.getElementById(targetId); // 获取目标锚点元素
|
||||
if (targetElement) {
|
||||
const offset = 80; // 上偏移量(可以根据需要进行调整)
|
||||
const targetPosition = targetElement.getBoundingClientRect().top + window.pageYOffset; // 目标位置相对于视口的位置
|
||||
// 滚动到目标位置,并考虑上偏移量
|
||||
window.scrollTo({
|
||||
top: targetPosition - offset,
|
||||
behavior: "smooth"
|
||||
});
|
||||
}
|
||||
};
|
||||
const getItem = (key)=> {
|
||||
var record = JSON.parse(localStorage.getItem(key));
|
||||
if (!record) return null;
|
||||
@ -238,8 +253,7 @@ const domHandle = (html)=>{
|
||||
const changelog = document.querySelector('.logs-r-ul');
|
||||
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 versions = html.match(/<h2>(.*?)<\/h2>/g).slice(0,15);
|
||||
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);
|
||||
@ -304,6 +318,7 @@ const domHandle = (html)=>{
|
||||
if(section.offsetParent.offsetTop <= currentScrollPosition){
|
||||
// 将对应的菜单项设置为激活状态
|
||||
const activeMenuItem = logs_tabItems[index];
|
||||
console.log(activeMenuItem,"activeMenuItem");
|
||||
if (activeMenuItem) {
|
||||
Array.from(logs_tabItems).forEach(titem => titem.classList.remove('active'));
|
||||
activeMenuItem.classList.add('active');
|
||||
@ -321,7 +336,7 @@ const domHandle = (html)=>{
|
||||
});
|
||||
/* 从下载页跳转过来执行的函数 */
|
||||
const handleMou = ()=>{
|
||||
const clickedItem = logs_tabItems[updateLogNum];
|
||||
const clickedItem = logs_tabItems[updateLogNum-1];
|
||||
if (clickedItem && !clickedItem.classList.contains('active')) {
|
||||
// 切换激活状态
|
||||
for (let value of logs_tabItems) {
|
||||
@ -335,17 +350,40 @@ const domHandle = (html)=>{
|
||||
}
|
||||
const logs = getItem('logs')
|
||||
if(!logs) {
|
||||
fetch('https://raw.githubusercontent.com/kuaifan/dootask/pro/CHANGELOG.md')
|
||||
.then(response => response.text())
|
||||
.then(data => {
|
||||
const url = "http://192.168.100.122:2222/api/system/get/showitem"
|
||||
axios.get(url).then(res=>{
|
||||
const changelog=res.data.data.updateLog
|
||||
const md = new markdownit();
|
||||
const html = md.render(data);
|
||||
const html = md.render(changelog);
|
||||
let record = {value: html, expired: new Date().getTime() + 30 * 60 * 1000};
|
||||
localStorage.setItem('logs',JSON.stringify(record))
|
||||
domHandle(html)
|
||||
}).catch(err=>{
|
||||
console.log(err,"err");
|
||||
})
|
||||
}else{
|
||||
domHandle(logs)
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const anchors = document.querySelectorAll("a[href^='#section-']");
|
||||
// 遍历所有锚点链接
|
||||
for (const anchor of anchors) {
|
||||
anchor.addEventListener("click", function(event) {
|
||||
event.preventDefault(); // 阻止默认的跳转行为
|
||||
const targetId = anchor.getAttribute("href").substring(1); // 获取目标锚点的 id
|
||||
const targetElement = document.getElementById(targetId); // 获取目标锚点元素
|
||||
if (targetElement) {
|
||||
const offset = 80; // 上偏移量(可以根据需要进行调整)
|
||||
const targetPosition = targetElement.getBoundingClientRect().top + window.pageYOffset; // 目标位置相对于视口的位置
|
||||
// 滚动到目标位置,并考虑上偏移量
|
||||
window.scrollTo({
|
||||
top: targetPosition-offset,
|
||||
behavior: "smooth"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
|
||||
@ -282,7 +282,7 @@
|
||||
</li>
|
||||
<li class="drawer-item-b">
|
||||
<div class="drawer-item">
|
||||
<a class="txt-4001620 txt" href="https://demo.dootask.com">立即体验</a>
|
||||
<a class="txt-4001620 txt" href="https://www.dootask.com/manage/dashboard">立即体验</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -155,9 +155,9 @@
|
||||
<h3 class="txt-4002025 txt">多平台应用</h3>
|
||||
</li>
|
||||
<li>
|
||||
<i class="next" onclick="nextHandle()">
|
||||
<img src="../img/next.svg" alt="一个产品,多种强大的工具">
|
||||
</i>
|
||||
<i class="next" onclick="nextHandle()">
|
||||
<img src="../img/next.svg" alt="一个产品,多种强大的工具">
|
||||
</i>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="prooduct-ul">
|
||||
@ -458,7 +458,7 @@
|
||||
</li>
|
||||
<li class="drawer-item-b">
|
||||
<div class="drawer-item">
|
||||
<a class="txt-4001620 txt" href="https://demo.dootask.com">立即体验</a>
|
||||
<a class="txt-4001620 txt" href="https://www.dootask.com/manage/dashboard">立即体验</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -173,7 +173,7 @@
|
||||
</li>
|
||||
<li class="drawer-item-b">
|
||||
<div class="drawer-item">
|
||||
<a class="txt-4001620 txt" href="https://demo.dootask.com">立即体验</a>
|
||||
<a class="txt-4001620 txt" href="https://www.dootask.com/manage/dashboard">立即体验</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user