hexo-theme-ayeria 1.9.10 → 1.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +37 -37
- package/README.en.md +560 -560
- package/README.md +560 -560
- package/_config.yml +271 -271
- package/_scaffolds/post.md +8 -8
- package/index.js +11 -2
- package/languages/de.yml +39 -39
- package/languages/default.yml +40 -39
- package/languages/en.yml +40 -39
- package/languages/es.yml +39 -39
- package/languages/fr.yml +39 -39
- package/languages/ja.yml +39 -39
- package/languages/ko.yml +39 -39
- package/languages/nl.yml +39 -39
- package/languages/no.yml +39 -39
- package/languages/pt.yml +39 -39
- package/languages/ru.yml +39 -39
- package/languages/vi.yml +39 -39
- package/languages/zh-CN.yml +40 -39
- package/languages/zh-TW.yml +40 -39
- package/layout/_partial/ads.ejs +8 -8
- package/layout/_partial/after-footer.ejs +84 -84
- package/layout/_partial/archive-post.ejs +13 -13
- package/layout/_partial/archive.ejs +61 -61
- package/layout/_partial/article.ejs +94 -94
- package/layout/_partial/ayeria.ejs +53 -53
- package/layout/_partial/baidu-analytics.ejs +11 -11
- package/layout/_partial/broadcast.ejs +19 -19
- package/layout/_partial/float-btns.ejs +7 -7
- package/layout/_partial/footer.ejs +61 -61
- package/layout/_partial/google-analytics.ejs +10 -10
- package/layout/_partial/head.ejs +64 -68
- package/layout/_partial/katex.ejs +21 -21
- package/layout/_partial/lock.ejs +37 -37
- package/layout/_partial/mathjax.ejs +18 -18
- package/layout/_partial/modal.ejs +70 -76
- package/layout/_partial/music.ejs +15 -15
- package/layout/_partial/post/albums.ejs +16 -16
- package/layout/_partial/post/author.ejs +7 -7
- package/layout/_partial/post/busuanzi.ejs +4 -4
- package/layout/_partial/post/category.ejs +9 -9
- package/layout/_partial/post/clipboard.ejs +54 -54
- package/layout/_partial/post/date.ejs +2 -2
- package/layout/_partial/post/gallery.ejs +15 -15
- package/layout/_partial/post/giscus.ejs +40 -40
- package/layout/_partial/post/gitalk.ejs +12 -12
- package/layout/_partial/post/justifiedGallery.ejs +8 -8
- package/layout/_partial/post/nav.ejs +22 -22
- package/layout/_partial/post/search.ejs +3 -3
- package/layout/_partial/post/share.ejs +53 -53
- package/layout/_partial/post/tag.ejs +5 -5
- package/layout/_partial/post/title.ejs +16 -16
- package/layout/_partial/post/tocbot.ejs +6 -6
- package/layout/_partial/post/topping.ejs +2 -2
- package/layout/_partial/post/twikoo.ejs +7 -7
- package/layout/_partial/post/valine.ejs +48 -48
- package/layout/_partial/post/word.ejs +19 -19
- package/layout/_partial/sidebar.ejs +48 -33
- package/layout/_partial/viewer.ejs +105 -105
- package/layout/categories.ejs +8 -8
- package/layout/friends.ejs +19 -19
- package/layout/index.ejs +4 -4
- package/layout/layout.ejs +35 -30
- package/layout/page.ejs +2 -2
- package/layout/plain-page.ejs +4 -4
- package/layout/post.ejs +2 -2
- package/layout/tags.ejs +88 -88
- package/package.json +39 -39
- package/scripts/default_config.js +6 -6
- package/scripts/events/index.js +11 -11
- package/scripts/events/lib/hello.js +38 -38
- package/scripts/events/lib/merge-configs.js +28 -28
- package/scripts/filters/index.js +13 -13
- package/scripts/filters/meta_generator.js +17 -17
- package/scripts/helpers/ayeria-plus-vendors.js +9 -9
- package/scripts/helpers/category-tree.js +90 -90
- package/scripts/helpers/wordcount.js +39 -39
- package/scripts/lib/core.js +25 -25
- package/scripts/utils/join-path.js +12 -12
- package/scripts/utils/object.js +31 -31
- package/source/404.html +187 -187
- package/source/css/ayeria-layout.styl +48 -48
- package/source/css/clipboard.styl +37 -37
- package/source/css/custom.styl +17 -17
- package/source/css/fonts/remixicon.css +1816 -1816
- package/source/css/fonts/remixicon.svg +5329 -5329
- package/source/data/random-sentences.txt +2629 -141
- package/source/dist/main.css +1 -1
- package/source/dist/main.js +1 -1
- package/source/js/clickBoom1.js +152 -152
- package/source/js/clickBoom2.js +180 -180
- package/source/js/jquery-3.6.0.min.js +2 -2
- package/source/js/lazyload.min.js +7 -7
- package/source/js/search.js +126 -126
- package/source/js/random-sentences.js +0 -166
package/source/js/clickBoom2.js
CHANGED
|
@@ -1,180 +1,180 @@
|
|
|
1
|
-
class Circle {
|
|
2
|
-
constructor({ origin, speed, color, angle, context }) {
|
|
3
|
-
this.origin = origin;
|
|
4
|
-
this.position = { ...this.origin };
|
|
5
|
-
this.color = color;
|
|
6
|
-
this.speed = speed;
|
|
7
|
-
this.angle = angle;
|
|
8
|
-
this.context = context;
|
|
9
|
-
this.renderCount = 0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
draw() {
|
|
13
|
-
this.context.fillStyle = this.color;
|
|
14
|
-
this.context.beginPath();
|
|
15
|
-
this.context.arc(this.position.x, this.position.y, 2, 0, Math.PI * 2);
|
|
16
|
-
this.context.fill();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
move() {
|
|
20
|
-
this.position.x = Math.sin(this.angle) * this.speed + this.position.x;
|
|
21
|
-
this.position.y =
|
|
22
|
-
Math.cos(this.angle) * this.speed +
|
|
23
|
-
this.position.y +
|
|
24
|
-
this.renderCount * 0.3;
|
|
25
|
-
this.renderCount++;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
class Boom {
|
|
30
|
-
constructor({ origin, context, circleCount = 10, area }) {
|
|
31
|
-
this.origin = origin;
|
|
32
|
-
this.context = context;
|
|
33
|
-
this.circleCount = circleCount;
|
|
34
|
-
this.area = area;
|
|
35
|
-
this.stop = false;
|
|
36
|
-
this.circles = [];
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
randomArray(range) {
|
|
40
|
-
const length = range.length;
|
|
41
|
-
const randomIndex = Math.floor(length * Math.random());
|
|
42
|
-
return range[randomIndex];
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
randomColor() {
|
|
46
|
-
const range = ["8", "9", "A", "B", "C", "D", "E", "F"];
|
|
47
|
-
return (
|
|
48
|
-
"#" +
|
|
49
|
-
this.randomArray(range) +
|
|
50
|
-
this.randomArray(range) +
|
|
51
|
-
this.randomArray(range) +
|
|
52
|
-
this.randomArray(range) +
|
|
53
|
-
this.randomArray(range) +
|
|
54
|
-
this.randomArray(range)
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
randomRange(start, end) {
|
|
59
|
-
return (end - start) * Math.random() + start;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
init() {
|
|
63
|
-
for (let i = 0; i < this.circleCount; i++) {
|
|
64
|
-
const circle = new Circle({
|
|
65
|
-
context: this.context,
|
|
66
|
-
origin: this.origin,
|
|
67
|
-
color: this.randomColor(),
|
|
68
|
-
angle: this.randomRange(Math.PI - 1, Math.PI + 1),
|
|
69
|
-
speed: this.randomRange(1, 6),
|
|
70
|
-
});
|
|
71
|
-
this.circles.push(circle);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
move() {
|
|
76
|
-
this.circles.forEach((circle, index) => {
|
|
77
|
-
if (
|
|
78
|
-
circle.position.x > this.area.width ||
|
|
79
|
-
circle.position.y > this.area.height
|
|
80
|
-
) {
|
|
81
|
-
return this.circles.splice(index, 1);
|
|
82
|
-
}
|
|
83
|
-
circle.move();
|
|
84
|
-
});
|
|
85
|
-
if (this.circles.length == 0) {
|
|
86
|
-
this.stop = true;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
draw() {
|
|
91
|
-
this.circles.forEach((circle) => circle.draw());
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
class CursorSpecialEffects {
|
|
96
|
-
constructor() {
|
|
97
|
-
this.computerCanvas = document.createElement("canvas");
|
|
98
|
-
this.renderCanvas = document.createElement("canvas");
|
|
99
|
-
|
|
100
|
-
this.computerContext = this.computerCanvas.getContext("2d");
|
|
101
|
-
this.renderContext = this.renderCanvas.getContext("2d");
|
|
102
|
-
|
|
103
|
-
this.globalWidth = window.innerWidth;
|
|
104
|
-
this.globalHeight = window.innerHeight;
|
|
105
|
-
|
|
106
|
-
this.booms = [];
|
|
107
|
-
this.running = false;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
handleMouseDown(e) {
|
|
111
|
-
const boom = new Boom({
|
|
112
|
-
origin: { x: e.clientX, y: e.clientY },
|
|
113
|
-
context: this.computerContext,
|
|
114
|
-
area: {
|
|
115
|
-
width: this.globalWidth,
|
|
116
|
-
height: this.globalHeight,
|
|
117
|
-
},
|
|
118
|
-
});
|
|
119
|
-
boom.init();
|
|
120
|
-
this.booms.push(boom);
|
|
121
|
-
this.running || this.run();
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
handlePageHide() {
|
|
125
|
-
this.booms = [];
|
|
126
|
-
this.running = false;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
init() {
|
|
130
|
-
const style = this.renderCanvas.style;
|
|
131
|
-
style.position = "fixed";
|
|
132
|
-
style.top = style.left = 0;
|
|
133
|
-
style.zIndex = "99999";
|
|
134
|
-
style.pointerEvents = "none";
|
|
135
|
-
|
|
136
|
-
style.width =
|
|
137
|
-
this.renderCanvas.width =
|
|
138
|
-
this.computerCanvas.width =
|
|
139
|
-
this.globalWidth;
|
|
140
|
-
style.height =
|
|
141
|
-
this.renderCanvas.height =
|
|
142
|
-
this.computerCanvas.height =
|
|
143
|
-
this.globalHeight;
|
|
144
|
-
|
|
145
|
-
document.body.append(this.renderCanvas);
|
|
146
|
-
|
|
147
|
-
window.addEventListener("mousedown", this.handleMouseDown.bind(this));
|
|
148
|
-
window.addEventListener("pagehide", this.handlePageHide.bind(this));
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
run() {
|
|
152
|
-
this.running = true;
|
|
153
|
-
if (this.booms.length == 0) {
|
|
154
|
-
return (this.running = false);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
requestAnimationFrame(this.run.bind(this));
|
|
158
|
-
|
|
159
|
-
this.computerContext.clearRect(0, 0, this.globalWidth, this.globalHeight);
|
|
160
|
-
this.renderContext.clearRect(0, 0, this.globalWidth, this.globalHeight);
|
|
161
|
-
|
|
162
|
-
this.booms.forEach((boom, index) => {
|
|
163
|
-
if (boom.stop) {
|
|
164
|
-
return this.booms.splice(index, 1);
|
|
165
|
-
}
|
|
166
|
-
boom.move();
|
|
167
|
-
boom.draw();
|
|
168
|
-
});
|
|
169
|
-
this.renderContext.drawImage(
|
|
170
|
-
this.computerCanvas,
|
|
171
|
-
0,
|
|
172
|
-
0,
|
|
173
|
-
this.globalWidth,
|
|
174
|
-
this.globalHeight
|
|
175
|
-
);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
const cursorSpecialEffects = new CursorSpecialEffects();
|
|
180
|
-
cursorSpecialEffects.init();
|
|
1
|
+
class Circle {
|
|
2
|
+
constructor({ origin, speed, color, angle, context }) {
|
|
3
|
+
this.origin = origin;
|
|
4
|
+
this.position = { ...this.origin };
|
|
5
|
+
this.color = color;
|
|
6
|
+
this.speed = speed;
|
|
7
|
+
this.angle = angle;
|
|
8
|
+
this.context = context;
|
|
9
|
+
this.renderCount = 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
draw() {
|
|
13
|
+
this.context.fillStyle = this.color;
|
|
14
|
+
this.context.beginPath();
|
|
15
|
+
this.context.arc(this.position.x, this.position.y, 2, 0, Math.PI * 2);
|
|
16
|
+
this.context.fill();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
move() {
|
|
20
|
+
this.position.x = Math.sin(this.angle) * this.speed + this.position.x;
|
|
21
|
+
this.position.y =
|
|
22
|
+
Math.cos(this.angle) * this.speed +
|
|
23
|
+
this.position.y +
|
|
24
|
+
this.renderCount * 0.3;
|
|
25
|
+
this.renderCount++;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
class Boom {
|
|
30
|
+
constructor({ origin, context, circleCount = 10, area }) {
|
|
31
|
+
this.origin = origin;
|
|
32
|
+
this.context = context;
|
|
33
|
+
this.circleCount = circleCount;
|
|
34
|
+
this.area = area;
|
|
35
|
+
this.stop = false;
|
|
36
|
+
this.circles = [];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
randomArray(range) {
|
|
40
|
+
const length = range.length;
|
|
41
|
+
const randomIndex = Math.floor(length * Math.random());
|
|
42
|
+
return range[randomIndex];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
randomColor() {
|
|
46
|
+
const range = ["8", "9", "A", "B", "C", "D", "E", "F"];
|
|
47
|
+
return (
|
|
48
|
+
"#" +
|
|
49
|
+
this.randomArray(range) +
|
|
50
|
+
this.randomArray(range) +
|
|
51
|
+
this.randomArray(range) +
|
|
52
|
+
this.randomArray(range) +
|
|
53
|
+
this.randomArray(range) +
|
|
54
|
+
this.randomArray(range)
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
randomRange(start, end) {
|
|
59
|
+
return (end - start) * Math.random() + start;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
init() {
|
|
63
|
+
for (let i = 0; i < this.circleCount; i++) {
|
|
64
|
+
const circle = new Circle({
|
|
65
|
+
context: this.context,
|
|
66
|
+
origin: this.origin,
|
|
67
|
+
color: this.randomColor(),
|
|
68
|
+
angle: this.randomRange(Math.PI - 1, Math.PI + 1),
|
|
69
|
+
speed: this.randomRange(1, 6),
|
|
70
|
+
});
|
|
71
|
+
this.circles.push(circle);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
move() {
|
|
76
|
+
this.circles.forEach((circle, index) => {
|
|
77
|
+
if (
|
|
78
|
+
circle.position.x > this.area.width ||
|
|
79
|
+
circle.position.y > this.area.height
|
|
80
|
+
) {
|
|
81
|
+
return this.circles.splice(index, 1);
|
|
82
|
+
}
|
|
83
|
+
circle.move();
|
|
84
|
+
});
|
|
85
|
+
if (this.circles.length == 0) {
|
|
86
|
+
this.stop = true;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
draw() {
|
|
91
|
+
this.circles.forEach((circle) => circle.draw());
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
class CursorSpecialEffects {
|
|
96
|
+
constructor() {
|
|
97
|
+
this.computerCanvas = document.createElement("canvas");
|
|
98
|
+
this.renderCanvas = document.createElement("canvas");
|
|
99
|
+
|
|
100
|
+
this.computerContext = this.computerCanvas.getContext("2d");
|
|
101
|
+
this.renderContext = this.renderCanvas.getContext("2d");
|
|
102
|
+
|
|
103
|
+
this.globalWidth = window.innerWidth;
|
|
104
|
+
this.globalHeight = window.innerHeight;
|
|
105
|
+
|
|
106
|
+
this.booms = [];
|
|
107
|
+
this.running = false;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
handleMouseDown(e) {
|
|
111
|
+
const boom = new Boom({
|
|
112
|
+
origin: { x: e.clientX, y: e.clientY },
|
|
113
|
+
context: this.computerContext,
|
|
114
|
+
area: {
|
|
115
|
+
width: this.globalWidth,
|
|
116
|
+
height: this.globalHeight,
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
boom.init();
|
|
120
|
+
this.booms.push(boom);
|
|
121
|
+
this.running || this.run();
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
handlePageHide() {
|
|
125
|
+
this.booms = [];
|
|
126
|
+
this.running = false;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
init() {
|
|
130
|
+
const style = this.renderCanvas.style;
|
|
131
|
+
style.position = "fixed";
|
|
132
|
+
style.top = style.left = 0;
|
|
133
|
+
style.zIndex = "99999";
|
|
134
|
+
style.pointerEvents = "none";
|
|
135
|
+
|
|
136
|
+
style.width =
|
|
137
|
+
this.renderCanvas.width =
|
|
138
|
+
this.computerCanvas.width =
|
|
139
|
+
this.globalWidth;
|
|
140
|
+
style.height =
|
|
141
|
+
this.renderCanvas.height =
|
|
142
|
+
this.computerCanvas.height =
|
|
143
|
+
this.globalHeight;
|
|
144
|
+
|
|
145
|
+
document.body.append(this.renderCanvas);
|
|
146
|
+
|
|
147
|
+
window.addEventListener("mousedown", this.handleMouseDown.bind(this));
|
|
148
|
+
window.addEventListener("pagehide", this.handlePageHide.bind(this));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
run() {
|
|
152
|
+
this.running = true;
|
|
153
|
+
if (this.booms.length == 0) {
|
|
154
|
+
return (this.running = false);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
requestAnimationFrame(this.run.bind(this));
|
|
158
|
+
|
|
159
|
+
this.computerContext.clearRect(0, 0, this.globalWidth, this.globalHeight);
|
|
160
|
+
this.renderContext.clearRect(0, 0, this.globalWidth, this.globalHeight);
|
|
161
|
+
|
|
162
|
+
this.booms.forEach((boom, index) => {
|
|
163
|
+
if (boom.stop) {
|
|
164
|
+
return this.booms.splice(index, 1);
|
|
165
|
+
}
|
|
166
|
+
boom.move();
|
|
167
|
+
boom.draw();
|
|
168
|
+
});
|
|
169
|
+
this.renderContext.drawImage(
|
|
170
|
+
this.computerCanvas,
|
|
171
|
+
0,
|
|
172
|
+
0,
|
|
173
|
+
this.globalWidth,
|
|
174
|
+
this.globalHeight
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const cursorSpecialEffects = new CursorSpecialEffects();
|
|
180
|
+
cursorSpecialEffects.init();
|