forked from JERRY-SYSTEM/Glow_Team
-
Notifications
You must be signed in to change notification settings - Fork 0
/
indexbeta.html
471 lines (445 loc) · 17.1 KB
/
indexbeta.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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover, user-scalable=no minimal-ui">
<title></title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="shortcut icon" href="">
<link rel="stylesheet" id="css-main" href="./oneui.min-5.6.css">
<script src="https://npm.elemecdn.com/[email protected]/dist/jquery.min.js"></script>
<script src="./env.js"></script>
<style>
/* 滚动条整体样式 */
::-webkit-scrollbar {
width: 10px;
}
/* 滚动条轨道 */
::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.1);
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
background: #888;
border-radius: 5px;
}
/* 滚动条滑块悬停效果 */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
.fireworks {
position: absolute;
top: 0;
left: 0;
pointer-events: none;
}
</style>
</head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js"></script>
<body>
<div id="page-container" class="page-header-fixed main-content-boxed">
<header id="page-header">
<div class="content-header">
<div class="d-flex align-items-center"><a class="fw-bold fs-lg tracking-wider text-dual me-2" id="headtitle"></a>
<div class="fs-xs fw-semibold py-1 px-2 rounded-pill bg-body-dark text-dark">
<i class="fab fa-unity text-primary"></i>
</div>
</div>
<div class="d-flex align-items-center">
<!--顶栏跳转按钮-->
<ul class="nav-main nav-main-horizontal nav-main-hover d-none d-lg-block me-2"></ul>
<!--顶栏亮暗模式和主题修改-->
<button type="button" class="btn btn-alt-secondary me-1" data-toggle="layout" data-action="dark_mode_toggle"><i class="far fa-moon"></i></button>
<div class="dropdown">
<button type="button" class="btn btn-alt-secondary me-2" id="themecss" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-brush"></i></button>
<div class="dropdown-menu dropdown-menu-end fs-sm smini-hide border-0" aria-labelledby="themecss">
<a class="dropdown-item d-flex align-items-center justify-content-between fw-medium active" data-toggle="theme" data-theme="default"><span>默认</span><i class="fa fa-circle text-default"></i></a>
<a class="dropdown-item d-flex align-items-center justify-content-between fw-medium" data-toggle="theme" data-theme="amethyst"><span>少女风</span><i class="fa fa-circle text-amethyst"></i></a>
<div class="dropdown-divider"></div>
<a class="dropdown-item fw-medium" data-toggle="layout" data-action="header_style_light" href="javascript:void(0)"><span>顶栏浅色模式</span></a>
<a class="dropdown-item fw-medium" data-toggle="layout" data-action="header_style_dark" href="javascript:void(0)"><span>顶栏深色模式</span></a>
</div>
</div>
</div>
</div>
<div id="page-header-loader" class="overlay-header bg-primary-lighter"><div class="content-header"><div class="w-100 text-center"><i class="fa fa-fw fa-circle-notch fa-spin text-primary"></i></div></div></div>
</header>
<main id="main-container">
<!--第一板块-->
<div id="topd" class="bg-body-extra-light bg-image">
<div class="content content-full"><div class="row g-0 justify-content-center text-center"><div class="col-md-10 pt-7 pb-5">
<!--一言-->
<div class="d-inline-flex align-items-center space-x-1 fs-sm badge bg-success-light text-success mb-2 p-2">
<span>「 <span id="jinrishici-sentence"></span>」</span>
</div>
<!--主标题-->
<h1 class="fs-2 fw-bold mb-3"></h1>
<p class="fs-5 fw-medium text-muted mb-4 mx-xl-8">
<!--子标题-->
<span class="text-body-color fw-semibold"></span>
</p>
<a class="btn btn-alt-primary py-2 px-3 m-1" data-toggle="click-ripple" href="javascript:void(0)" id="gst">
<i class="fa fa-fw fa-arrow-down opacity-50 me-1"></i> 现在开始
</a>
</div></div></div>
</div>
<!--About模块-->
<div id="feature">
<div class="content"><div class="row py-4 text-center">
<div class="col-6 col-md-4 col-xl-3">
<div class="item item-rounded my-3 item-1x mx-auto text-amethyst bg-amethyst-lighter push"><i class="fa-fw fa-2x"></i></div>
<h4 class="mb-2"></h4><p class="text-muted"></p>
</div>
<div class="col-6 col-md-4 col-xl-3 ">
<div class="item item-rounded my-3 item-1x mx-auto text-flat bg-flat-lighter push"><i class="fa-fw fa-2x"></i></div>
<h4 class="mb-2"></h4><p class="text-muted"></p>
</div>
<div class="col-6 col-md-4 col-xl-3 ">
<div class="item item-rounded my-3 item-1x mx-auto text-smooth bg-smooth-lighter push"><i class="fa-fw fa-2x"></i></div>
<h4 class="mb-2"></h4><p class="text-muted"></p>
</div>
<div class="col-6 col-md-4 col-xl-3 ">
<div class="item item-rounded my-3 item-1x mx-auto text-city bg-city-lighter push"><i class="fa-fw fa-2x"></i></div>
<h4 class="mb-2"></h4><p class="text-muted"></p>
</div>
</div></div>
</div>
<div id="hito">
<div class="content content-full"><div class="row py-5"><div class="order-md-0 col-md-0 text-center align-items-center"><div>
<h2 class="h1 fw-bold mb-2">Hitokoto</h2>
<p class="fs-lg fw-medium text-muted mb-4" id="hitokoto_text">:D 获取中...</p>
<h3 class="h4 fw-bold mb-2" id="hitokoto_from">:D 获取中...</h3>
</div></div></div></div>
</div>
<!--作品模块-->
<div id="work">
<div class="content content-full">
<div class="py-5">
<div class="row mb-5">
<div class="col-md-0 text-center">
<h2 class="h1 fw-bold mb-2">
作 <span class="fw-normal">品</span>
</h2>
<p class="fs-lg fw-medium text-muted mb-0">
保持心脏震动 有人与你共鸣
</p>
<main id="main-container"></main>
</div>
</div>
<div class="content content-boxed text-center"><div class="row"></div></div>
</div>
</div>
</div>
<!-- 文章 -->
<div id="zone">
<div class="content content-full"><div class="py-5">
<div class="row mb-5">
<div class="col-md-0 text-center">
<h2 class="h1 fw-bold mb-2">
<span class="fw-normal">动 态</span>
</h2>
<p class="fs-lg fw-medium text-muted mb-0">团队发展历史</p>
</div>
</div>
<div class="content content-boxed text-center"><div class="row" id="zoneslick"></div></div>
</div></div>
</div>
<!-- 成员 -->
<div id="member">
<div class="content content-full">
<div class="py-5">
<div class="row mb-5 text-center"><div class="col-md-0">
<h2 class="h1 fw-bold mb-2"><span class="fw-normal">成 员</span></h2>
<p class="fs-lg fw-medium text-muted mb-0">一群充满活力的の开发者.</p>
</div></div>
<div class="row items-push"></div>
</div>
</div>
</div>
<!-- 联系方式 -->
<div id="contact">
<div class="content content-full">
<div class="py-5 py-md-4 text-center">
<h2 class="fw-bold mb-2">联系 <i class="fa fa-fw fa-heart text-city"></i> 方式</h2>
<p class="fs-lg fw-medium text-muted mb-4">
有问题欢迎联系我们
</p>
<a class="btn btn-warning py-2 px-3 m-1" data-toggle="click-ripple"><i class="nav-main-link-icon"></i></a>
<a class="btn btn-primary py-2 px-3 m-1" data-toggle="click-ripple"><i class="nav-main-link-icon"></i></a>
</div>
</div>
</div>
<!-- 友链 -->
<div id="flinks">
<div class="content content-full">
<div class="py-5">
<div class="row mb-5 text-center"><div class="col-md-0">
<h2 class="h1 fw-bold mb-2">友情 <span class="fw-normal">链接</span></h2>
<p class="fs-lg fw-medium text-muted mb-0">快来和我交朋友吧</p>
</div></div>
<div class="row items-push"></div>
</div>
</div>
</div>
<footer class="bg-body-extra-light block-rounded" id="page-footer">
<div class="content content-full">
<div class="text-center">
<script id="LA-DATA-WIDGET" crossorigin="anonymous" charset="UTF-8" src=""></script>
</div>
<div class="row g-0 fs-sm border-top pt-3">
<div class="col-sm-6 order-sm-2 py-1 text-center text-sm-end" id="teamday"></div>
<div class="col-sm-6 order-sm-1 py-1 text-center text-sm-start">
<a href="https://beian.miit.gov.cn" target="_blank" class="text fw-semibold"><span class="badge bg-success">
<i class="fa fa-location-arrow me-1"></i></span>
</a>
</div>
</div>
</div>
</footer>
</div>
</main>
<!--访问时提示框-->
<button type="button" data-bs-toggle="modal" data-bs-target="#welmodal" style="display: none;"></button>
<div class="modal fade" id="welmodal" tabindex="-1" aria-labelledby="welmodal" style="display: none;" aria-hidden="true">
<div class="modal-dialog modal-dialog-popout" role="document"><div class="modal-content"><div class="block block-rounded block-transparent mb-0"><div class="block-header block-header-default">
<h3 class="block-title"></h3>
<div class="block-options"><button type="button" class="btn-block-option" data-bs-dismiss="modal" aria-label="Close"><i class="fa fa-fw fa-times"></i></button></div>
</div>
<div class="block-content fs-sm"></div>
<div class="block-content block-content-full text-end bg-body"><button type="button" class="btn btn-sm btn-primary" data-bs-dismiss="modal">OK</button></div>
</div></div></div></div>
</div>
<!--Slick插件--><link rel="stylesheet" href="https://jprorwxhnlrnlj5q-static.micyjz.com/develop/YGKfApUWNUSO-brpKfUsDEhyO-GvUApKfKKUAU-jjBqrKjjnrorriklilr-jiBqrKjjiijroiqijjr/slick.css"><link rel="stylesheet" href="https://iqrorwxhnlrnlj5q-static.micyjz.com/develop/YGKfApUWNUSO-bgKfUANsZWTt-GvUApKfKKUAU-jnBqrKjjnroriioiqrr-jiBqrKjjiijroiqijjr/slick-theme.css"><script src="https://imrorwxhlnqqln5p-static.micyjz.com/develop/evUKpAfMaYJE-rdUKApDISRZO-GvUApKfKKUAU-jpBorKkjjrkiiilnjrm-joBqrKkjnrpiniojpii/slick.min.js"></script>
<script src="./index.js"></script>
<script>
fetch('https://v1.hitokoto.cn')
.then(response => response.json())
.then(data => {
const text = document.getElementById('hitokoto_text')
text.innerText = data.hitokoto
const from = document.getElementById('hitokoto_from')
var author = !!data.from ? data.from : "无名氏";
from.innerText = "—— " + (data.from_who || '') + "「" + author + "」"
})
.catch(console.error)
function createFireworks({ config, anime }) {
// 创建这个Canvas元素 <canvas id='fireworks' className='fireworks'></canvas> 给我代码
const canvasElement = document.createElement('canvas')
canvasElement.id = 'fireworks'
canvasElement.className = 'fireworks'
document.body.appendChild(canvasElement)
const defaultConfig = {
colors: config?.colors,
numberOfParticules: 20,
orbitRadius: {
min: 50,
max: 100
},
circleRadius: {
min: 10,
max: 20
},
diffuseRadius: {
min: 50,
max: 100
},
animeDuration: {
min: 900,
max: 1500
}
}
config = Object.assign(defaultConfig, config)
let pointerX = 0
let pointerY = 0
// sky blue
const colors = config.colors
const canvasEl = document.querySelector('.fireworks')
const ctx = canvasEl.getContext('2d')
/**
* 设置画布尺寸
*/
function setCanvasSize(canvasEl) {
canvasEl.width = window.innerWidth
canvasEl.height = window.innerHeight
canvasEl.style.width = `${window.innerWidth}px`
canvasEl.style.height = `${window.innerHeight}px`
}
/**
* update pointer
* @param {TouchEvent} e
*/
function updateCoords(e) {
pointerX =
e.clientX ||
(e?.touches[0] ? e.touches[0].clientX : e.changedTouches[0].clientX)
pointerY =
e.clientY ||
(e?.touches[0] ? e.touches[0].clientY : e.changedTouches[0].clientY)
}
function setParticuleDirection(p) {
const angle = (anime.random(0, 360) * Math.PI) / 180
const value = anime.random(
config.diffuseRadius.min,
config.diffuseRadius.max
)
const radius = [-1, 1][anime.random(0, 1)] * value
return {
x: p.x + radius * Math.cos(angle),
y: p.y + radius * Math.sin(angle)
}
}
/**
* 在指定位置创建粒子
* @param {number} x
* @param {number} y
* @returns
*/
function createParticule(x, y) {
const p = {
x,
y,
color: `rgba(${colors[anime.random(0, colors.length - 1)]},${anime.random(
0.2,
0.8
)})`,
radius: anime.random(config.circleRadius.min, config.circleRadius.max),
endPos: null,
draw() {}
}
p.endPos = setParticuleDirection(p)
p.draw = function () {
ctx.beginPath()
ctx.arc(p.x, p.y, p.radius, 0, 2 * Math.PI, true)
ctx.fillStyle = p.color
ctx.fill()
}
return p
}
function createCircle(x, y) {
const p = {
x,
y,
color: '#000',
radius: 0.1,
alpha: 0.5,
lineWidth: 6,
draw() {}
}
p.draw = function () {
ctx.globalAlpha = p.alpha
ctx.beginPath()
ctx.arc(p.x, p.y, p.radius, 0, 2 * Math.PI, true)
ctx.lineWidth = p.lineWidth
ctx.strokeStyle = p.color
ctx.stroke()
ctx.globalAlpha = 1
}
return p
}
function renderParticule(anim) {
for (let i = 0; i < anim.animatables.length; i++) {
anim.animatables[i].target.draw()
}
}
function animateParticules(x, y) {
const circle = createCircle(x, y)
const particules = []
for (let i = 0; i < config.numberOfParticules; i++) {
particules.push(createParticule(x, y))
}
anime
.timeline()
.add({
targets: particules,
x(p) {
return p.endPos.x
},
y(p) {
return p.endPos.y
},
radius: 0.1,
duration: anime.random(
config.animeDuration.min,
config.animeDuration.max
),
easing: 'easeOutExpo',
update: renderParticule
})
.add(
{
targets: circle,
radius: anime.random(config.orbitRadius.min, config.orbitRadius.max),
lineWidth: 0,
alpha: {
value: 0,
easing: 'linear',
duration: anime.random(600, 800)
},
duration: anime.random(1200, 1800),
easing: 'easeOutExpo',
update: renderParticule
},
0
)
}
const render = anime({
duration: Infinity,
update: () => {
ctx.clearRect(0, 0, canvasEl.width, canvasEl.height)
}
})
document.addEventListener(
'mousedown',
e => {
render.play()
updateCoords(e)
animateParticules(pointerX, pointerY)
},
false
)
setCanvasSize(canvasEl)
window.addEventListener(
'resize',
() => {
setCanvasSize(canvasEl)
},
false
)
}
window.createFireworks = createFireworks
</script>
<script>
const Fireworks = () => {
const fireworksColor = siteConfig('FIREWORKS_COLOR')
useEffect(() => {
// 异步加载
async function loadFireworks() {
loadExternalResource(
'https://cdn.bootcdn.net/ajax/libs/animejs/3.2.1/anime.min.js',
'js'
).then(() => {
loadExternalResource('/js/fireworks.js', 'js').then(() => {
if (window.anime && window.createFireworks) {
window.createFireworks({
config: { colors: fireworksColor },
anime: window.anime
})
}
})
})
}
loadFireworks()
return () => {
// 在组件卸载时清理资源
const fireworksElements = document.getElementsByClassName('fireworks')
while (fireworksElements.length > 0) {
fireworksElements[0].parentNode.removeChild(fireworksElements[0])
}
}
}, [])
return <></>
}
export default Fireworks
</script>
</body>