-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
251 lines (226 loc) · 8.04 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
<!DOCTYPE html>
<html>
<head>
<title>暗黑武士De BiBiLand</title>
<link rel="shortcut icon" href="./favicon.ico.ico" />
<link type="text/css" rel="stylesheet" href="https://at.alicdn.com/t/font_1755564_z4mhxbw13mq.css"></link>
<link href="https://fonts.loli.net/css?family=Noto+Serif+SC:200,300,900&display=swap&subset=chinese-simplified" rel="stylesheet">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<meta name="description" content="都是一些闲言、碎语及怪怪的闪念">
<meta name="keywords" content="mini blog" />
<meta name="author" content="暗黑武士" />
<meta name="email" content="[email protected]" />
<meta charset="utf-8" />
<meta name="robots" content="index,follow" />
<meta name="google" content="index,follow" />
<meta name="googlebot" content="index,follow" />
<meta name="verify" content="index,follow" />
<meta name="apple-mobile-web-app-title" content="暗黑武士De BiBiLand">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta http-equiv="refresh" content="3600" /> <!-- 页面自动刷新 3600秒 -->
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?60f12fdb025ed62b8e9f0f2bede22c14";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body>
<header id="header">
<h1>WoDeBiBi</h1>
</header>
<main id="app">
<aside>
<p id="describe">
都是一些闲言、碎语及怪怪的闪念</br>
关注公众号 「iCruiseDATA」 发现更多奇奇怪怪的东西。</br>
如果没找到,那就再等等吧!</br>
如果找到了,那就是我偷懒了, 好久不更新了!</br>
<a href="https://darkwarrior2025.xyz/" style="text-decoration: none;" target="__blank">「开启iCruise-DATA博客」</a></br>
<a href="https://darkwarrior2025.xyz/picwatermark" style="text-decoration: none;" target="__blank">「图片加水印工具」</a></br>
<a href="https://darkwarrior2025.xyz/epubreader" style="text-decoration: none;" target="__blank">「EPub在线阅读工具」</a></br>
<a href="https://www.loudreader.com/" style="text-decoration: none;" target="__blank">「MOBI在线阅读工具」</a></br>
</p>
</aside>
<p class="tip">现在总共 BiBi 了 {{count}} 条 </p>
<section class="item" v-for="item in contents" v-cloak>
<p v-html='item.attributes.content'></p>
<time v-bind:datetime="item.attributes.time">{{item.attributes.time}}</time>
</section>
<div class="load-ctn">
<button class="load-btn" v-on:click="loadMore" v-if="contents" v-cloak>再翻翻</button>
<p class="tip" v-else>别急,小黑正努力加载呢!!</p>
</div>
</main>
<script src="https://twoapi-ui.qiangtu.com/scripts/content.js"></script>
<footer>
<p class="center-text">CopyLeft 2020~2025 © <a href="https://darkwarrior2025.xyz/" style="text-decoration: none;" target="__blank"> DarkWarrior </a> | None Rights Reserved | MIT 2.0 </br>
Powered by
<a href="https://github.com/daibor/nonsense.fun" style="text-decoration: none;" target="__blank">「废话胶囊项目」</a>
</p>
</footer>
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.11/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/av-min.js"></script>
<script type="text/javascript">
var {
Query
} = AV;
AV.init({
appId: "LSX6nt5pudU737eRPQ0gHGNk-MdYXbMMI", //你的 leancloud 应用 id (设置-应用keys-AppID)
appKey: "Jm0oBLhfJkHFvfSJQGMqBRFe", //你的 leancloud 应用 AppKey (设置-应用keys-AppKey)
});
var query = new AV.Query('content');
var app = new Vue({
el: '#app',
data: {
page: 0,
count: 0,
contents: []
},
methods: {
loadMore: function(event) {
getData(++this.page);
}
}
})
function urlToLink(str) {
var re = /(http|ftp|https):\/\/[\w-]+(.[\w-]+)+([\w-.,@?^=%&:/~+#]*[\w-\@?^=%&/~+#])?/g;;
str = str.replace(re, function(website) {
return "<a href='" + website + "' target='_blank'> <i class='iconfont icon-lianjie-copy'></i>链接 </a>";
});
return str;
}
function getData(page = 0) {
query.descending('createdAt').skip(page * 20).limit(20).find().then(function(results) {
if (results.length == 0) {
alert('之前没 BiBi 过了')
} else {
let resC = results;
reqData = false;
resC.forEach((i) => {
let dateTmp = new Date(i.createdAt);
i.attributes.time = `${dateTmp.getFullYear()}-${(dateTmp.getMonth() + 1) < 10 ? ('0' + (dateTmp.getMonth()+1)) : dateTmp.getMonth()+1}-${(dateTmp.getDate() + 1) < 10 ? ('0' + dateTmp.getDate()) : dateTmp.getDate()} ${(dateTmp.getHours() + 1) <= 10 ? ('0' + dateTmp.getHours()) : dateTmp.getHours()}:${(dateTmp.getMinutes() + 1) <= 10 ? ('0' + dateTmp.getMinutes()) : dateTmp.getMinutes()}`;
i.attributes.content = "<span>" + urlToLink(i.attributes.content) + "</span>";
app.contents.push(i);
})
}
}, function(error) {});
}
getData(0);
query.count().then(function(count) {
app.count = count;
}, function(error) {});
</script>
<style type="text/css">
@media (prefers-color-scheme: dark) {
/* 夜间模式 */
body {
background-color: black;
color: white;
}
body .item {
border-top: 6px solid #888888;
background-color: rgb(21, 32, 43);
color: #ccc;
}
body time {
color: #aaa;
}
h1 {
color: #ffffff;
}
aside {
color: #ccc;
}
body .load-btn {
background-color: #000;
color: #ddd;
}
body .load-btn:hover:active {
background: #1DA1F2;
color: #fff;
}
}
[v-cloak] {
display: none;
}
html {
font-size: 17px;
}
body,
button {
font-family: 'Noto Serif SC', serif;
}
aside {
font-weight: 200;
font-style: normal;
line-height: 1.8rem;
}
#app,
header,
footer {
box-sizing: border-box;
width: 100%;
max-width: 500px;
margin: 0 auto;
padding: 0 20px;
}
h1 {
font-weight: 900;
}
footer {
font-size: 0.8rem;
clear: both;
}
.tip {
color: #999;
}
.item {
font-weight: 300;
font-style: normal;
line-height: 1.8rem;
background: #fff;
padding: 10px 20px;
border-radius: 5px;
box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
margin-top: 20px;
border-top: 6px solid;
text-align: justify;
}
.item a {
text-decoration: none;
color: #5dafd5;
}
time {
font-weight: 200;
color: #bbb;
}
.center-text {
text-align: center;
}
.load-ctn {
width: 100%;
}
.load-btn {
border: 2px solid #666;
width: 130px;
outline: none;
font-size: 20px;
border-radius: 100px;
margin: 30px auto;
color: #666;
line-height: 30px;
float: right;
background: #fff;
}
.load-btn:hover:active {
background: #666;
color: #fff;
}
</style>
</html>