-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcategories.html
53 lines (45 loc) · 1.74 KB
/
categories.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
<meta charset="UTF-8">
<html>
<head>
<title>主页</title>
<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="icon" href="resources/icon.svg">
<script>
var pre = "./";
var title = "分类";
var under = "分类";
</script>
<script src="scripts/database.js"></script>
</head>
<body>
<div id="passage" style="display: flex; flex-direction: column; justify-content: center;">
</div>
<script>
var main = document.getElementById("passage");
main.style.display = "flex";
main.style.flexDirection = "column";
main.style.justifyContent = "center";
for (var i in categories) {
var created = document.createElement("div");
var createdtitle = document.createElement("div");
var createdbody = document.createElement("div");
var createdhref = document.createElement("a");
created.className = "card";
createdhref.appendChild(createdtitle);
created.appendChild(createdhref);
created.appendChild(createdbody);
createdhref.href = `${pre}categories/${categories[i][2]}`;
createdtitle.className = "card-title";
createdbody.className = "card-body";
created.className = "card";
createdhref.style.textDecoration = "none";
createdtitle.style.color = "rgba(0, 0, 0, 0.75)";
createdtitle.innerHTML = `<b>${categories[i][1]}</b>`;
createdbody.innerHTML = `<p style="text-align:center;margin:2px">${categories[i][3]}</p>`;
main.appendChild(created);
}
</script>
<script src="scripts/nav.js"></script>
<script src="scripts/apps.js"></script>
</body>
</html>