-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
119 lines (96 loc) · 2.85 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
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="a60.shop 超市a60">
<meta name="author" content="modcrafts">
<title>A60 超市 | 超市 A60</title>
<link rel="stylesheet" href="picocss/css/pico.min.css">
<style>
@media screen and (max-width: 600px) {
#a60_img {
width: 100%;
}
}
@media screen and (min-width: 600px) {
#a60_img {
width: 50%;
}
}
footer {
text-align: center;
font-size: 0.8em;
}
#main_content {
border-radius: 1rem;
}
</style>
<script>
function random(max) {
var r, v;
var arr = [];
return function create() {
if (arr.length === 0) {
for (var i = 0; i < max; i++) {
arr.push(i + 1)
}
}
r = Math.ceil(Math.random() * (arr.length - 1));
v = arr[r];
if (arr.length === 1) {
arr = []
} else {
arr.splice(r, r);
}
return v;
}
};
var srand = random(34);
function changePic() {
const img = document.getElementById("a60_img")
const index = document.getElementById("index_show")
img.setAttribute("src", "");
index.setAttribute("aria-busy", "true");
const i = srand();
img.setAttribute("src", "a60/" + i + ".jpg");
index.innerText = "# " + i;
};
</script>
</head>
<body>
<main class="container">
<nav>
<ul>
<li><strong>a60.shop</strong></li>
</ul>
<ul>
<li><a href="https://github.com/modcrafts/a60-shop" target="_blank">Github</a></li>
</u>
</nav>
<hgroup>
<h1>A60 超市</h1>
<h2>超市 A60🥵</h2>
</hgroup>
<article id="main_content">
<h3 id="index_show">#</h3>
<center>
<img id="a60_img" src="" alt="a60.shop" onclick="changePic()">
</center>
<script>
changePic();
const img = document.getElementById("a60_img")
img.onload = function () {
document.getElementById("index_show").setAttribute("aria-busy", "false");
}
</script>
</article>
<footer>
<p>
❤Just for A60❤
</p>
</footer>
</main>
</body>
</html>