-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
165 lines (144 loc) · 5.97 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<meta charset="utf-8">
<title>---- FDPClient betas ----</title>
<meta content="FDPCLient (click here to download)" property="og:title" />
<meta content="FDP Client betas click the above to download" property="og:description" />
<meta content="https://skiddermc.github.io/download" property="og:url" />
<meta content="https://raw.githubusercontent.com/fdpmc/fdpmc.github.io/main/img/fdpdownload.png" property="og:image" />
<meta name="twitter:card" content="summary_large_image">
<meta content="#43B581" data-react-helmet="true" name="theme-color" />
<style>
.space {
height: 50px;
}
.img {
transition: all 2s;
}
</style>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/mdui.min.css" integrity="sha384-cLRrMq39HOZdvE0j6yBojO4+1PrHfB7a9l5qLcmRm/fiWXYY+CndJPmyu5FV/9Tw" crossorigin="anonymous" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/mdui.min.js" integrity="sha384-gCMZcshYKOGRX9r6wbDrvF+TcCCswSHFucUzUPwka+Gr+uHgjlYvkABr95TCOz3A" crossorigin="anonymous"></script>
</head>
<body style="background: rgba(40,43,48)">
<br/>
<br/>
<div class="mdui-container">
<div class="mdui-card mdui-hoverable">
<div class="mdui-card-media" style="overflow: hidden;height: 400px;">
<img src="img/blue.png" class="img" />
<div class="mdui-card-media-covered mdui-card-media-covered-gradient">
<div class="mdui-card-primary" style="text-align: center;">
<div class="mdui-card-primary-title">FDPClient</div>
<div class="mdui-card-primary-subtitle">Latest github actions<br/>Downloads may contain bugs as they are pre release</div>
</div>
</div>
</div>
</div>
<!-- Add icon library -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.btn {
background-color: DodgerBlue;
border: none;
border-radius: 10px;
color: white;
padding: 12px 30px;
cursor: pointer;
font-size: 20px;
}
/* Darker background on mouse-over */
.btn:hover {
background-color: RoyalBlue;
}
</style>
<h2> </h2>
<p> </p>
<button class="btn" style="width:100%"><a href="https://nightly.link/SkidderMC/FDPClient/workflows/build/main/FDPClient.zip"</a><i class="fa fa-download"></i> Download the latest beta</button>
<div class="space"></div>
<div class="mdui-container">
<table class="mdui-table mdui-hoverable">
<style>
table {
border-collapse: collapse;
width: 100%;
}
tr {
border-bottom: 1px solid #36393e;
}
th, td {
padding: 20px;
}
</style>
<table style="background-color:#424549;color:white;">
<tr style="background-color:#282b30;color:white;">
<thead>
<tr>
<th>Commit</th>
<th>Date</th>
<th>Change log</th>
<th>Downloads</th>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
</div>
<div class="space" style="color: #424549;font-size:xx-large;text-align: center;" id="loading-badge">
<div class="mdui-spinner"></div>
</div>
<!-- JavaScript Libraries -->
<script src="lib/jquery/jquery.min.js"></script>
<script src="lib/jquery/jquery-migrate.min.js"></script>
<script>
var verJson = []
function addVer(sha, time, msg, artifact_id, branch) {
if(branch == "main") {
branch = "stable"
}
verJson.push({
link: "https://github.com/SkidderMC/FDPClient/commit/" + sha,
sha: sha,
time: new Date(time),
msg: msg,
download_link: "https://nightly.link/SkidderMC/FDPClient/actions/runs/" + artifact_id + "/FDPClient.zip",
branch: branch
})
refresh()
}
function refresh() {
$('#loading-badge').html("");
$("#tbody").html("");
verJson.sort(function(a, b) {
return b.time.getTime() - a.time.getTime();
}).forEach(element => {
$("#tbody").append(`<tr>` +
`<td><a href="${element.link}" style="color:#FFFFFF"> ${element.sha.substring(0, 7)}</a></td>` +
`<td>${element.time.toLocaleString()}</td>` +
`<td>${element.msg}</td>` +
`<td><a href="${element.download_link}" "style="color:#7289da">Download</a></td>` +
`</tr>`)
})
}
$.get("https://api.github.com/repos/SkidderMC/FDPClient/actions/runs", function(data, status) {
data.workflow_runs.forEach(element => {
addVer(element.head_commit.id, element.head_commit.timestamp, element.head_commit.message, element.id, element.head_branch)
});
})
function fn3() {
var r = Math.floor(Math.random() * 256);
var g = Math.floor(Math.random() * 256);
var b = Math.floor(Math.random() * 256);
return "rgb(" + r + ',' + g + ',' + b + ")";
}
// this seems not working
rainbow();
function rainbow() {
$(".img").css("filter", "brightness(1.1) drop-shadow(0 0 " + fn3() + ")");
setTimeout("rainbow();", 2000);
}
</script>
</body>
</html>