first commit
This commit is contained in:
1
website/js/.pydio
Normal file
1
website/js/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
3b4e6f1e-44db-452f-af67-af56350a8d37
|
||||
39
website/js/index.js
Normal file
39
website/js/index.js
Normal file
@@ -0,0 +1,39 @@
|
||||
class Index {
|
||||
constructor() {
|
||||
// 下载地址
|
||||
this.newDownUrl = ""
|
||||
this.getLatestReleases();
|
||||
this.initWow();
|
||||
}
|
||||
|
||||
async initWow() {
|
||||
new WOW({
|
||||
boxClass: 'wow', // 需要执行动画的元素的类名
|
||||
animateClass: 'animate__animated', // animation.css 动画类名
|
||||
offset: 0, // 设置滚动触发动画的距离(相对于底部)
|
||||
mobile: true, // 是否在移动设备执行动画
|
||||
live: true // 异步加载的内容持续检测
|
||||
}).init();
|
||||
}
|
||||
|
||||
downApp() {
|
||||
this.$(".down").onclick = () => {
|
||||
open(this.newDownUrl)
|
||||
}
|
||||
}
|
||||
|
||||
async getLatestReleases() {
|
||||
let data = await fetch("https://api.github.com/repos/helpcode/EasyProject/releases/latest", {
|
||||
headers: { 'Authorization': 'Basic aGVscGNvZGU6Z2hwXzBEZmx3cDFQY2l6VVRNOFkxTTNBMDZxQlhTZGpvSjRHak4xMw==' }
|
||||
});
|
||||
let res = await data.json();
|
||||
this.newDownUrl = res.assets[0].browser_download_url;
|
||||
this.downApp();
|
||||
}
|
||||
|
||||
$ (className) {
|
||||
return document.querySelector(className)
|
||||
}
|
||||
}
|
||||
|
||||
new Index();
|
||||
Reference in New Issue
Block a user