Skip to content

Commit

Permalink
site
Browse files Browse the repository at this point in the history
  • Loading branch information
kuaifan committed Jul 13, 2023
1 parent d7e823d commit ce82cc8
Show file tree
Hide file tree
Showing 20 changed files with 106 additions and 70 deletions.
4 changes: 2 additions & 2 deletions public/site/en/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</a>
<i class="line-1"></i>
<span class="get-started">
<a href="https://www.dootask.com/manage/dashboard">
<a href="../../manage/dashboard">
<button class="btn btn-primary" >Try Now</button>
</a>
</span>
Expand Down Expand Up @@ -369,7 +369,7 @@ <h6 class="footer-t-contact-h6">[email protected]</h6>
</footer>
</div>
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/axios/1.3.6/axios.js"></script>
<script src="//cdn.bootcdn.net/ajax/libs/axios/1.3.6/axios.js"></script>
<script src="../js/common.js"></script>
<script>
/* 数字滚动动画 */
Expand Down
2 changes: 1 addition & 1 deletion public/site/en/distribute.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</section>
</main>
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
<script src="//cdn.bootcdn.net/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
<script>
const dowBtnDom = document.querySelector('.info-dow')
const line1Dom = document.querySelector('.line1')
Expand Down
32 changes: 8 additions & 24 deletions public/site/en/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</a>
<i class="line-1"></i>
<span class="get-started">
<a href="https://www.dootask.com/manage/dashboard">
<a href="../../manage/dashboard">
<button class="btn btn-primary" >Try Now</button>
</a>
</span>
Expand Down Expand Up @@ -119,20 +119,20 @@ <h4 class="txt-4001830 topics-h4 mb-64 topics-h4-en">Also supports iOS, Android,
<i class="txt-4001624 txt">macOS</i>
</div>
<div class="hover radius">
<button class="btn btn-green mb-12" style="width: 70%;">
<a class="chips-txt txt-4001418" id="arm64Link" href="https://www.dootask.com/desktop/publish/latest?platform=mac&arch=arm64" target="_blank">Apple Chips</a>
</button>
<button class="btn btn-green" style="width: 70%;">
<a class="chips-txt txt-4001418" id="x64Link" href="https://www.dootask.com/desktop/publish/latest?platform=mac&arch=x64" target="_blank">Intel Chips</a>
</button>
<a class="btn btn-green mb-12" style="box-sizing: border-box;width: 70%;" id="arm64Link" href="https://www.dootask.com/desktop/publish/latest?platform=mac&arch=arm64" target="_blank">
<span class="chips-txt txt-4001418">Apple Chips</span>
</a>
<a class="btn btn-green" style="box-sizing: border-box;width: 70%;" id="x64Link" href="https://www.dootask.com/desktop/publish/latest?platform=mac&arch=x64" target="_blank">
<span class="chips-txt txt-4001418">Intel Chips</span>
</a>
</div>
</li>
<li class="download-ul-item dow-animate-box" style="--delay: 0.3s;" onmouseover='handleMouseover(3)' onmouseout='handleMouseout(3)'>
<div class="normal">
<img class="icon mb-8" src="../img/dow_window.svg" alt="Windows">
<i class="txt-4001624 txt">Windows</i>
</div>
<a class="hover radius" id="winx64Link" href="https://www.dootask.com/desktop/publish/latest?platform=windows&arch=x64" target="_blank">
<a class="hover radius" id="winx64Link" href="https://www.dootask.com/desktop/publish/latest?platform=win&arch=x64" target="_blank">
<img class="icon mb-8" src="../img/dow_icon.svg" alt="Windows,download">
<i class="txt-4001624 txt">Download</i>
</a>
Expand Down Expand Up @@ -318,7 +318,6 @@ <h5 class="txt-4001624 more">More Logs</h5>
</footer>
</div>
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
<script src="../js/common.js"></script>
<script>
/* 下载应用的hover处理函数 */
Expand Down Expand Up @@ -346,20 +345,12 @@ <h5 class="txt-4001624 more">More Logs</h5>
return record.value;
}
/* 获取仓库的更新信息处理函数 */
const setHrefUrl = (data,name,dom)=>{
const url = data[0].assets.find(file => file.name.includes(name));
const link = document.getElementById(dom);
link.href = url.browser_download_url;
}
const logsItem = getItem('logs_dowmload_en')
const updates = document.getElementById('releases');
if(!logsItem) {
fetch('https://api.github.com/repos/kuaifan/dootask/releases')
.then(response => response.json())
.then(data => {
setHrefUrl(data,'arm64.dmg','arm64Link')
setHrefUrl(data,'x64.dmg','x64Link')
setHrefUrl(data,'arm64.exe','winx64Link')
const releases = data.slice(0, 5).map((item,index) => {
const { tag_name, created_at } = item;
const date = created_at.split('T')[0];
Expand Down Expand Up @@ -393,12 +384,5 @@ <h5 class="txt-4001624 update-h5">DooTask ${tag_name} update</h5>
}
window.addEventListener('scroll', animateBoxes);
animateBoxes();
/* 生成网页二维码二维码 */
if(window.location.host !== ''){
const url = window.location.href;
const matchResult = url.match(/^(.*?)(?=\/site)/);
const result = matchResult[1];
new QRCode(document.getElementById('qrcode'), `${result}/site/en/distribute.html`); // 测试
}
</script>
</html>
2 changes: 1 addition & 1 deletion public/site/en/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</a>
<i class="line-1"></i>
<span class="get-started">
<a href="https://www.dootask.com/manage/dashboard">
<a href="../../manage/dashboard">
<button class="btn btn-primary" >Try Now</button>
</a>
</span>
Expand Down
2 changes: 1 addition & 1 deletion public/site/en/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</a>
<i class="line-1"></i>
<span class="get-started">
<a href="https://www.dootask.com/manage/dashboard">
<a href="../../manage/dashboard">
<button class="btn btn-primary" >Try Now</button>
</a>
</span>
Expand Down
4 changes: 2 additions & 2 deletions public/site/en/log.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</a>
<i class="line-1"></i>
<span class="get-started">
<a href="https://www.dootask.com/manage/dashboard">
<a href="../../manage/dashboard">
<button class="btn btn-primary" >Try Now</button>
</a>
</span>
Expand Down Expand Up @@ -207,7 +207,7 @@ <h1 class="txt-6003645 logs-h1 mb-36">DooTask Update Log </h1>
</footer>
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/markdown-it/dist/markdown-it.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/markdown-it/dist/markdown-it.min.js"></script>
<script src="../js/common.js"></script>
<script>
const getItem = (key)=> {
Expand Down
8 changes: 4 additions & 4 deletions public/site/en/price.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
</a>
<i class="line-1"></i>
<span class="get-started">
<a href="https://www.dootask.com/manage/dashboard">
<a href="../../manage/dashboard">
<button class="btn btn-primary" >Try Now</button>
</a>
</span>
Expand Down Expand Up @@ -515,7 +515,7 @@ <h2 class="txt-6002430 price-card-h2">¥0</h2>
</li>
<li>
<span style="display: inline-block; width: 100%;">
<a href="https://www.dootask.com/manage/dashboard"> <button class="btn btn-primary">Get Started</button></a>
<a href="../../manage/dashboard"> <button class="btn btn-primary">Get Started</button></a>
</span>
</li>
</ol>
Expand Down Expand Up @@ -592,7 +592,7 @@ <h2 class="txt-6002430 price-card-h2">¥3,000</h2>
</li>
<li>
<span style="display: inline-block; width: 100%;">
<a href="https://www.dootask.com/manage/dashboard"> <button class="btn btn-primary">Get Started</button></a>
<a href="../../manage/dashboard"> <button class="btn btn-primary">Get Started</button></a>
</span>
</li>
</ol>
Expand Down Expand Up @@ -668,7 +668,7 @@ <h2 class="txt-6002430 price-card-h2">¥18,888</h2>
</li>
<li>
<span style="display: inline-block; width: 100%;">
<a href="https://www.dootask.com/manage/dashboard"> <button class="btn btn-primary">Get Started</button></a>
<a href="../../manage/dashboard"> <button class="btn btn-primary">Get Started</button></a>
</span>
</li>
</ol>
Expand Down
2 changes: 1 addition & 1 deletion public/site/en/product.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</a>
<i class="line-1"></i>
<span class="get-started">
<a href="https://www.dootask.com/manage/dashboard">
<a href="../../manage/dashboard">
<button class="btn btn-primary" >Try Now</button>
</a>
</span>
Expand Down
2 changes: 1 addition & 1 deletion public/site/en/solutions.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</a>
<i class="line-1"></i>
<span class="get-started">
<a href="https://www.dootask.com/manage/dashboard">
<a href="../../manage/dashboard">
<button class="btn btn-primary" >Try Now</button>
</a>
</span>
Expand Down
2 changes: 1 addition & 1 deletion public/site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</a>
<i class="line-1"></i>
<span class="get-started">
<a href="https://www.dootask.com/manage/dashboard">
<a href="../manage/dashboard">
<button class="btn btn-primary" >立即体验</button>
</a>
</span>
Expand Down
4 changes: 2 additions & 2 deletions public/site/zh/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</a>
<i class="line-1"></i>
<span class="get-started">
<a href="https://www.dootask.com/manage/dashboard">
<a href="../../manage/dashboard">
<button class="btn btn-primary" >立即体验</button>
</a>
</span>
Expand Down Expand Up @@ -367,7 +367,7 @@ <h6 class="footer-t-contact-h6">[email protected]</h6>
</footer>
</div>
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/axios/1.3.6/axios.js"></script>
<script src="//cdn.bootcdn.net/ajax/libs/axios/1.3.6/axios.js"></script>
<script src="../js/common.js"></script>
<script>
/* 数字滚动动画 */
Expand Down
10 changes: 5 additions & 5 deletions public/site/zh/distribute.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<div class="scan">
<i class="scan-txt" style="margin-bottom: 4px;">扫描二维码下载</i>
<span class="scan-txt" style="margin-bottom: 18px;">
或用手机浏览器输入这个网址:
或用手机浏览器输入这个网址:
<i class="scan-txt-b">http://dootask.com/</i>
</span>
</div>
Expand Down Expand Up @@ -62,7 +62,7 @@
</section>
</main>
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
<script src="//cdn.bootcdn.net/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
<script>
// 处理分发页面的逻辑
const dowBtnDom = document.querySelector('.info-dow')
Expand All @@ -72,8 +72,8 @@
const infoDom = document.querySelector('.info')
const operatDom = document.querySelector('.operat-tips')
const ua = window.navigator.userAgent.toLowerCase();
const isWechat = /micromessenger/.test(ua);
const isAndroid = /android/.test(ua);
const isWechat = /micromessenger/.test(ua);
const isAndroid = /android/.test(ua);
let timer;
if(!isAndroid){
dowBtnDom.style.display = 'none'
Expand Down Expand Up @@ -111,7 +111,7 @@
}
window.location.href = "https://www.dootask.com/uploads/android/DooTask-v0.27.46-android.apk";
}
/* 生成分发页面的二维码 */
/* 生成分发页面的二维码 */
if(window.location.host !== ''){
const url = window.location.href;
const matchResult = url.match(/^(.*?)(?=\/site)/);
Expand Down
53 changes: 36 additions & 17 deletions public/site/zh/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</a>
<i class="line-1"></i>
<span class="get-started">
<a href="https://www.dootask.com/manage/dashboard">
<a href="../../manage/dashboard">
<button class="btn btn-primary" >立即体验</button>
</a>
</span>
Expand Down Expand Up @@ -119,20 +119,20 @@ <h4 class="txt-4001830 topics-h4 mb-64">同时支持iOS、Android、macOS、Wind
<i class="txt-4001624 txt">macOS</i>
</div>
<div class="hover radius">
<button class="btn btn-green mb-12" style="width: 70%;">
<a class="chips-txt txt-4001418" id="arm64Link" href="https://www.dootask.com/desktop/publish/latest?platform=mac&arch=arm64" target="_blank">Apple Chips</a>
</button>
<button class="btn btn-green" style="width: 70%;">
<a class="chips-txt txt-4001418" id="x64Link" href="https://www.dootask.com/desktop/publish/latest?platform=mac&arch=x64" target="_blank">Intel Chips</a>
</button>
<a class="btn btn-green mb-12" style="box-sizing: border-box;width: 70%;" id="arm64Link" href="https://www.dootask.com/desktop/publish/latest?platform=mac&arch=arm64" target="_blank">
<span class="chips-txt txt-4001418">Apple Chips</span>
</a>
<a class="btn btn-green" style="box-sizing: border-box;width: 70%;" id="x64Link" href="https://www.dootask.com/desktop/publish/latest?platform=mac&arch=x64" target="_blank">
<span class="chips-txt txt-4001418">Intel Chips</span>
</a>
</div>
</li>
<li class="download-ul-item dow-animate-box" style="--delay: 0.3s;" onmouseover='handleMouseover(3)' onmouseout='handleMouseout(3)'>
<p class="normal">
<img class="icon mb-8" src="../img/dow_window.svg" alt="Windows">
<i class="txt-4001624 txt">Windows</i>
</p>
<a class="hover radius" id="winx64Link" href="https://www.dootask.com/desktop/publish/latest?platform=windows&arch=x64" target="_blank">
<a class="hover radius" id="winx64Link" href="https://www.dootask.com/desktop/publish/latest?platform=win&arch=x64" target="_blank">
<img class="icon mb-8" src="../img/dow_icon.svg" alt="Windows,下载">
<i class="txt-4001624 txt">下载</i>
</a>
Expand Down Expand Up @@ -316,7 +316,6 @@ <h5 class="txt-4001624 more">更多日志</h5>
</footer>
</div>
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
<script src="../js/common.js"></script>
<script>
/* 下载应用的hover处理函数 */
Expand All @@ -343,6 +342,34 @@ <h5 class="txt-4001624 more">更多日志</h5>
}
return record.value;
}

/* 获取仓库的更新信息处理函数 */
const logsItem = getItem('logs_dowmload_cn')
const updates = document.getElementById('releases');
if(!logsItem) {
fetch('https://api.github.com/repos/kuaifan/dootask/releases')
.then(response => response.json())
.then(data => {
const releases = data.slice(0, 5).map((item,index) => {
const { tag_name, created_at } = item;
const date = created_at.split('T')[0];
return `
<li class="update-item" onclick="localStorageHandle(${index+1})">
<h5 class="txt-4001624 update-h5">DooTask ${tag_name} 更新</h5>
<i class="txt-4001624 time">${date}</i>
</li>
`;
}).join('');
let record = {value: releases, expired: new Date().getTime() + 30 * 60 * 1000};
localStorage.setItem('logs_dowmload_cn', JSON.stringify(record))
updates.innerHTML = releases;
})
.catch(error => {
console.error(error);
});
}else{
updates.innerHTML = logsItem;
}
/* 滑动到可视区域执行动画 */
const boxes = document.querySelectorAll('.dow-animate-box');
const animateBoxes = ()=> {
Expand All @@ -356,13 +383,5 @@ <h5 class="txt-4001624 more">更多日志</h5>
}
window.addEventListener('scroll', animateBoxes);
animateBoxes();

/* 生成网页二维码二维码 */
if(window.location.host !== ''){
const url = window.location.href;
const matchResult = url.match(/^(.*?)(?=\/site)/);
const result = matchResult[1];
new QRCode(document.getElementById('qrcode'), `${result}/site/zh/distribute.html`); // 测试
}
</script>
</html>
2 changes: 1 addition & 1 deletion public/site/zh/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</a>
<i class="line-1"></i>
<span class="get-started">
<a href="https://www.dootask.com/manage/dashboard">
<a href="../../manage/dashboard">
<button class="btn btn-primary" >立即体验</button>
</a>
</span>
Expand Down
2 changes: 1 addition & 1 deletion public/site/zh/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</a>
<i class="line-1"></i>
<span class="get-started">
<a href="https://www.dootask.com/manage/dashboard">
<a href="../../manage/dashboard">
<button class="btn btn-primary" >立即体验</button>
</a>
</span>
Expand Down
4 changes: 2 additions & 2 deletions public/site/zh/log.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</a>
<i class="line-1"></i>
<span class="get-started">
<a href="https://www.dootask.com/manage/dashboard">
<a href="../../manage/dashboard">
<button class="btn btn-primary" >立即体验</button>
</a>
</span>
Expand Down Expand Up @@ -207,7 +207,7 @@ <h1 class="txt-6003645 logs-h1 mb-36">DooTask更新日志</h1>
</footer>
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/markdown-it/dist/markdown-it.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/markdown-it/dist/markdown-it.min.js"></script>
<script src="../js/common.js"></script>
<script>
const getItem = (key)=> {
Expand Down
2 changes: 1 addition & 1 deletion public/site/zh/price.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
</a>
<i class="line-1"></i>
<span class="get-started">
<a href="https://www.dootask.com/manage/dashboard">
<a href="../../manage/dashboard">
<button class="btn btn-primary" >立即体验</button>
</a>
</span>
Expand Down
Loading

0 comments on commit ce82cc8

Please sign in to comment.