-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
103 lines (101 loc) · 4.52 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
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no"/>
<meta name="renderer" content="webkit"/>
<meta name="force-rendering" content="webkit"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="description" content="For Better Chatting Experience."/>
<!-- MDUI CSS -->
<link rel="stylesheet" href="https://unpkg.com/mdui@1.0.2/dist/css/mdui.min.css"/>
<title>HC++ Plugins</title>
</head>
<body class="mdui-theme-layout-auto mdui-theme-accent-blue" style="position: relative; min-height: 100vh; margin: 0;">
<div class="mdui-appbar">
<div class="mdui-toolbar mdui-color-theme">
<a href="javascript:;" class="mdui-btn mdui-btn-icon" mdui-drawer="{target: '#menu'}">
<i class="mdui-icon material-icons">menu</i>
</a>
<a href="javascript:;" class="mdui-typo-headline">HC++ Plugins</a>
<div class="mdui-toolbar-spacer"></div>
<a href="javascript:;" onclick="document.location.reload();" class="mdui-btn mdui-btn-icon">
<i class="mdui-icon material-icons">refresh</i>
</a>
</div>
</div>
<div class="mdui-drawer mdui-drawer-close" id="menu">
<div>
<div class="mdui-typo mdui-p-l-2">
<h1>HC++ Plugins</h1>
<p>Better Chatting Experience.</p>
<br>
</div>
<hr>
<ul class="mdui-list">
<a href="/">
<li class="mdui-list-item mdui-ripple">
<div class="mdui-list-item-content">Mainpage</div>
<i class="mdui-list-item-icon mdui-icon material-icons">home</i>
</li>
</a>
<a href="/plugins.html">
<li class="mdui-list-item mdui-ripple">
<div class="mdui-list-item-content">Plugin List</div>
<i class="mdui-list-item-icon mdui-icon material-icons">list</i>
</li>
</a>
<a href="/readme.html">
<li class="mdui-list-item mdui-ripple">
<div class="mdui-list-item-content">README</div>
<i class="mdui-list-item-icon mdui-icon material-icons">information</i>
</li>
</a>
</ul>
</div>
</div>
<div class="mdui-typo mdui-p-l-2">
<div style="text-align: center;">
<h1>HC++ Plugins</h1>
<p>Better Chatting Experience.</p>
</div>
<br><br><br>
<hr>
<h3 style="text-align: center;">What are you going to do?</h3>
<br>
<div class="mdui-container">
<div class="mdui-col-xs-12 mdui-col-md-4 mdui-p-u-2" onclick="aHref('/plugins.html')">
<button class="mdui-btn mdui-ripple mdui-center mdui-btn-raised mdui-btn-block">Install Plugin</button>
</div>
<div class="mdui-col-xs-12 mdui-col-md-4 mdui-p-u-2" onclick="aHref('https\:\/\/github.com/Hiyoteam/HCPlus-Plugins/pulls')">
<button class="mdui-btn mdui-ripple mdui-center mdui-btn-raised mdui-btn-block">Publish Plugin</button>
</div>
<div class="mdui-col-xs-12 mdui-col-md-4 mdui-p-u-2" onclick="aHref('/readme.html')">
<button class="mdui-btn mdui-ripple mdui-center mdui-btn-raised mdui-btn-block">Read The Document</button>
</div>
</div>
</div>
<!-- MDUI JavaScript -->
<script src="https://unpkg.com/mdui@1.0.2/dist/js/mdui.min.js"></script>
<script>
function aHref(url) {
window.location.href=url;
}
async function fetchLastPush(){
let request=await fetch("https://camo.hach.chat/?proxyUrl=https://api.github.com/repos/Hiyoteam/HCPlus-Plugins/commits/main",{cache: "no-store"})
let json=await request.json()
return json.commit
}
async function showCommitInfo(){
let commit=await fetchLastPush();
return `${commit.tree.sha.slice(0,8)} · ${commit.message}`
}
showCommitInfo().then(function(commit){
document.querySelector(".commit-message").innerText=commit
})
</script>
<footer>
<p style="text-align: center; bottom: 0; position: absolute; width: 100%; opacity: 20%;" class="commit-message">Loading commit message...</p>
</footer>
</body>
</html>