@mlikiowa/nanaeo 1.0.1702966759079 → 1.0.1702967656417
Sign up to get free protection for your applications and to get access to all the features.
- package/2022/08/04/NewBlog/index.html +3473 -0
- package/2022/08/13/GaussWave/index.html +3407 -0
- package/about/index.html +3236 -0
- package/archives/2022/08/index.html +3411 -0
- package/archives/2022/index.html +3411 -0
- package/archives/index.html +3308 -0
- package/asset/Sotheby.ttf +0 -0
- package/asset/backimg.png +0 -0
- package/atom.xml +171 -0
- package/categories/DevLog/index.html +3351 -0
- package/categories/SiteLog/index.html +3351 -0
- package/categories/index.html +3174 -0
- package/category/devlog/atom.xml +58 -0
- package/category/devlog/feed.json +19 -0
- package/category/devlog/rss.xml +62 -0
- package/category/sitelog/atom.xml +125 -0
- package/category/sitelog/feed.json +20 -0
- package/category/sitelog/rss.xml +129 -0
- package/content.json +1 -0
- package/css/Readme.html +9 -0
- package/css/first.css +1504 -0
- package/css/style.css +7106 -0
- package/favicon.ico +0 -0
- package/feed.json +31 -0
- package/friends/index.html +3661 -0
- package/index.html +3421 -0
- package/js/app.js +1223 -0
- package/js/plugins/aplayer.js +186 -0
- package/js/plugins/parallax.js +191 -0
- package/js/plugins/rightMenu.js +577 -0
- package/js/plugins/rightMenus.js +618 -0
- package/js/plugins/tags/contributors.js +92 -0
- package/js/plugins/tags/friends.js +93 -0
- package/js/plugins/tags/sites.js +96 -0
- package/js/search/hexo.js +192 -0
- package/package.json +1 -1
- package/rss.xml +175 -0
- package/tag/devlog/atom.xml +58 -0
- package/tag/devlog/feed.json +19 -0
- package/tag/devlog/rss.xml +62 -0
- package/tag/gauss/atom.xml +58 -0
- package/tag/gauss/feed.json +19 -0
- package/tag/gauss/rss.xml +62 -0
- package/tag/hexo/atom.xml +125 -0
- package/tag/hexo/feed.json +20 -0
- package/tag/hexo/rss.xml +129 -0
- package/tag/hexothemes/atom.xml +125 -0
- package/tag/hexothemes/feed.json +20 -0
- package/tag/hexothemes/rss.xml +129 -0
- package/tag/sitelog/atom.xml +125 -0
- package/tag/sitelog/feed.json +20 -0
- package/tag/sitelog/rss.xml +129 -0
- package/tags/DevLog/index.html +3351 -0
- package/tags/Gauss/index.html +3351 -0
- package/tags/Hexo/index.html +3351 -0
- package/tags/HexoThemes/index.html +3351 -0
- package/tags/SiteLog/index.html +3351 -0
- package/tags/index.html +3159 -0
- package/volantis-sw.js +797 -0
@@ -0,0 +1,3407 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="zh-CN,en,default">
|
3
|
+
<head hexo-theme='https://github.com/volantis-x/hexo-theme-volantis/#5.8.0'>
|
4
|
+
<meta name="generator" content="Hexo 6.3.0">
|
5
|
+
<meta name="Volantis" content="5.8.0">
|
6
|
+
<meta charset="utf-8">
|
7
|
+
<!-- SEO相关 -->
|
8
|
+
|
9
|
+
<link rel="canonical" href="https://nanaeo.cn/2022/08/13/gausswave/"/>
|
10
|
+
<!-- 渲染优化 -->
|
11
|
+
<meta http-equiv='x-dns-prefetch-control' content='on' />
|
12
|
+
<link rel='dns-prefetch' href='https://unpkg.com'>
|
13
|
+
<link rel="preconnect" href="https://unpkg.com" crossorigin>
|
14
|
+
<meta name="renderer" content="webkit">
|
15
|
+
<meta name="force-rendering" content="webkit">
|
16
|
+
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
|
17
|
+
<meta http-equiv="Content-Security-Policy" content=" default-src 'self' https:; block-all-mixed-content; base-uri 'self' https:; form-action 'self' https:; worker-src 'self' https:; connect-src 'self' https: *; img-src 'self' data: https: *; media-src 'self' https: *; font-src 'self' data: https: *; frame-src 'self' https: *; manifest-src 'self' https: *; child-src https:; script-src 'self' https: 'unsafe-inline' *; style-src 'self' https: 'unsafe-inline' *; ">
|
18
|
+
<meta name="HandheldFriendly" content="True" >
|
19
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
20
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
|
21
|
+
<meta content="black-translucent" name="apple-mobile-web-app-status-bar-style">
|
22
|
+
<meta content="telephone=no" name="format-detection">
|
23
|
+
<!-- import head_begin begin -->
|
24
|
+
<!-- import head_begin end -->
|
25
|
+
<!-- Custom Files headBegin begin-->
|
26
|
+
|
27
|
+
<!-- Custom Files headBegin end-->
|
28
|
+
<!-- front-matter head_begin begin -->
|
29
|
+
<!-- front-matter head_begin end -->
|
30
|
+
<link rel="preload" href="/css/style.css" as="style">
|
31
|
+
<link rel="preload" href="https://nanaeo.cn/asset/Sotheby.ttf" as="font" type="font/ttf" crossorigin="anonymous">
|
32
|
+
<link rel="preload" href="https://fastly.jsdelivr.net/gh/moieo/moieo@main/moieo.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
33
|
+
|
34
|
+
<!-- feed -->
|
35
|
+
<!-- 页面元数据 -->
|
36
|
+
<title>高斯滤波 - Village</title>
|
37
|
+
<meta name="keywords" content="DevLog,Gauss,null">
|
38
|
+
<meta desc name="description" content="高斯滤波的实现 - Mlikiowa - Village">
|
39
|
+
|
40
|
+
<meta property="og:type" content="article">
|
41
|
+
<meta property="og:title" content="高斯滤波">
|
42
|
+
<meta property="og:url" content="https://nanaeo.cn/2022/08/13/GaussWave/index.html">
|
43
|
+
<meta property="og:site_name" content="Village">
|
44
|
+
<meta property="og:description" content="高斯滤波的实现">
|
45
|
+
<meta property="og:locale" content="zh_CN">
|
46
|
+
<meta property="og:image" content="https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png">
|
47
|
+
<meta property="article:published_time" content="2022-08-13T16:00:00.000Z">
|
48
|
+
<meta property="article:modified_time" content="2023-12-19T06:33:48.885Z">
|
49
|
+
<meta property="article:author" content="Mlikiowa">
|
50
|
+
<meta property="article:tag" content="DevLog">
|
51
|
+
<meta property="article:tag" content="Gauss">
|
52
|
+
<meta name="twitter:card" content="summary">
|
53
|
+
<meta name="twitter:image" content="https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png">
|
54
|
+
<style>
|
55
|
+
/* 首屏样式 */
|
56
|
+
#safearea {
|
57
|
+
display: none;
|
58
|
+
}
|
59
|
+
.post-story + .post-story {
|
60
|
+
content-visibility: auto;
|
61
|
+
contain-intrinsic-size: 10px 500px;
|
62
|
+
}
|
63
|
+
:root {
|
64
|
+
--color-site-body: #e0eeee;
|
65
|
+
--color-site-bg: #e0eeee;
|
66
|
+
--color-site-inner: #fff;
|
67
|
+
--color-site-footer: #666;
|
68
|
+
--color-card: #fff0f5;
|
69
|
+
--color-text: #eea9b8;
|
70
|
+
--color-block: #f6f6f6;
|
71
|
+
--color-inlinecode: #ec7bb6;
|
72
|
+
--color-codeblock: #e0eeee;
|
73
|
+
--color-h1: #3a3a3a;
|
74
|
+
--color-h2: #3a3a3a;
|
75
|
+
--color-h3: #23464f;
|
76
|
+
--color-h4: #23464f;
|
77
|
+
--color-h5: #23464f;
|
78
|
+
--color-h6: #23464f;
|
79
|
+
--color-p: #23464f;
|
80
|
+
--color-list: #eea9b8;
|
81
|
+
--color-list-hl: #f7cdd4;
|
82
|
+
--color-meta: #888;
|
83
|
+
--color-read-bkg: #e0d8c8;
|
84
|
+
--color-read-post: #f8f1e2;
|
85
|
+
--color-copyright-bkg: #f5f5f5;
|
86
|
+
}
|
87
|
+
* {
|
88
|
+
box-sizing: border-box;
|
89
|
+
-webkit-box-sizing: border-box;
|
90
|
+
-moz-box-sizing: border-box;
|
91
|
+
outline: none;
|
92
|
+
margin: 0;
|
93
|
+
padding: 0;
|
94
|
+
}
|
95
|
+
*::-webkit-scrollbar {
|
96
|
+
height: 4px;
|
97
|
+
width: 4px;
|
98
|
+
}
|
99
|
+
*::-webkit-scrollbar-track-piece {
|
100
|
+
background: transparent;
|
101
|
+
}
|
102
|
+
*::-webkit-scrollbar-thumb {
|
103
|
+
background: #fcc;
|
104
|
+
cursor: pointer;
|
105
|
+
border-radius: 2px;
|
106
|
+
-webkit-border-radius: 2px;
|
107
|
+
}
|
108
|
+
*::-webkit-scrollbar-thumb:hover {
|
109
|
+
background: #ff5722;
|
110
|
+
}
|
111
|
+
html {
|
112
|
+
color: var(--color-text);
|
113
|
+
width: 100%;
|
114
|
+
height: 100%;
|
115
|
+
font-family: Dosis, "PingFang SC", "Microsoft YaHei", Helvetica, Arial, Menlo, Monaco, monospace, sans-serif;
|
116
|
+
font-size: 16px;
|
117
|
+
}
|
118
|
+
html >::-webkit-scrollbar {
|
119
|
+
height: 4px;
|
120
|
+
width: 4px;
|
121
|
+
}
|
122
|
+
html >::-webkit-scrollbar-track-piece {
|
123
|
+
background: transparent;
|
124
|
+
}
|
125
|
+
html >::-webkit-scrollbar-thumb {
|
126
|
+
background: #54b5a0 linear-gradient(45deg, rgba(255,255,255,0.4) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0.4) 75%, transparent 75%, transparent);
|
127
|
+
cursor: pointer;
|
128
|
+
border-radius: 2px;
|
129
|
+
-webkit-border-radius: 2px;
|
130
|
+
}
|
131
|
+
html >::-webkit-scrollbar-thumb:hover {
|
132
|
+
background: #54b5a0 linear-gradient(45deg, rgba(255,255,255,0.4) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0.4) 75%, transparent 75%, transparent);
|
133
|
+
}
|
134
|
+
body {
|
135
|
+
background-color: var(--color-site-body);
|
136
|
+
text-rendering: optimizelegibility;
|
137
|
+
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
138
|
+
line-height: 1.6;
|
139
|
+
-webkit-text-size-adjust: 100%;
|
140
|
+
-ms-text-size-adjust: 100%;
|
141
|
+
}
|
142
|
+
body.modal-active {
|
143
|
+
overflow: hidden;
|
144
|
+
}
|
145
|
+
@media screen and (max-width: 680px) {
|
146
|
+
body.modal-active {
|
147
|
+
position: fixed;
|
148
|
+
top: 0;
|
149
|
+
right: 0;
|
150
|
+
bottom: 0;
|
151
|
+
left: 0;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
a {
|
155
|
+
color: #ec7bb6;
|
156
|
+
cursor: pointer;
|
157
|
+
text-decoration: none;
|
158
|
+
transition: all 0.28s ease;
|
159
|
+
-webkit-transition: all 0.28s ease;
|
160
|
+
-khtml-transition: all 0.28s ease;
|
161
|
+
-moz-transition: all 0.28s ease;
|
162
|
+
-o-transition: all 0.28s ease;
|
163
|
+
-ms-transition: all 0.28s ease;
|
164
|
+
}
|
165
|
+
a:hover {
|
166
|
+
color: #ff5722;
|
167
|
+
}
|
168
|
+
a:active,
|
169
|
+
a:hover {
|
170
|
+
outline: 0;
|
171
|
+
}
|
172
|
+
ul,
|
173
|
+
ol {
|
174
|
+
padding-left: 0;
|
175
|
+
}
|
176
|
+
ul li,
|
177
|
+
ol li {
|
178
|
+
list-style: none;
|
179
|
+
}
|
180
|
+
header {
|
181
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
182
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
183
|
+
display: block;
|
184
|
+
}
|
185
|
+
img {
|
186
|
+
border: 0;
|
187
|
+
background: none;
|
188
|
+
max-width: 100%;
|
189
|
+
}
|
190
|
+
svg:not(:root) {
|
191
|
+
overflow: hidden;
|
192
|
+
}
|
193
|
+
hr {
|
194
|
+
-moz-box-sizing: content-box;
|
195
|
+
box-sizing: content-box;
|
196
|
+
-webkit-box-sizing: content-box;
|
197
|
+
-moz-box-sizing: content-box;
|
198
|
+
height: 0;
|
199
|
+
border: 0;
|
200
|
+
border-radius: 1px;
|
201
|
+
-webkit-border-radius: 1px;
|
202
|
+
border-bottom: 1px solid rgba(238,169,184,0.1);
|
203
|
+
}
|
204
|
+
button,
|
205
|
+
input {
|
206
|
+
color: inherit;
|
207
|
+
font: inherit;
|
208
|
+
margin: 0;
|
209
|
+
}
|
210
|
+
button {
|
211
|
+
overflow: visible;
|
212
|
+
text-transform: none;
|
213
|
+
-webkit-appearance: button;
|
214
|
+
cursor: pointer;
|
215
|
+
}
|
216
|
+
@supports (backdrop-filter: blur(20px)) {
|
217
|
+
.blur {
|
218
|
+
background: rgba(255,240,245,0.9) !important;
|
219
|
+
backdrop-filter: saturate(200%) blur(20px);
|
220
|
+
}
|
221
|
+
}
|
222
|
+
.shadow {
|
223
|
+
box-shadow: 0 1px 2px 0px rgba(0,0,0,0.1);
|
224
|
+
-webkit-box-shadow: 0 1px 2px 0px rgba(0,0,0,0.1);
|
225
|
+
}
|
226
|
+
.shadow.floatable {
|
227
|
+
transition: all 0.28s ease;
|
228
|
+
-webkit-transition: all 0.28s ease;
|
229
|
+
-khtml-transition: all 0.28s ease;
|
230
|
+
-moz-transition: all 0.28s ease;
|
231
|
+
-o-transition: all 0.28s ease;
|
232
|
+
-ms-transition: all 0.28s ease;
|
233
|
+
}
|
234
|
+
.shadow.floatable:hover {
|
235
|
+
box-shadow: 0 2px 4px 0px rgba(0,0,0,0.1), 0 4px 8px 0px rgba(0,0,0,0.1), 0 8px 16px 0px rgba(0,0,0,0.1);
|
236
|
+
-webkit-box-shadow: 0 2px 4px 0px rgba(0,0,0,0.1), 0 4px 8px 0px rgba(0,0,0,0.1), 0 8px 16px 0px rgba(0,0,0,0.1);
|
237
|
+
}
|
238
|
+
#l_cover {
|
239
|
+
min-height: 64px;
|
240
|
+
}
|
241
|
+
.cover-wrapper {
|
242
|
+
top: 0;
|
243
|
+
left: 0;
|
244
|
+
max-width: 100%;
|
245
|
+
height: 100vh;
|
246
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
247
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
248
|
+
display: -ms-flexbox /* TWEENER - IE 10 */;
|
249
|
+
display: -webkit-flex /* NEW - Chrome */;
|
250
|
+
display: flex /* NEW, Spec - Opera 12.1, Firefox 20+ */;
|
251
|
+
display: flex;
|
252
|
+
flex-wrap: nowrap;
|
253
|
+
-webkit-flex-wrap: nowrap;
|
254
|
+
-khtml-flex-wrap: nowrap;
|
255
|
+
-moz-flex-wrap: nowrap;
|
256
|
+
-o-flex-wrap: nowrap;
|
257
|
+
-ms-flex-wrap: nowrap;
|
258
|
+
-webkit-box-direction: normal;
|
259
|
+
-moz-box-direction: normal;
|
260
|
+
-webkit-box-orient: vertical;
|
261
|
+
-moz-box-orient: vertical;
|
262
|
+
-webkit-flex-direction: column;
|
263
|
+
-ms-flex-direction: column;
|
264
|
+
flex-direction: column;
|
265
|
+
align-items: center;
|
266
|
+
align-self: center;
|
267
|
+
align-content: center;
|
268
|
+
color: var(--color-site-inner);
|
269
|
+
padding: 0 16px;
|
270
|
+
user-select: none;
|
271
|
+
-webkit-user-select: none;
|
272
|
+
-moz-user-select: none;
|
273
|
+
-ms-user-select: none;
|
274
|
+
position: relative;
|
275
|
+
overflow: hidden;
|
276
|
+
margin-bottom: -100px;
|
277
|
+
}
|
278
|
+
.cover-wrapper .cover-bg {
|
279
|
+
position: absolute;
|
280
|
+
width: 100%;
|
281
|
+
height: 100%;
|
282
|
+
background-position: center;
|
283
|
+
background-size: cover;
|
284
|
+
-webkit-background-size: cover;
|
285
|
+
-moz-background-size: cover;
|
286
|
+
}
|
287
|
+
.cover-wrapper .cover-bg.lazyload:not(.loaded) {
|
288
|
+
opacity: 0;
|
289
|
+
-webkit-opacity: 0;
|
290
|
+
-moz-opacity: 0;
|
291
|
+
}
|
292
|
+
.cover-wrapper .cover-bg.lazyload.loaded {
|
293
|
+
animation-delay: 0s;
|
294
|
+
animation-duration: 0.5s;
|
295
|
+
animation-fill-mode: forwards;
|
296
|
+
animation-timing-function: ease-out;
|
297
|
+
animation-name: fadeIn;
|
298
|
+
}
|
299
|
+
@-moz-keyframes fadeIn {
|
300
|
+
0% {
|
301
|
+
opacity: 0;
|
302
|
+
-webkit-opacity: 0;
|
303
|
+
-moz-opacity: 0;
|
304
|
+
filter: blur(12px);
|
305
|
+
transform: scale(1.02);
|
306
|
+
-webkit-transform: scale(1.02);
|
307
|
+
-khtml-transform: scale(1.02);
|
308
|
+
-moz-transform: scale(1.02);
|
309
|
+
-o-transform: scale(1.02);
|
310
|
+
-ms-transform: scale(1.02);
|
311
|
+
}
|
312
|
+
100% {
|
313
|
+
opacity: 1;
|
314
|
+
-webkit-opacity: 1;
|
315
|
+
-moz-opacity: 1;
|
316
|
+
}
|
317
|
+
}
|
318
|
+
@-webkit-keyframes fadeIn {
|
319
|
+
0% {
|
320
|
+
opacity: 0;
|
321
|
+
-webkit-opacity: 0;
|
322
|
+
-moz-opacity: 0;
|
323
|
+
filter: blur(12px);
|
324
|
+
transform: scale(1.02);
|
325
|
+
-webkit-transform: scale(1.02);
|
326
|
+
-khtml-transform: scale(1.02);
|
327
|
+
-moz-transform: scale(1.02);
|
328
|
+
-o-transform: scale(1.02);
|
329
|
+
-ms-transform: scale(1.02);
|
330
|
+
}
|
331
|
+
100% {
|
332
|
+
opacity: 1;
|
333
|
+
-webkit-opacity: 1;
|
334
|
+
-moz-opacity: 1;
|
335
|
+
}
|
336
|
+
}
|
337
|
+
@-o-keyframes fadeIn {
|
338
|
+
0% {
|
339
|
+
opacity: 0;
|
340
|
+
-webkit-opacity: 0;
|
341
|
+
-moz-opacity: 0;
|
342
|
+
filter: blur(12px);
|
343
|
+
transform: scale(1.02);
|
344
|
+
-webkit-transform: scale(1.02);
|
345
|
+
-khtml-transform: scale(1.02);
|
346
|
+
-moz-transform: scale(1.02);
|
347
|
+
-o-transform: scale(1.02);
|
348
|
+
-ms-transform: scale(1.02);
|
349
|
+
}
|
350
|
+
100% {
|
351
|
+
opacity: 1;
|
352
|
+
-webkit-opacity: 1;
|
353
|
+
-moz-opacity: 1;
|
354
|
+
}
|
355
|
+
}
|
356
|
+
@keyframes fadeIn {
|
357
|
+
0% {
|
358
|
+
opacity: 0;
|
359
|
+
-webkit-opacity: 0;
|
360
|
+
-moz-opacity: 0;
|
361
|
+
filter: blur(12px);
|
362
|
+
transform: scale(1.02);
|
363
|
+
-webkit-transform: scale(1.02);
|
364
|
+
-khtml-transform: scale(1.02);
|
365
|
+
-moz-transform: scale(1.02);
|
366
|
+
-o-transform: scale(1.02);
|
367
|
+
-ms-transform: scale(1.02);
|
368
|
+
}
|
369
|
+
100% {
|
370
|
+
opacity: 1;
|
371
|
+
-webkit-opacity: 1;
|
372
|
+
-moz-opacity: 1;
|
373
|
+
}
|
374
|
+
}
|
375
|
+
.cover-wrapper .cover-body {
|
376
|
+
z-index: 1;
|
377
|
+
position: relative;
|
378
|
+
width: 100%;
|
379
|
+
height: 100%;
|
380
|
+
}
|
381
|
+
.cover-wrapper#full {
|
382
|
+
height: calc(100vh + 100px);
|
383
|
+
padding-bottom: 100px;
|
384
|
+
}
|
385
|
+
.cover-wrapper#half {
|
386
|
+
max-height: 640px;
|
387
|
+
min-height: 400px;
|
388
|
+
height: calc(36vh - 64px + 200px);
|
389
|
+
}
|
390
|
+
.cover-wrapper #scroll-down {
|
391
|
+
width: 100%;
|
392
|
+
height: 64px;
|
393
|
+
position: absolute;
|
394
|
+
bottom: 100px;
|
395
|
+
text-align: center;
|
396
|
+
cursor: pointer;
|
397
|
+
}
|
398
|
+
.cover-wrapper #scroll-down .scroll-down-effects {
|
399
|
+
color: #fff;
|
400
|
+
font-size: 24px;
|
401
|
+
line-height: 64px;
|
402
|
+
position: absolute;
|
403
|
+
width: 24px;
|
404
|
+
left: calc(50% - 12px);
|
405
|
+
text-shadow: 0 1px 2px rgba(0,0,0,0.1);
|
406
|
+
animation: scroll-down-effect 1.5s infinite;
|
407
|
+
-webkit-animation: scroll-down-effect 1.5s infinite;
|
408
|
+
-khtml-animation: scroll-down-effect 1.5s infinite;
|
409
|
+
-moz-animation: scroll-down-effect 1.5s infinite;
|
410
|
+
-o-animation: scroll-down-effect 1.5s infinite;
|
411
|
+
-ms-animation: scroll-down-effect 1.5s infinite;
|
412
|
+
}
|
413
|
+
@-moz-keyframes scroll-down-effect {
|
414
|
+
0% {
|
415
|
+
top: 0;
|
416
|
+
opacity: 1;
|
417
|
+
-webkit-opacity: 1;
|
418
|
+
-moz-opacity: 1;
|
419
|
+
}
|
420
|
+
50% {
|
421
|
+
top: -16px;
|
422
|
+
opacity: 0.4;
|
423
|
+
-webkit-opacity: 0.4;
|
424
|
+
-moz-opacity: 0.4;
|
425
|
+
}
|
426
|
+
100% {
|
427
|
+
top: 0;
|
428
|
+
opacity: 1;
|
429
|
+
-webkit-opacity: 1;
|
430
|
+
-moz-opacity: 1;
|
431
|
+
}
|
432
|
+
}
|
433
|
+
@-webkit-keyframes scroll-down-effect {
|
434
|
+
0% {
|
435
|
+
top: 0;
|
436
|
+
opacity: 1;
|
437
|
+
-webkit-opacity: 1;
|
438
|
+
-moz-opacity: 1;
|
439
|
+
}
|
440
|
+
50% {
|
441
|
+
top: -16px;
|
442
|
+
opacity: 0.4;
|
443
|
+
-webkit-opacity: 0.4;
|
444
|
+
-moz-opacity: 0.4;
|
445
|
+
}
|
446
|
+
100% {
|
447
|
+
top: 0;
|
448
|
+
opacity: 1;
|
449
|
+
-webkit-opacity: 1;
|
450
|
+
-moz-opacity: 1;
|
451
|
+
}
|
452
|
+
}
|
453
|
+
@-o-keyframes scroll-down-effect {
|
454
|
+
0% {
|
455
|
+
top: 0;
|
456
|
+
opacity: 1;
|
457
|
+
-webkit-opacity: 1;
|
458
|
+
-moz-opacity: 1;
|
459
|
+
}
|
460
|
+
50% {
|
461
|
+
top: -16px;
|
462
|
+
opacity: 0.4;
|
463
|
+
-webkit-opacity: 0.4;
|
464
|
+
-moz-opacity: 0.4;
|
465
|
+
}
|
466
|
+
100% {
|
467
|
+
top: 0;
|
468
|
+
opacity: 1;
|
469
|
+
-webkit-opacity: 1;
|
470
|
+
-moz-opacity: 1;
|
471
|
+
}
|
472
|
+
}
|
473
|
+
@keyframes scroll-down-effect {
|
474
|
+
0% {
|
475
|
+
top: 0;
|
476
|
+
opacity: 1;
|
477
|
+
-webkit-opacity: 1;
|
478
|
+
-moz-opacity: 1;
|
479
|
+
}
|
480
|
+
50% {
|
481
|
+
top: -16px;
|
482
|
+
opacity: 0.4;
|
483
|
+
-webkit-opacity: 0.4;
|
484
|
+
-moz-opacity: 0.4;
|
485
|
+
}
|
486
|
+
100% {
|
487
|
+
top: 0;
|
488
|
+
opacity: 1;
|
489
|
+
-webkit-opacity: 1;
|
490
|
+
-moz-opacity: 1;
|
491
|
+
}
|
492
|
+
}
|
493
|
+
.cover-wrapper .cover-body {
|
494
|
+
margin-top: 64px;
|
495
|
+
margin-bottom: 100px;
|
496
|
+
}
|
497
|
+
.cover-wrapper .cover-body,
|
498
|
+
.cover-wrapper .cover-body .top,
|
499
|
+
.cover-wrapper .cover-body .bottom {
|
500
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
501
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
502
|
+
display: -ms-flexbox /* TWEENER - IE 10 */;
|
503
|
+
display: -webkit-flex /* NEW - Chrome */;
|
504
|
+
display: flex /* NEW, Spec - Opera 12.1, Firefox 20+ */;
|
505
|
+
display: flex;
|
506
|
+
-webkit-box-direction: normal;
|
507
|
+
-moz-box-direction: normal;
|
508
|
+
-webkit-box-orient: vertical;
|
509
|
+
-moz-box-orient: vertical;
|
510
|
+
-webkit-flex-direction: column;
|
511
|
+
-ms-flex-direction: column;
|
512
|
+
flex-direction: column;
|
513
|
+
align-items: center;
|
514
|
+
justify-content: center;
|
515
|
+
-webkit-justify-content: center;
|
516
|
+
-khtml-justify-content: center;
|
517
|
+
-moz-justify-content: center;
|
518
|
+
-o-justify-content: center;
|
519
|
+
-ms-justify-content: center;
|
520
|
+
max-width: 100%;
|
521
|
+
}
|
522
|
+
.cover-wrapper .cover-body .bottom {
|
523
|
+
margin-top: 32px;
|
524
|
+
}
|
525
|
+
.cover-wrapper .cover-body .title {
|
526
|
+
font-family: Sotheby, Helvetica, monospace;
|
527
|
+
font-size: 3.125rem;
|
528
|
+
line-height: 1.2;
|
529
|
+
text-shadow: 0 1px 2px rgba(0,0,0,0.1);
|
530
|
+
}
|
531
|
+
.cover-wrapper .cover-body .subtitle {
|
532
|
+
font-size: 20px;
|
533
|
+
}
|
534
|
+
.cover-wrapper .cover-body .logo {
|
535
|
+
max-height: 120px;
|
536
|
+
max-width: calc(100% - 4 * 16px);
|
537
|
+
}
|
538
|
+
@media screen and (min-height: 1024px) {
|
539
|
+
.cover-wrapper .cover-body .title {
|
540
|
+
font-size: 3rem;
|
541
|
+
}
|
542
|
+
.cover-wrapper .cover-body .subtitle {
|
543
|
+
font-size: 1.05rem;
|
544
|
+
}
|
545
|
+
.cover-wrapper .cover-body .logo {
|
546
|
+
max-height: 150px;
|
547
|
+
}
|
548
|
+
}
|
549
|
+
.cover-wrapper .cover-body .m_search {
|
550
|
+
position: relative;
|
551
|
+
max-width: calc(100% - 16px);
|
552
|
+
width: 320px;
|
553
|
+
vertical-align: middle;
|
554
|
+
}
|
555
|
+
.cover-wrapper .cover-body .m_search .form {
|
556
|
+
position: relative;
|
557
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
558
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
559
|
+
display: block;
|
560
|
+
width: 100%;
|
561
|
+
}
|
562
|
+
.cover-wrapper .cover-body .m_search .icon,
|
563
|
+
.cover-wrapper .cover-body .m_search .input {
|
564
|
+
transition: all 0.28s ease;
|
565
|
+
-webkit-transition: all 0.28s ease;
|
566
|
+
-khtml-transition: all 0.28s ease;
|
567
|
+
-moz-transition: all 0.28s ease;
|
568
|
+
-o-transition: all 0.28s ease;
|
569
|
+
-ms-transition: all 0.28s ease;
|
570
|
+
}
|
571
|
+
.cover-wrapper .cover-body .m_search .icon {
|
572
|
+
position: absolute;
|
573
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
574
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
575
|
+
display: block;
|
576
|
+
line-height: 2.5rem;
|
577
|
+
width: 32px;
|
578
|
+
top: 0;
|
579
|
+
left: 5px;
|
580
|
+
color: rgba(35,70,79,0.75);
|
581
|
+
}
|
582
|
+
.cover-wrapper .cover-body .m_search .input {
|
583
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
584
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
585
|
+
display: block;
|
586
|
+
height: 2.5rem;
|
587
|
+
width: 100%;
|
588
|
+
box-shadow: none;
|
589
|
+
-webkit-box-shadow: none;
|
590
|
+
box-sizing: border-box;
|
591
|
+
-webkit-box-sizing: border-box;
|
592
|
+
-moz-box-sizing: border-box;
|
593
|
+
font-size: 0.875rem;
|
594
|
+
-webkit-appearance: none;
|
595
|
+
padding-left: 36px;
|
596
|
+
border-radius: 1.4rem;
|
597
|
+
-webkit-border-radius: 1.4rem;
|
598
|
+
background: rgba(255,240,245,0.6);
|
599
|
+
backdrop-filter: blur(10px);
|
600
|
+
border: none;
|
601
|
+
color: var(--color-text);
|
602
|
+
}
|
603
|
+
@media screen and (max-width: 500px) {
|
604
|
+
.cover-wrapper .cover-body .m_search .input {
|
605
|
+
padding-left: 36px;
|
606
|
+
}
|
607
|
+
}
|
608
|
+
.cover-wrapper .cover-body .m_search .input:hover {
|
609
|
+
background: rgba(255,240,245,0.8);
|
610
|
+
}
|
611
|
+
.cover-wrapper .cover-body .m_search .input:focus {
|
612
|
+
background: #fff0f5;
|
613
|
+
}
|
614
|
+
.cover-wrapper .list-h {
|
615
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
616
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
617
|
+
display: -ms-flexbox /* TWEENER - IE 10 */;
|
618
|
+
display: -webkit-flex /* NEW - Chrome */;
|
619
|
+
display: flex /* NEW, Spec - Opera 12.1, Firefox 20+ */;
|
620
|
+
display: flex;
|
621
|
+
-webkit-box-direction: normal;
|
622
|
+
-moz-box-direction: normal;
|
623
|
+
-webkit-box-orient: horizontal;
|
624
|
+
-moz-box-orient: horizontal;
|
625
|
+
-webkit-flex-direction: row;
|
626
|
+
-ms-flex-direction: row;
|
627
|
+
flex-direction: row;
|
628
|
+
flex-wrap: wrap;
|
629
|
+
-webkit-flex-wrap: wrap;
|
630
|
+
-khtml-flex-wrap: wrap;
|
631
|
+
-moz-flex-wrap: wrap;
|
632
|
+
-o-flex-wrap: wrap;
|
633
|
+
-ms-flex-wrap: wrap;
|
634
|
+
align-items: stretch;
|
635
|
+
border-radius: 4px;
|
636
|
+
-webkit-border-radius: 4px;
|
637
|
+
user-select: none;
|
638
|
+
-webkit-user-select: none;
|
639
|
+
-moz-user-select: none;
|
640
|
+
-ms-user-select: none;
|
641
|
+
}
|
642
|
+
.cover-wrapper .list-h a {
|
643
|
+
-webkit-box-flex: 1;
|
644
|
+
-moz-box-flex: 1;
|
645
|
+
-webkit-flex: 1 0;
|
646
|
+
-ms-flex: 1 0;
|
647
|
+
flex: 1 0;
|
648
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
649
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
650
|
+
display: -ms-flexbox /* TWEENER - IE 10 */;
|
651
|
+
display: -webkit-flex /* NEW - Chrome */;
|
652
|
+
display: flex /* NEW, Spec - Opera 12.1, Firefox 20+ */;
|
653
|
+
display: flex;
|
654
|
+
font-weight: 600;
|
655
|
+
}
|
656
|
+
.cover-wrapper .list-h a img {
|
657
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
658
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
659
|
+
display: block;
|
660
|
+
border-radius: 2px;
|
661
|
+
-webkit-border-radius: 2px;
|
662
|
+
margin: 4px;
|
663
|
+
min-width: 40px;
|
664
|
+
max-width: 44px;
|
665
|
+
}
|
666
|
+
@media screen and (max-width: 768px) {
|
667
|
+
.cover-wrapper .list-h a img {
|
668
|
+
min-width: 36px;
|
669
|
+
max-width: 40px;
|
670
|
+
}
|
671
|
+
}
|
672
|
+
@media screen and (max-width: 500px) {
|
673
|
+
.cover-wrapper .list-h a img {
|
674
|
+
margin: 2px 4px;
|
675
|
+
min-width: 32px;
|
676
|
+
max-width: 36px;
|
677
|
+
}
|
678
|
+
}
|
679
|
+
@media screen and (max-width: 375px) {
|
680
|
+
.cover-wrapper .list-h a img {
|
681
|
+
min-width: 28px;
|
682
|
+
max-width: 32px;
|
683
|
+
}
|
684
|
+
}
|
685
|
+
.cover-wrapper {
|
686
|
+
max-width: 100%;
|
687
|
+
}
|
688
|
+
.cover-wrapper.search .bottom .menu {
|
689
|
+
margin-top: 16px;
|
690
|
+
}
|
691
|
+
.cover-wrapper.search .bottom .menu .list-h a {
|
692
|
+
white-space: nowrap;
|
693
|
+
-webkit-box-direction: normal;
|
694
|
+
-moz-box-direction: normal;
|
695
|
+
-webkit-box-orient: horizontal;
|
696
|
+
-moz-box-orient: horizontal;
|
697
|
+
-webkit-flex-direction: row;
|
698
|
+
-ms-flex-direction: row;
|
699
|
+
flex-direction: row;
|
700
|
+
align-items: baseline;
|
701
|
+
padding: 2px;
|
702
|
+
margin: 4px;
|
703
|
+
color: var(--color-site-inner);
|
704
|
+
opacity: 0.75;
|
705
|
+
-webkit-opacity: 0.75;
|
706
|
+
-moz-opacity: 0.75;
|
707
|
+
text-shadow: 0 1px 2px rgba(0,0,0,0.05);
|
708
|
+
border-bottom: 2px solid transparent;
|
709
|
+
}
|
710
|
+
.cover-wrapper.search .bottom .menu .list-h a i {
|
711
|
+
margin-right: 4px;
|
712
|
+
}
|
713
|
+
.cover-wrapper.search .bottom .menu .list-h a p {
|
714
|
+
font-size: 0.9375rem;
|
715
|
+
}
|
716
|
+
.cover-wrapper.search .bottom .menu .list-h a:hover,
|
717
|
+
.cover-wrapper.search .bottom .menu .list-h a.active,
|
718
|
+
.cover-wrapper.search .bottom .menu .list-h a:active {
|
719
|
+
opacity: 1;
|
720
|
+
-webkit-opacity: 1;
|
721
|
+
-moz-opacity: 1;
|
722
|
+
border-bottom: 2px solid var(--color-site-inner);
|
723
|
+
}
|
724
|
+
@font-face {
|
725
|
+
font-family: 'Dosis';
|
726
|
+
src: url("https://fastly.jsdelivr.net/gh/moieo/moieo@main/moieo.woff2");
|
727
|
+
font-weight: 'normal';
|
728
|
+
font-style: 'normal';
|
729
|
+
font-display: swap;
|
730
|
+
}
|
731
|
+
@font-face {
|
732
|
+
font-family: 'Sotheby';
|
733
|
+
src: url("https://nanaeo.cn/asset/Sotheby.ttf");
|
734
|
+
font-weight: 'normal';
|
735
|
+
font-style: 'normal';
|
736
|
+
font-display: swap;
|
737
|
+
}
|
738
|
+
.l_header {
|
739
|
+
position: fixed;
|
740
|
+
z-index: 1000;
|
741
|
+
top: 0;
|
742
|
+
width: 100%;
|
743
|
+
height: 64px;
|
744
|
+
background: var(--color-card);
|
745
|
+
box-shadow: 0 1px 2px 0px rgba(0,0,0,0.1);
|
746
|
+
-webkit-box-shadow: 0 1px 2px 0px rgba(0,0,0,0.1);
|
747
|
+
}
|
748
|
+
.l_header.auto {
|
749
|
+
transition: opacity 0.4s ease;
|
750
|
+
-webkit-transition: opacity 0.4s ease;
|
751
|
+
-khtml-transition: opacity 0.4s ease;
|
752
|
+
-moz-transition: opacity 0.4s ease;
|
753
|
+
-o-transition: opacity 0.4s ease;
|
754
|
+
-ms-transition: opacity 0.4s ease;
|
755
|
+
visibility: hidden;
|
756
|
+
}
|
757
|
+
.l_header.auto.show {
|
758
|
+
opacity: 1 !important;
|
759
|
+
-webkit-opacity: 1 !important;
|
760
|
+
-moz-opacity: 1 !important;
|
761
|
+
visibility: visible;
|
762
|
+
}
|
763
|
+
.l_header .container {
|
764
|
+
margin-left: 16px;
|
765
|
+
margin-right: 16px;
|
766
|
+
}
|
767
|
+
.l_header #wrapper {
|
768
|
+
height: 100%;
|
769
|
+
user-select: none;
|
770
|
+
-webkit-user-select: none;
|
771
|
+
-moz-user-select: none;
|
772
|
+
-ms-user-select: none;
|
773
|
+
}
|
774
|
+
.l_header #wrapper .nav-main,
|
775
|
+
.l_header #wrapper .nav-sub {
|
776
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
777
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
778
|
+
display: -ms-flexbox /* TWEENER - IE 10 */;
|
779
|
+
display: -webkit-flex /* NEW - Chrome */;
|
780
|
+
display: flex /* NEW, Spec - Opera 12.1, Firefox 20+ */;
|
781
|
+
display: flex;
|
782
|
+
flex-wrap: nowrap;
|
783
|
+
-webkit-flex-wrap: nowrap;
|
784
|
+
-khtml-flex-wrap: nowrap;
|
785
|
+
-moz-flex-wrap: nowrap;
|
786
|
+
-o-flex-wrap: nowrap;
|
787
|
+
-ms-flex-wrap: nowrap;
|
788
|
+
justify-content: space-between;
|
789
|
+
-webkit-justify-content: space-between;
|
790
|
+
-khtml-justify-content: space-between;
|
791
|
+
-moz-justify-content: space-between;
|
792
|
+
-o-justify-content: space-between;
|
793
|
+
-ms-justify-content: space-between;
|
794
|
+
align-items: center;
|
795
|
+
}
|
796
|
+
.l_header #wrapper .nav-main {
|
797
|
+
transition: all 0.28s ease;
|
798
|
+
-webkit-transition: all 0.28s ease;
|
799
|
+
-khtml-transition: all 0.28s ease;
|
800
|
+
-moz-transition: all 0.28s ease;
|
801
|
+
-o-transition: all 0.28s ease;
|
802
|
+
-ms-transition: all 0.28s ease;
|
803
|
+
}
|
804
|
+
.l_header #wrapper.sub .nav-main {
|
805
|
+
transform: translateY(-64px);
|
806
|
+
-webkit-transform: translateY(-64px);
|
807
|
+
-khtml-transform: translateY(-64px);
|
808
|
+
-moz-transform: translateY(-64px);
|
809
|
+
-o-transform: translateY(-64px);
|
810
|
+
-ms-transform: translateY(-64px);
|
811
|
+
}
|
812
|
+
.l_header #wrapper .nav-sub {
|
813
|
+
transition: all 0.28s ease;
|
814
|
+
-webkit-transition: all 0.28s ease;
|
815
|
+
-khtml-transition: all 0.28s ease;
|
816
|
+
-moz-transition: all 0.28s ease;
|
817
|
+
-o-transition: all 0.28s ease;
|
818
|
+
-ms-transition: all 0.28s ease;
|
819
|
+
opacity: 0;
|
820
|
+
-webkit-opacity: 0;
|
821
|
+
-moz-opacity: 0;
|
822
|
+
height: 64px;
|
823
|
+
width: calc(100% - 2 * 16px);
|
824
|
+
position: absolute;
|
825
|
+
}
|
826
|
+
.l_header #wrapper .nav-sub ::-webkit-scrollbar {
|
827
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
828
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
829
|
+
display: none;
|
830
|
+
}
|
831
|
+
@media screen and (min-width: 2048px) {
|
832
|
+
.l_header #wrapper .nav-sub {
|
833
|
+
max-width: 55vw;
|
834
|
+
margin: auto;
|
835
|
+
}
|
836
|
+
}
|
837
|
+
.l_header #wrapper.sub .nav-sub {
|
838
|
+
opacity: 1;
|
839
|
+
-webkit-opacity: 1;
|
840
|
+
-moz-opacity: 1;
|
841
|
+
}
|
842
|
+
.l_header #wrapper .title {
|
843
|
+
position: relative;
|
844
|
+
color: var(--color-text);
|
845
|
+
padding-left: 24px;
|
846
|
+
max-height: 64px;
|
847
|
+
}
|
848
|
+
.l_header #wrapper .nav-main .title {
|
849
|
+
white-space: nowrap;
|
850
|
+
overflow: hidden;
|
851
|
+
text-overflow: ellipsis;
|
852
|
+
flex-shrink: 0;
|
853
|
+
line-height: 64px;
|
854
|
+
padding: 0 24px;
|
855
|
+
font-size: 1.25rem;
|
856
|
+
font-family: Sotheby, Helvetica, monospace;
|
857
|
+
}
|
858
|
+
.l_header #wrapper .nav-main .title img {
|
859
|
+
height: 64px;
|
860
|
+
}
|
861
|
+
.l_header .nav-sub {
|
862
|
+
max-width: 1080px;
|
863
|
+
margin: auto;
|
864
|
+
}
|
865
|
+
.l_header .nav-sub .title {
|
866
|
+
font-weight: bold;
|
867
|
+
font-family: Dosis, "PingFang SC", "Microsoft YaHei", Helvetica, Arial, Menlo, Monaco, monospace, sans-serif;
|
868
|
+
line-height: 1.2;
|
869
|
+
max-height: 64px;
|
870
|
+
white-space: normal;
|
871
|
+
flex-shrink: 1;
|
872
|
+
}
|
873
|
+
.l_header .switcher {
|
874
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
875
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
876
|
+
display: none;
|
877
|
+
line-height: 64px;
|
878
|
+
align-items: center;
|
879
|
+
}
|
880
|
+
.l_header .switcher .s-toc {
|
881
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
882
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
883
|
+
display: none;
|
884
|
+
}
|
885
|
+
@media screen and (max-width: 768px) {
|
886
|
+
.l_header .switcher .s-toc {
|
887
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
888
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
889
|
+
display: -ms-flexbox /* TWEENER - IE 10 */;
|
890
|
+
display: -webkit-flex /* NEW - Chrome */;
|
891
|
+
display: flex /* NEW, Spec - Opera 12.1, Firefox 20+ */;
|
892
|
+
display: flex;
|
893
|
+
}
|
894
|
+
}
|
895
|
+
.l_header .switcher >li {
|
896
|
+
height: 48px;
|
897
|
+
transition: all 0.28s ease;
|
898
|
+
-webkit-transition: all 0.28s ease;
|
899
|
+
-khtml-transition: all 0.28s ease;
|
900
|
+
-moz-transition: all 0.28s ease;
|
901
|
+
-o-transition: all 0.28s ease;
|
902
|
+
-ms-transition: all 0.28s ease;
|
903
|
+
margin: 2px;
|
904
|
+
}
|
905
|
+
@media screen and (max-width: 500px) {
|
906
|
+
.l_header .switcher >li {
|
907
|
+
margin: 0 1px;
|
908
|
+
height: 48px;
|
909
|
+
}
|
910
|
+
}
|
911
|
+
.l_header .switcher >li >a {
|
912
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
913
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
914
|
+
display: -ms-flexbox /* TWEENER - IE 10 */;
|
915
|
+
display: -webkit-flex /* NEW - Chrome */;
|
916
|
+
display: flex /* NEW, Spec - Opera 12.1, Firefox 20+ */;
|
917
|
+
display: flex;
|
918
|
+
justify-content: center;
|
919
|
+
-webkit-justify-content: center;
|
920
|
+
-khtml-justify-content: center;
|
921
|
+
-moz-justify-content: center;
|
922
|
+
-o-justify-content: center;
|
923
|
+
-ms-justify-content: center;
|
924
|
+
align-items: center;
|
925
|
+
width: 48px;
|
926
|
+
height: 48px;
|
927
|
+
padding: 0.85em 1.1em;
|
928
|
+
border-radius: 100px;
|
929
|
+
-webkit-border-radius: 100px;
|
930
|
+
border: none;
|
931
|
+
transition: all 0.28s ease;
|
932
|
+
-webkit-transition: all 0.28s ease;
|
933
|
+
-khtml-transition: all 0.28s ease;
|
934
|
+
-moz-transition: all 0.28s ease;
|
935
|
+
-o-transition: all 0.28s ease;
|
936
|
+
-ms-transition: all 0.28s ease;
|
937
|
+
color: #fcc;
|
938
|
+
}
|
939
|
+
.l_header .switcher >li >a:hover {
|
940
|
+
border: none;
|
941
|
+
}
|
942
|
+
.l_header .switcher >li >a.active,
|
943
|
+
.l_header .switcher >li >a:active {
|
944
|
+
border: none;
|
945
|
+
background: var(--color-site-bg);
|
946
|
+
}
|
947
|
+
@media screen and (max-width: 500px) {
|
948
|
+
.l_header .switcher >li >a {
|
949
|
+
width: 36px;
|
950
|
+
height: 48px;
|
951
|
+
}
|
952
|
+
}
|
953
|
+
.l_header .nav-sub .switcher {
|
954
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
955
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
956
|
+
display: -ms-flexbox /* TWEENER - IE 10 */;
|
957
|
+
display: -webkit-flex /* NEW - Chrome */;
|
958
|
+
display: flex /* NEW, Spec - Opera 12.1, Firefox 20+ */;
|
959
|
+
display: flex;
|
960
|
+
}
|
961
|
+
.l_header .m_search {
|
962
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
963
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
964
|
+
display: -ms-flexbox /* TWEENER - IE 10 */;
|
965
|
+
display: -webkit-flex /* NEW - Chrome */;
|
966
|
+
display: flex /* NEW, Spec - Opera 12.1, Firefox 20+ */;
|
967
|
+
display: flex;
|
968
|
+
height: 64px;
|
969
|
+
width: 240px;
|
970
|
+
transition: all 0.28s ease;
|
971
|
+
-webkit-transition: all 0.28s ease;
|
972
|
+
-khtml-transition: all 0.28s ease;
|
973
|
+
-moz-transition: all 0.28s ease;
|
974
|
+
-o-transition: all 0.28s ease;
|
975
|
+
-ms-transition: all 0.28s ease;
|
976
|
+
}
|
977
|
+
@media screen and (max-width: 1024px) {
|
978
|
+
.l_header .m_search {
|
979
|
+
width: 44px;
|
980
|
+
min-width: 44px;
|
981
|
+
}
|
982
|
+
.l_header .m_search input::placeholder {
|
983
|
+
opacity: 0;
|
984
|
+
-webkit-opacity: 0;
|
985
|
+
-moz-opacity: 0;
|
986
|
+
}
|
987
|
+
.l_header .m_search:hover {
|
988
|
+
width: 240px;
|
989
|
+
}
|
990
|
+
.l_header .m_search:hover input::placeholder {
|
991
|
+
opacity: 1;
|
992
|
+
-webkit-opacity: 1;
|
993
|
+
-moz-opacity: 1;
|
994
|
+
}
|
995
|
+
}
|
996
|
+
@media screen and (min-width: 500px) {
|
997
|
+
.l_header .m_search:hover .input {
|
998
|
+
width: 100%;
|
999
|
+
}
|
1000
|
+
.l_header .m_search:hover .input::placeholder {
|
1001
|
+
opacity: 1;
|
1002
|
+
-webkit-opacity: 1;
|
1003
|
+
-moz-opacity: 1;
|
1004
|
+
}
|
1005
|
+
}
|
1006
|
+
@media screen and (max-width: 500px) {
|
1007
|
+
.l_header .m_search {
|
1008
|
+
min-width: 0;
|
1009
|
+
}
|
1010
|
+
.l_header .m_search input::placeholder {
|
1011
|
+
opacity: 1;
|
1012
|
+
-webkit-opacity: 1;
|
1013
|
+
-moz-opacity: 1;
|
1014
|
+
}
|
1015
|
+
}
|
1016
|
+
.l_header .m_search .form {
|
1017
|
+
position: relative;
|
1018
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
1019
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
1020
|
+
display: -ms-flexbox /* TWEENER - IE 10 */;
|
1021
|
+
display: -webkit-flex /* NEW - Chrome */;
|
1022
|
+
display: flex /* NEW, Spec - Opera 12.1, Firefox 20+ */;
|
1023
|
+
display: flex;
|
1024
|
+
width: 100%;
|
1025
|
+
align-items: center;
|
1026
|
+
}
|
1027
|
+
.l_header .m_search .icon {
|
1028
|
+
position: absolute;
|
1029
|
+
width: 36px;
|
1030
|
+
left: 5px;
|
1031
|
+
color: var(--color-meta);
|
1032
|
+
}
|
1033
|
+
@media screen and (max-width: 500px) {
|
1034
|
+
.l_header .m_search .icon {
|
1035
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
1036
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
1037
|
+
display: none;
|
1038
|
+
}
|
1039
|
+
}
|
1040
|
+
.l_header .m_search .input {
|
1041
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
1042
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
1043
|
+
display: block;
|
1044
|
+
padding-top: 8px;
|
1045
|
+
padding-bottom: 8px;
|
1046
|
+
line-height: 1.3;
|
1047
|
+
width: 100%;
|
1048
|
+
color: var(--color-text);
|
1049
|
+
background: #ffe6ee;
|
1050
|
+
box-shadow: none;
|
1051
|
+
-webkit-box-shadow: none;
|
1052
|
+
box-sizing: border-box;
|
1053
|
+
-webkit-box-sizing: border-box;
|
1054
|
+
-moz-box-sizing: border-box;
|
1055
|
+
padding-left: 40px;
|
1056
|
+
font-size: 0.875rem;
|
1057
|
+
border-radius: 8px;
|
1058
|
+
-webkit-border-radius: 8px;
|
1059
|
+
border: none;
|
1060
|
+
transition: all 0.28s ease;
|
1061
|
+
-webkit-transition: all 0.28s ease;
|
1062
|
+
-khtml-transition: all 0.28s ease;
|
1063
|
+
-moz-transition: all 0.28s ease;
|
1064
|
+
-o-transition: all 0.28s ease;
|
1065
|
+
-ms-transition: all 0.28s ease;
|
1066
|
+
}
|
1067
|
+
@media screen and (min-width: 500px) {
|
1068
|
+
.l_header .m_search .input:focus {
|
1069
|
+
box-shadow: 0 4px 8px 0px rgba(0,0,0,0.1);
|
1070
|
+
-webkit-box-shadow: 0 4px 8px 0px rgba(0,0,0,0.1);
|
1071
|
+
}
|
1072
|
+
}
|
1073
|
+
@media screen and (max-width: 500px) {
|
1074
|
+
.l_header .m_search .input {
|
1075
|
+
background: var(--color-block);
|
1076
|
+
padding-left: 8px;
|
1077
|
+
border: none;
|
1078
|
+
}
|
1079
|
+
.l_header .m_search .input:hover,
|
1080
|
+
.l_header .m_search .input:focus {
|
1081
|
+
border: none;
|
1082
|
+
}
|
1083
|
+
}
|
1084
|
+
@media (max-width: 500px) {
|
1085
|
+
.l_header .m_search {
|
1086
|
+
left: 0;
|
1087
|
+
width: 0;
|
1088
|
+
overflow: hidden;
|
1089
|
+
position: absolute;
|
1090
|
+
background: #fff;
|
1091
|
+
transition: all 0.28s ease;
|
1092
|
+
-webkit-transition: all 0.28s ease;
|
1093
|
+
-khtml-transition: all 0.28s ease;
|
1094
|
+
-moz-transition: all 0.28s ease;
|
1095
|
+
-o-transition: all 0.28s ease;
|
1096
|
+
-ms-transition: all 0.28s ease;
|
1097
|
+
}
|
1098
|
+
.l_header .m_search .input {
|
1099
|
+
border-radius: 32px;
|
1100
|
+
-webkit-border-radius: 32px;
|
1101
|
+
margin-left: 16px;
|
1102
|
+
padding-left: 16px;
|
1103
|
+
}
|
1104
|
+
.l_header.z_search-open .m_search {
|
1105
|
+
width: 100%;
|
1106
|
+
}
|
1107
|
+
.l_header.z_search-open .m_search .input {
|
1108
|
+
width: calc(100% - 120px);
|
1109
|
+
}
|
1110
|
+
}
|
1111
|
+
ul.m-pc >li>a {
|
1112
|
+
color: inherit;
|
1113
|
+
border-bottom: 2px solid transparent;
|
1114
|
+
}
|
1115
|
+
ul.m-pc >li>a:active,
|
1116
|
+
ul.m-pc >li>a.active {
|
1117
|
+
border-bottom: 2px solid #fcc;
|
1118
|
+
}
|
1119
|
+
ul.m-pc li:hover >ul.list-v,
|
1120
|
+
ul.list-v li:hover >ul.list-v {
|
1121
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
1122
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
1123
|
+
display: block;
|
1124
|
+
}
|
1125
|
+
ul.nav-list-h {
|
1126
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
1127
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
1128
|
+
display: -ms-flexbox /* TWEENER - IE 10 */;
|
1129
|
+
display: -webkit-flex /* NEW - Chrome */;
|
1130
|
+
display: flex /* NEW, Spec - Opera 12.1, Firefox 20+ */;
|
1131
|
+
display: flex;
|
1132
|
+
align-items: stretch;
|
1133
|
+
}
|
1134
|
+
ul.nav-list-h>li {
|
1135
|
+
position: relative;
|
1136
|
+
justify-content: center;
|
1137
|
+
-webkit-justify-content: center;
|
1138
|
+
-khtml-justify-content: center;
|
1139
|
+
-moz-justify-content: center;
|
1140
|
+
-o-justify-content: center;
|
1141
|
+
-ms-justify-content: center;
|
1142
|
+
height: 100%;
|
1143
|
+
line-height: 2.4;
|
1144
|
+
border-radius: 4px;
|
1145
|
+
-webkit-border-radius: 4px;
|
1146
|
+
}
|
1147
|
+
ul.nav-list-h>li >a {
|
1148
|
+
-webkit-font-smoothing: antialiased;
|
1149
|
+
-moz-osx-font-smoothing: grayscale;
|
1150
|
+
font-weight: 600;
|
1151
|
+
}
|
1152
|
+
ul.list-v {
|
1153
|
+
z-index: 1;
|
1154
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
1155
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
1156
|
+
display: none;
|
1157
|
+
position: absolute;
|
1158
|
+
background: var(--color-card);
|
1159
|
+
box-shadow: 0 2px 4px 0px rgba(0,0,0,0.08), 0 4px 8px 0px rgba(0,0,0,0.08), 0 8px 16px 0px rgba(0,0,0,0.08);
|
1160
|
+
-webkit-box-shadow: 0 2px 4px 0px rgba(0,0,0,0.08), 0 4px 8px 0px rgba(0,0,0,0.08), 0 8px 16px 0px rgba(0,0,0,0.08);
|
1161
|
+
margin-top: -6px;
|
1162
|
+
border-radius: 4px;
|
1163
|
+
-webkit-border-radius: 4px;
|
1164
|
+
padding: 8px 0;
|
1165
|
+
}
|
1166
|
+
ul.list-v.show {
|
1167
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
1168
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
1169
|
+
display: block;
|
1170
|
+
}
|
1171
|
+
ul.list-v hr {
|
1172
|
+
margin-top: 8px;
|
1173
|
+
margin-bottom: 8px;
|
1174
|
+
}
|
1175
|
+
ul.list-v >li {
|
1176
|
+
white-space: nowrap;
|
1177
|
+
word-break: keep-all;
|
1178
|
+
}
|
1179
|
+
ul.list-v >li.header {
|
1180
|
+
font-size: 0.78125rem;
|
1181
|
+
font-weight: bold;
|
1182
|
+
line-height: 2em;
|
1183
|
+
color: var(--color-meta);
|
1184
|
+
margin: 8px 16px 4px;
|
1185
|
+
}
|
1186
|
+
ul.list-v >li.header i {
|
1187
|
+
margin-right: 8px;
|
1188
|
+
}
|
1189
|
+
ul.list-v >li ul {
|
1190
|
+
margin-left: 0;
|
1191
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
1192
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
1193
|
+
display: none;
|
1194
|
+
margin-top: -40px;
|
1195
|
+
}
|
1196
|
+
ul.list-v .aplayer-container {
|
1197
|
+
min-height: 64px;
|
1198
|
+
padding: 6px 16px;
|
1199
|
+
}
|
1200
|
+
ul.list-v >li>a {
|
1201
|
+
transition: all 0.28s ease;
|
1202
|
+
-webkit-transition: all 0.28s ease;
|
1203
|
+
-khtml-transition: all 0.28s ease;
|
1204
|
+
-moz-transition: all 0.28s ease;
|
1205
|
+
-o-transition: all 0.28s ease;
|
1206
|
+
-ms-transition: all 0.28s ease;
|
1207
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
1208
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
1209
|
+
display: block;
|
1210
|
+
color: var(--color-list);
|
1211
|
+
font-size: 0.875rem;
|
1212
|
+
font-weight: bold;
|
1213
|
+
line-height: 36px;
|
1214
|
+
padding: 0 20px 0 16px;
|
1215
|
+
text-overflow: ellipsis;
|
1216
|
+
margin: 0 4px;
|
1217
|
+
border-radius: 4px;
|
1218
|
+
-webkit-border-radius: 4px;
|
1219
|
+
}
|
1220
|
+
@media screen and (max-width: 1024px) {
|
1221
|
+
ul.list-v >li>a {
|
1222
|
+
line-height: 40px;
|
1223
|
+
}
|
1224
|
+
}
|
1225
|
+
ul.list-v >li>a >i {
|
1226
|
+
margin-right: 8px;
|
1227
|
+
}
|
1228
|
+
ul.list-v >li>a:active,
|
1229
|
+
ul.list-v >li>a.active {
|
1230
|
+
color: var(--color-list-hl);
|
1231
|
+
}
|
1232
|
+
ul.list-v >li>a:hover {
|
1233
|
+
color: var(--color-list-hl);
|
1234
|
+
background: var(--color-site-bg);
|
1235
|
+
}
|
1236
|
+
.l_header .menu >ul>li>a {
|
1237
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
1238
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
1239
|
+
display: block;
|
1240
|
+
padding: 0 8px;
|
1241
|
+
}
|
1242
|
+
.l_header .menu >ul>li>a >i {
|
1243
|
+
margin-right: 4px;
|
1244
|
+
}
|
1245
|
+
.l_header ul.nav-list-h>li {
|
1246
|
+
color: var(--color-list);
|
1247
|
+
line-height: 64px;
|
1248
|
+
}
|
1249
|
+
.l_header ul.nav-list-h>li >a {
|
1250
|
+
max-height: 64px;
|
1251
|
+
overflow: hidden;
|
1252
|
+
color: inherit;
|
1253
|
+
}
|
1254
|
+
.l_header ul.nav-list-h>li >a:active,
|
1255
|
+
.l_header ul.nav-list-h>li >a.active {
|
1256
|
+
color: #fcc;
|
1257
|
+
}
|
1258
|
+
.l_header ul.nav-list-h>li:hover>a {
|
1259
|
+
color: var(--color-list-hl);
|
1260
|
+
}
|
1261
|
+
.l_header ul.nav-list-h>li i.music {
|
1262
|
+
animation: rotate-effect 1.5s linear infinite;
|
1263
|
+
-webkit-animation: rotate-effect 1.5s linear infinite;
|
1264
|
+
-khtml-animation: rotate-effect 1.5s linear infinite;
|
1265
|
+
-moz-animation: rotate-effect 1.5s linear infinite;
|
1266
|
+
-o-animation: rotate-effect 1.5s linear infinite;
|
1267
|
+
-ms-animation: rotate-effect 1.5s linear infinite;
|
1268
|
+
}
|
1269
|
+
@-moz-keyframes rotate-effect {
|
1270
|
+
0% {
|
1271
|
+
transform: rotate(0);
|
1272
|
+
-webkit-transform: rotate(0);
|
1273
|
+
-khtml-transform: rotate(0);
|
1274
|
+
-moz-transform: rotate(0);
|
1275
|
+
-o-transform: rotate(0);
|
1276
|
+
-ms-transform: rotate(0);
|
1277
|
+
}
|
1278
|
+
25% {
|
1279
|
+
transform: rotate(90deg);
|
1280
|
+
-webkit-transform: rotate(90deg);
|
1281
|
+
-khtml-transform: rotate(90deg);
|
1282
|
+
-moz-transform: rotate(90deg);
|
1283
|
+
-o-transform: rotate(90deg);
|
1284
|
+
-ms-transform: rotate(90deg);
|
1285
|
+
}
|
1286
|
+
50% {
|
1287
|
+
transform: rotate(180deg);
|
1288
|
+
-webkit-transform: rotate(180deg);
|
1289
|
+
-khtml-transform: rotate(180deg);
|
1290
|
+
-moz-transform: rotate(180deg);
|
1291
|
+
-o-transform: rotate(180deg);
|
1292
|
+
-ms-transform: rotate(180deg);
|
1293
|
+
}
|
1294
|
+
75% {
|
1295
|
+
transform: rotate(270deg);
|
1296
|
+
-webkit-transform: rotate(270deg);
|
1297
|
+
-khtml-transform: rotate(270deg);
|
1298
|
+
-moz-transform: rotate(270deg);
|
1299
|
+
-o-transform: rotate(270deg);
|
1300
|
+
-ms-transform: rotate(270deg);
|
1301
|
+
}
|
1302
|
+
100% {
|
1303
|
+
transform: rotate(360deg);
|
1304
|
+
-webkit-transform: rotate(360deg);
|
1305
|
+
-khtml-transform: rotate(360deg);
|
1306
|
+
-moz-transform: rotate(360deg);
|
1307
|
+
-o-transform: rotate(360deg);
|
1308
|
+
-ms-transform: rotate(360deg);
|
1309
|
+
}
|
1310
|
+
}
|
1311
|
+
@-webkit-keyframes rotate-effect {
|
1312
|
+
0% {
|
1313
|
+
transform: rotate(0);
|
1314
|
+
-webkit-transform: rotate(0);
|
1315
|
+
-khtml-transform: rotate(0);
|
1316
|
+
-moz-transform: rotate(0);
|
1317
|
+
-o-transform: rotate(0);
|
1318
|
+
-ms-transform: rotate(0);
|
1319
|
+
}
|
1320
|
+
25% {
|
1321
|
+
transform: rotate(90deg);
|
1322
|
+
-webkit-transform: rotate(90deg);
|
1323
|
+
-khtml-transform: rotate(90deg);
|
1324
|
+
-moz-transform: rotate(90deg);
|
1325
|
+
-o-transform: rotate(90deg);
|
1326
|
+
-ms-transform: rotate(90deg);
|
1327
|
+
}
|
1328
|
+
50% {
|
1329
|
+
transform: rotate(180deg);
|
1330
|
+
-webkit-transform: rotate(180deg);
|
1331
|
+
-khtml-transform: rotate(180deg);
|
1332
|
+
-moz-transform: rotate(180deg);
|
1333
|
+
-o-transform: rotate(180deg);
|
1334
|
+
-ms-transform: rotate(180deg);
|
1335
|
+
}
|
1336
|
+
75% {
|
1337
|
+
transform: rotate(270deg);
|
1338
|
+
-webkit-transform: rotate(270deg);
|
1339
|
+
-khtml-transform: rotate(270deg);
|
1340
|
+
-moz-transform: rotate(270deg);
|
1341
|
+
-o-transform: rotate(270deg);
|
1342
|
+
-ms-transform: rotate(270deg);
|
1343
|
+
}
|
1344
|
+
100% {
|
1345
|
+
transform: rotate(360deg);
|
1346
|
+
-webkit-transform: rotate(360deg);
|
1347
|
+
-khtml-transform: rotate(360deg);
|
1348
|
+
-moz-transform: rotate(360deg);
|
1349
|
+
-o-transform: rotate(360deg);
|
1350
|
+
-ms-transform: rotate(360deg);
|
1351
|
+
}
|
1352
|
+
}
|
1353
|
+
@-o-keyframes rotate-effect {
|
1354
|
+
0% {
|
1355
|
+
transform: rotate(0);
|
1356
|
+
-webkit-transform: rotate(0);
|
1357
|
+
-khtml-transform: rotate(0);
|
1358
|
+
-moz-transform: rotate(0);
|
1359
|
+
-o-transform: rotate(0);
|
1360
|
+
-ms-transform: rotate(0);
|
1361
|
+
}
|
1362
|
+
25% {
|
1363
|
+
transform: rotate(90deg);
|
1364
|
+
-webkit-transform: rotate(90deg);
|
1365
|
+
-khtml-transform: rotate(90deg);
|
1366
|
+
-moz-transform: rotate(90deg);
|
1367
|
+
-o-transform: rotate(90deg);
|
1368
|
+
-ms-transform: rotate(90deg);
|
1369
|
+
}
|
1370
|
+
50% {
|
1371
|
+
transform: rotate(180deg);
|
1372
|
+
-webkit-transform: rotate(180deg);
|
1373
|
+
-khtml-transform: rotate(180deg);
|
1374
|
+
-moz-transform: rotate(180deg);
|
1375
|
+
-o-transform: rotate(180deg);
|
1376
|
+
-ms-transform: rotate(180deg);
|
1377
|
+
}
|
1378
|
+
75% {
|
1379
|
+
transform: rotate(270deg);
|
1380
|
+
-webkit-transform: rotate(270deg);
|
1381
|
+
-khtml-transform: rotate(270deg);
|
1382
|
+
-moz-transform: rotate(270deg);
|
1383
|
+
-o-transform: rotate(270deg);
|
1384
|
+
-ms-transform: rotate(270deg);
|
1385
|
+
}
|
1386
|
+
100% {
|
1387
|
+
transform: rotate(360deg);
|
1388
|
+
-webkit-transform: rotate(360deg);
|
1389
|
+
-khtml-transform: rotate(360deg);
|
1390
|
+
-moz-transform: rotate(360deg);
|
1391
|
+
-o-transform: rotate(360deg);
|
1392
|
+
-ms-transform: rotate(360deg);
|
1393
|
+
}
|
1394
|
+
}
|
1395
|
+
@keyframes rotate-effect {
|
1396
|
+
0% {
|
1397
|
+
transform: rotate(0);
|
1398
|
+
-webkit-transform: rotate(0);
|
1399
|
+
-khtml-transform: rotate(0);
|
1400
|
+
-moz-transform: rotate(0);
|
1401
|
+
-o-transform: rotate(0);
|
1402
|
+
-ms-transform: rotate(0);
|
1403
|
+
}
|
1404
|
+
25% {
|
1405
|
+
transform: rotate(90deg);
|
1406
|
+
-webkit-transform: rotate(90deg);
|
1407
|
+
-khtml-transform: rotate(90deg);
|
1408
|
+
-moz-transform: rotate(90deg);
|
1409
|
+
-o-transform: rotate(90deg);
|
1410
|
+
-ms-transform: rotate(90deg);
|
1411
|
+
}
|
1412
|
+
50% {
|
1413
|
+
transform: rotate(180deg);
|
1414
|
+
-webkit-transform: rotate(180deg);
|
1415
|
+
-khtml-transform: rotate(180deg);
|
1416
|
+
-moz-transform: rotate(180deg);
|
1417
|
+
-o-transform: rotate(180deg);
|
1418
|
+
-ms-transform: rotate(180deg);
|
1419
|
+
}
|
1420
|
+
75% {
|
1421
|
+
transform: rotate(270deg);
|
1422
|
+
-webkit-transform: rotate(270deg);
|
1423
|
+
-khtml-transform: rotate(270deg);
|
1424
|
+
-moz-transform: rotate(270deg);
|
1425
|
+
-o-transform: rotate(270deg);
|
1426
|
+
-ms-transform: rotate(270deg);
|
1427
|
+
}
|
1428
|
+
100% {
|
1429
|
+
transform: rotate(360deg);
|
1430
|
+
-webkit-transform: rotate(360deg);
|
1431
|
+
-khtml-transform: rotate(360deg);
|
1432
|
+
-moz-transform: rotate(360deg);
|
1433
|
+
-o-transform: rotate(360deg);
|
1434
|
+
-ms-transform: rotate(360deg);
|
1435
|
+
}
|
1436
|
+
}
|
1437
|
+
.menu-phone li ul.list-v {
|
1438
|
+
right: calc(100% - 0.5 * 16px);
|
1439
|
+
}
|
1440
|
+
.menu-phone li ul.list-v ul {
|
1441
|
+
right: calc(100% - 0.5 * 16px);
|
1442
|
+
}
|
1443
|
+
#wrapper {
|
1444
|
+
max-width: 1080px;
|
1445
|
+
margin: auto;
|
1446
|
+
}
|
1447
|
+
@media screen and (min-width: 2048px) {
|
1448
|
+
#wrapper {
|
1449
|
+
max-width: 55vw;
|
1450
|
+
}
|
1451
|
+
}
|
1452
|
+
#wrapper .menu {
|
1453
|
+
-webkit-box-flex: 1;
|
1454
|
+
-moz-box-flex: 1;
|
1455
|
+
-webkit-flex: 1 1;
|
1456
|
+
-ms-flex: 1 1;
|
1457
|
+
flex: 1 1;
|
1458
|
+
margin: 0 16px 0 0;
|
1459
|
+
}
|
1460
|
+
#wrapper .menu .list-v ul {
|
1461
|
+
left: calc(100% - 0.5 * 16px);
|
1462
|
+
}
|
1463
|
+
.menu-phone {
|
1464
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
1465
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
1466
|
+
display: none;
|
1467
|
+
margin-top: 16px;
|
1468
|
+
right: 8px;
|
1469
|
+
transition: all 0.28s ease;
|
1470
|
+
-webkit-transition: all 0.28s ease;
|
1471
|
+
-khtml-transition: all 0.28s ease;
|
1472
|
+
-moz-transition: all 0.28s ease;
|
1473
|
+
-o-transition: all 0.28s ease;
|
1474
|
+
-ms-transition: all 0.28s ease;
|
1475
|
+
}
|
1476
|
+
.menu-phone ul {
|
1477
|
+
right: calc(100% - 0.5 * 16px);
|
1478
|
+
}
|
1479
|
+
@media screen and (max-width: 500px) {
|
1480
|
+
.menu-phone {
|
1481
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
1482
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
1483
|
+
display: block;
|
1484
|
+
}
|
1485
|
+
}
|
1486
|
+
.l_header {
|
1487
|
+
max-width: 65vw;
|
1488
|
+
left: calc((100% - 65vw) * 0.5);
|
1489
|
+
border-bottom-left-radius: 8px;
|
1490
|
+
border-bottom-right-radius: 8px;
|
1491
|
+
}
|
1492
|
+
@media screen and (max-width: 2048px) {
|
1493
|
+
.l_header {
|
1494
|
+
max-width: 1112px;
|
1495
|
+
left: calc((100% - 1112px) * 0.5);
|
1496
|
+
}
|
1497
|
+
}
|
1498
|
+
@media screen and (max-width: 1112px) {
|
1499
|
+
.l_header {
|
1500
|
+
left: 0;
|
1501
|
+
border-radius: 0;
|
1502
|
+
-webkit-border-radius: 0;
|
1503
|
+
max-width: 100%;
|
1504
|
+
}
|
1505
|
+
}
|
1506
|
+
@media screen and (max-width: 500px) {
|
1507
|
+
.l_header .container {
|
1508
|
+
margin-left: 0;
|
1509
|
+
margin-right: 0;
|
1510
|
+
}
|
1511
|
+
.l_header #wrapper .nav-main .title {
|
1512
|
+
padding-left: 16px;
|
1513
|
+
padding-right: 16px;
|
1514
|
+
}
|
1515
|
+
.l_header #wrapper .nav-sub {
|
1516
|
+
width: 100%;
|
1517
|
+
}
|
1518
|
+
.l_header #wrapper .nav-sub .title {
|
1519
|
+
overflow-y: scroll;
|
1520
|
+
margin-top: 2px;
|
1521
|
+
padding: 8px 16px;
|
1522
|
+
}
|
1523
|
+
.l_header #wrapper .switcher {
|
1524
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
1525
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
1526
|
+
display: -ms-flexbox /* TWEENER - IE 10 */;
|
1527
|
+
display: -webkit-flex /* NEW - Chrome */;
|
1528
|
+
display: flex /* NEW, Spec - Opera 12.1, Firefox 20+ */;
|
1529
|
+
display: flex;
|
1530
|
+
margin-right: 8px;
|
1531
|
+
}
|
1532
|
+
.l_header .menu {
|
1533
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
1534
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
1535
|
+
display: none;
|
1536
|
+
}
|
1537
|
+
}
|
1538
|
+
@media screen and (max-width: 500px) {
|
1539
|
+
.list-v li {
|
1540
|
+
max-width: 270px;
|
1541
|
+
}
|
1542
|
+
}
|
1543
|
+
#u-search {
|
1544
|
+
display: -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */;
|
1545
|
+
display: -moz-box /* OLD - Firefox 19- (buggy but mostly works) */;
|
1546
|
+
display: none;
|
1547
|
+
position: fixed;
|
1548
|
+
top: 0;
|
1549
|
+
left: 0;
|
1550
|
+
width: 100%;
|
1551
|
+
height: 100%;
|
1552
|
+
padding: 60px 20px;
|
1553
|
+
z-index: 1001;
|
1554
|
+
}
|
1555
|
+
@media screen and (max-width: 680px) {
|
1556
|
+
#u-search {
|
1557
|
+
padding: 0px;
|
1558
|
+
}
|
1559
|
+
}
|
1560
|
+
|
1561
|
+
</style>
|
1562
|
+
<link rel="stylesheet" href="/css/style.css" media="print" onload="this.media='all';this.onload=null">
|
1563
|
+
<noscript><link rel="stylesheet" href="/css/style.css"></noscript>
|
1564
|
+
|
1565
|
+
<script>
|
1566
|
+
if (/*@cc_on!@*/false || (!!window.MSInputMethodContext && !!document.documentMode))
|
1567
|
+
document.write(
|
1568
|
+
'<style>'+
|
1569
|
+
'html{'+
|
1570
|
+
'overflow-x: hidden !important;'+
|
1571
|
+
'overflow-y: hidden !important;'+
|
1572
|
+
'}'+
|
1573
|
+
'.kill-ie{'+
|
1574
|
+
'text-align:center;'+
|
1575
|
+
'height: 100%;'+
|
1576
|
+
'margin-top: 15%;'+
|
1577
|
+
'margin-bottom: 5500%;'+
|
1578
|
+
'}'+
|
1579
|
+
'.kill-t{'+
|
1580
|
+
'font-size: 2rem;'+
|
1581
|
+
'}'+
|
1582
|
+
'.kill-c{'+
|
1583
|
+
'font-size: 1.2rem;'+
|
1584
|
+
'}'+
|
1585
|
+
'#l_header,#l_body{'+
|
1586
|
+
'display: none;'+
|
1587
|
+
'}'+
|
1588
|
+
'</style>'+
|
1589
|
+
'<div class="kill-ie">'+
|
1590
|
+
`<span class="kill-t"><b>抱歉,您的浏览器无法访问本站</b></span><br/>`+
|
1591
|
+
`<span class="kill-c">微软已经于2016年终止了对 Internet Explorer (IE) 10 及更早版本的支持,<br/>继续使用存在极大的安全隐患,请使用当代主流的浏览器进行访问。</span><br/>`+
|
1592
|
+
`<a target="_blank" rel="noopener" href="https://blogs.windows.com/windowsexperience/2021/05/19/the-future-of-internet-explorer-on-windows-10-is-in-microsoft-edge/"><strong>了解详情 ></strong></a>`+
|
1593
|
+
'</div>');
|
1594
|
+
</script>
|
1595
|
+
|
1596
|
+
|
1597
|
+
<noscript>
|
1598
|
+
<style>
|
1599
|
+
html{
|
1600
|
+
overflow-x: hidden !important;
|
1601
|
+
overflow-y: hidden !important;
|
1602
|
+
}
|
1603
|
+
.kill-noscript{
|
1604
|
+
text-align:center;
|
1605
|
+
height: 100%;
|
1606
|
+
margin-top: 15%;
|
1607
|
+
margin-bottom: 5500%;
|
1608
|
+
}
|
1609
|
+
.kill-t{
|
1610
|
+
font-size: 2rem;
|
1611
|
+
}
|
1612
|
+
.kill-c{
|
1613
|
+
font-size: 1.2rem;
|
1614
|
+
}
|
1615
|
+
#l_header,#l_body{
|
1616
|
+
display: none;
|
1617
|
+
}
|
1618
|
+
</style>
|
1619
|
+
<div class="kill-noscript">
|
1620
|
+
<span class="kill-t"><b>抱歉,您的浏览器无法访问本站</b></span><br/>
|
1621
|
+
<span class="kill-c">本页面需要浏览器支持(启用)JavaScript</span><br/>
|
1622
|
+
<a target="_blank" rel="noopener" href="https://www.baidu.com/s?wd=启用JavaScript"><strong>了解详情 ></strong></a>
|
1623
|
+
</div>
|
1624
|
+
</noscript>
|
1625
|
+
|
1626
|
+
|
1627
|
+
<script>
|
1628
|
+
/************这个文件存放不需要重载的全局变量和全局函数*********/
|
1629
|
+
window.volantis = {}; // volantis 全局变量
|
1630
|
+
volantis.debug = "env"; // 调试模式
|
1631
|
+
volantis.dom = {}; // 页面Dom see: /source/js/app.js etc.
|
1632
|
+
|
1633
|
+
volantis.GLOBAL_CONFIG ={
|
1634
|
+
debug: "env",
|
1635
|
+
cdn: {"js":{"app":"/js/app.js","parallax":"/js/plugins/parallax.js","rightMenu":"/js/plugins/rightMenu.js","rightMenus":"/js/plugins/rightMenus.js","sites":"/js/plugins/tags/sites.js","friends":"/js/plugins/tags/friends.js","contributors":"/js/plugins/tags/contributors.js","search":"/js/search/hexo.js"},"css":{"style":"/css/style.css"}},
|
1636
|
+
default: {"avatar":"https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/avatar/round/3442075.svg","link":"https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/link/8f277b4ee0ecd.svg","cover":"https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/cover/76b86c0226ffd.svg","image":"https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/image/2659360.svg"},
|
1637
|
+
lastupdate: new Date(1702967652388),
|
1638
|
+
sidebar: {
|
1639
|
+
for_page: ["blogger","category","webinfo"],
|
1640
|
+
for_post: ["toc"],
|
1641
|
+
webinfo: {
|
1642
|
+
lastupd: {
|
1643
|
+
enable: true,
|
1644
|
+
friendlyShow: true
|
1645
|
+
},
|
1646
|
+
runtime: {
|
1647
|
+
data: "2022/08/05",
|
1648
|
+
unit: "天"
|
1649
|
+
}
|
1650
|
+
}
|
1651
|
+
},
|
1652
|
+
plugins: {
|
1653
|
+
message: {"enable":true,"css":"https://fastly.jsdelivr.net/npm/volantis-static/libs/izitoast/dist/css/iziToast.min.css","js":"https://fastly.jsdelivr.net/npm/volantis-static/libs/izitoast/dist/js/iziToast.min.js","icon":{"default":"fa-solid fa-info-circle light-blue","quection":"fa-solid fa-question-circle light-blue"},"time":{"default":5000,"quection":20000},"position":"topRight","transitionIn":"bounceInLeft","transitionOut":"fadeOutRight","titleColor":"var(--color-text)","messageColor":"var(--color-text)","backgroundColor":"var(--color-card)","zindex":2147483647,"copyright":{"enable":true,"title":"知识共享许可协议","message":"请遵守 CC BY-NC-SA 4.0 协议。","icon":"far fa-copyright light-blue"},"aplayer":{"enable":true,"play":"fa-solid fa-play","pause":"fa-solid fa-pause"},"rightmenu":{"enable":true,"notice":true}},
|
1654
|
+
fancybox: {"css":"https://fastly.jsdelivr.net/npm/volantis-static/libs/@fancyapps/ui/dist/fancybox.css","js":"https://fastly.jsdelivr.net/npm/volantis-static/libs/@fancyapps/ui/dist/fancybox.umd.js"},
|
1655
|
+
|
1656
|
+
|
1657
|
+
|
1658
|
+
}
|
1659
|
+
}
|
1660
|
+
|
1661
|
+
/******************** volantis.EventListener ********************************/
|
1662
|
+
// 事件监听器 see: /source/js/app.js
|
1663
|
+
volantis.EventListener = {}
|
1664
|
+
// 这里存放pjax切换页面时将被移除的事件监听器
|
1665
|
+
volantis.EventListener.list = []
|
1666
|
+
//构造方法
|
1667
|
+
function volantisEventListener(type, f, ele) {
|
1668
|
+
this.type = type
|
1669
|
+
this.f = f
|
1670
|
+
this.ele = ele
|
1671
|
+
}
|
1672
|
+
// 移除事件监听器
|
1673
|
+
volantis.EventListener.remove = () => {
|
1674
|
+
volantis.EventListener.list.forEach(function (i) {
|
1675
|
+
i.ele.removeEventListener(i.type, i.f, false)
|
1676
|
+
})
|
1677
|
+
volantis.EventListener.list = []
|
1678
|
+
}
|
1679
|
+
/******************** volantis.dom.$ ********************************/
|
1680
|
+
// 注:这里没有选择器,也没有forEach一次只处理一个dom,这里重新封装主题常用的dom方法,返回的是dom对象,对象包含了以下方法,同时保留dom的原生API
|
1681
|
+
function volantisDom(ele) {
|
1682
|
+
if (!ele) ele = document.createElement("div")
|
1683
|
+
this.ele = ele;
|
1684
|
+
// ==============================================================
|
1685
|
+
this.ele.find = (c) => {
|
1686
|
+
let q = this.ele.querySelector(c)
|
1687
|
+
if (q)
|
1688
|
+
return new volantisDom(q)
|
1689
|
+
}
|
1690
|
+
// ==============================================================
|
1691
|
+
this.ele.hasClass = (c) => {
|
1692
|
+
return this.ele.className.match(new RegExp('(\\s|^)' + c + '(\\s|$)'));
|
1693
|
+
}
|
1694
|
+
this.ele.addClass = (c) => {
|
1695
|
+
this.ele.classList.add(c);
|
1696
|
+
return this.ele
|
1697
|
+
}
|
1698
|
+
this.ele.removeClass = (c) => {
|
1699
|
+
this.ele.classList.remove(c);
|
1700
|
+
return this.ele
|
1701
|
+
}
|
1702
|
+
this.ele.toggleClass = (c) => {
|
1703
|
+
if (this.ele.hasClass(c)) {
|
1704
|
+
this.ele.removeClass(c)
|
1705
|
+
} else {
|
1706
|
+
this.ele.addClass(c)
|
1707
|
+
}
|
1708
|
+
return this.ele
|
1709
|
+
}
|
1710
|
+
// ==============================================================
|
1711
|
+
// 参数 r 为 true 表示pjax切换页面时事件监听器将被移除,false不移除
|
1712
|
+
this.ele.on = (c, f, r = 1) => {
|
1713
|
+
this.ele.addEventListener(c, f, false)
|
1714
|
+
if (r) {
|
1715
|
+
volantis.EventListener.list.push(new volantisEventListener(c, f, this.ele))
|
1716
|
+
}
|
1717
|
+
return this.ele
|
1718
|
+
}
|
1719
|
+
this.ele.click = (f, r) => {
|
1720
|
+
this.ele.on("click", f, r)
|
1721
|
+
return this.ele
|
1722
|
+
}
|
1723
|
+
this.ele.scroll = (f, r) => {
|
1724
|
+
this.ele.on("scroll", f, r)
|
1725
|
+
return this.ele
|
1726
|
+
}
|
1727
|
+
// ==============================================================
|
1728
|
+
this.ele.html = (c) => {
|
1729
|
+
// if(c=== undefined){
|
1730
|
+
// return this.ele.innerHTML
|
1731
|
+
// }else{
|
1732
|
+
this.ele.innerHTML = c
|
1733
|
+
return this.ele
|
1734
|
+
// }
|
1735
|
+
}
|
1736
|
+
// ==============================================================
|
1737
|
+
this.ele.hide = (c) => {
|
1738
|
+
this.ele.style.display = "none"
|
1739
|
+
return this.ele
|
1740
|
+
}
|
1741
|
+
this.ele.show = (c) => {
|
1742
|
+
this.ele.style.display = "block"
|
1743
|
+
return this.ele
|
1744
|
+
}
|
1745
|
+
// ==============================================================
|
1746
|
+
return this.ele
|
1747
|
+
}
|
1748
|
+
volantis.dom.$ = (ele) => {
|
1749
|
+
return !!ele ? new volantisDom(ele) : null;
|
1750
|
+
}
|
1751
|
+
/******************** RunItem ********************************/
|
1752
|
+
function RunItem() {
|
1753
|
+
this.list = []; // 存放回调函数
|
1754
|
+
this.start = () => {
|
1755
|
+
for (var i = 0; i < this.list.length; i++) {
|
1756
|
+
this.list[i].run();
|
1757
|
+
}
|
1758
|
+
};
|
1759
|
+
this.push = (fn, name, setRequestAnimationFrame = true) => {
|
1760
|
+
let myfn = fn
|
1761
|
+
if (setRequestAnimationFrame) {
|
1762
|
+
myfn = ()=>{
|
1763
|
+
volantis.requestAnimationFrame(fn)
|
1764
|
+
}
|
1765
|
+
}
|
1766
|
+
var f = new Item(myfn, name);
|
1767
|
+
this.list.push(f);
|
1768
|
+
};
|
1769
|
+
this.remove = (name) =>{
|
1770
|
+
for (let index = 0; index < this.list.length; index++) {
|
1771
|
+
const e = this.list[index];
|
1772
|
+
if (e.name == name) {
|
1773
|
+
this.list.splice(index,1);
|
1774
|
+
}
|
1775
|
+
}
|
1776
|
+
}
|
1777
|
+
// 构造一个可以run的对象
|
1778
|
+
function Item(fn, name) {
|
1779
|
+
// 函数名称
|
1780
|
+
this.name = name || fn.name;
|
1781
|
+
// run方法
|
1782
|
+
this.run = () => {
|
1783
|
+
try {
|
1784
|
+
fn()
|
1785
|
+
} catch (error) {
|
1786
|
+
console.log(error);
|
1787
|
+
}
|
1788
|
+
};
|
1789
|
+
}
|
1790
|
+
}
|
1791
|
+
/******************** Pjax ********************************/
|
1792
|
+
// /layout/_plugins/pjax/index.ejs
|
1793
|
+
// volantis.pjax.send(callBack[,"callBackName"]) 传入pjax:send回调函数
|
1794
|
+
// volantis.pjax.push(callBack[,"callBackName"]) 传入pjax:complete回调函数
|
1795
|
+
// volantis.pjax.error(callBack[,"callBackName"]) 传入pjax:error回调函数
|
1796
|
+
volantis.pjax = {};
|
1797
|
+
volantis.pjax.method = {
|
1798
|
+
complete: new RunItem(),
|
1799
|
+
error: new RunItem(),
|
1800
|
+
send: new RunItem(),
|
1801
|
+
};
|
1802
|
+
volantis.pjax = Object.assign(volantis.pjax, {
|
1803
|
+
push: volantis.pjax.method.complete.push,
|
1804
|
+
error: volantis.pjax.method.error.push,
|
1805
|
+
send: volantis.pjax.method.send.push,
|
1806
|
+
});
|
1807
|
+
/******************** RightMenu ********************************/
|
1808
|
+
// volantis.rightmenu.handle(callBack[,"callBackName"]) 外部菜单项控制
|
1809
|
+
// 可在 volantis.mouseEvent 处获取右键事件
|
1810
|
+
volantis.rightmenu = {};
|
1811
|
+
volantis.rightmenu.method = {
|
1812
|
+
handle: new RunItem(),
|
1813
|
+
}
|
1814
|
+
volantis.rightmenu = Object.assign(volantis.rightmenu, {
|
1815
|
+
handle: volantis.rightmenu.method.handle.push,
|
1816
|
+
});
|
1817
|
+
/******************** Dark Mode ********************************/
|
1818
|
+
// /layout/_partial/scripts/darkmode.ejs
|
1819
|
+
// volantis.dark.mode 当前模式 dark or light
|
1820
|
+
// volantis.dark.toggle() 暗黑模式触发器
|
1821
|
+
// volantis.dark.push(callBack[,"callBackName"]) 传入触发器回调函数
|
1822
|
+
volantis.dark = {};
|
1823
|
+
volantis.dark.method = {
|
1824
|
+
toggle: new RunItem(),
|
1825
|
+
};
|
1826
|
+
volantis.dark = Object.assign(volantis.dark, {
|
1827
|
+
push: volantis.dark.method.toggle.push,
|
1828
|
+
});
|
1829
|
+
/******************** Message ********************************/
|
1830
|
+
// VolantisApp.message
|
1831
|
+
/******************** isMobile ********************************/
|
1832
|
+
// /source/js/app.js
|
1833
|
+
// volantis.isMobile
|
1834
|
+
// volantis.isMobileOld
|
1835
|
+
/********************脚本动态加载函数********************************/
|
1836
|
+
// volantis.js(src, cb) cb 可以传入onload回调函数 或者 JSON对象 例如: volantis.js("src", ()=>{}) 或 volantis.js("src", {defer:true,onload:()=>{}})
|
1837
|
+
// volantis.css(src)
|
1838
|
+
|
1839
|
+
// 返回Promise对象,如下方法同步加载资源,这利于处理文件资源之间的依赖关系,例如:APlayer 需要在 MetingJS 之前加载
|
1840
|
+
// (async () => {
|
1841
|
+
// await volantis.js("...theme.plugins.aplayer.js.aplayer...")
|
1842
|
+
// await volantis.js("...theme.plugins.aplayer.js.meting...")
|
1843
|
+
// })();
|
1844
|
+
|
1845
|
+
// 已经加入了setTimeout
|
1846
|
+
volantis.js = (src, cb) => {
|
1847
|
+
return new Promise(resolve => {
|
1848
|
+
setTimeout(function () {
|
1849
|
+
var HEAD = document.getElementsByTagName("head")[0] || document.documentElement;
|
1850
|
+
var script = document.createElement("script");
|
1851
|
+
script.setAttribute("type", "text/javascript");
|
1852
|
+
if (cb) {
|
1853
|
+
if (JSON.stringify(cb)) {
|
1854
|
+
for (let p in cb) {
|
1855
|
+
if (p == "onload") {
|
1856
|
+
script[p] = () => {
|
1857
|
+
cb[p]()
|
1858
|
+
resolve()
|
1859
|
+
}
|
1860
|
+
} else {
|
1861
|
+
script[p] = cb[p]
|
1862
|
+
script.onload = resolve
|
1863
|
+
}
|
1864
|
+
}
|
1865
|
+
} else {
|
1866
|
+
script.onload = () => {
|
1867
|
+
cb()
|
1868
|
+
resolve()
|
1869
|
+
};
|
1870
|
+
}
|
1871
|
+
} else {
|
1872
|
+
script.onload = resolve
|
1873
|
+
}
|
1874
|
+
script.setAttribute("src", src);
|
1875
|
+
HEAD.appendChild(script);
|
1876
|
+
});
|
1877
|
+
});
|
1878
|
+
}
|
1879
|
+
volantis.css = (src) => {
|
1880
|
+
return new Promise(resolve => {
|
1881
|
+
setTimeout(function () {
|
1882
|
+
var link = document.createElement('link');
|
1883
|
+
link.rel = "stylesheet";
|
1884
|
+
link.href = src;
|
1885
|
+
link.onload = resolve;
|
1886
|
+
document.getElementsByTagName("head")[0].appendChild(link);
|
1887
|
+
});
|
1888
|
+
});
|
1889
|
+
}
|
1890
|
+
/********************按需加载的插件********************************/
|
1891
|
+
// volantis.import.jQuery().then(()=>{})
|
1892
|
+
volantis.import = {
|
1893
|
+
jQuery: () => {
|
1894
|
+
if (typeof jQuery == "undefined") {
|
1895
|
+
return volantis.js("https://fastly.jsdelivr.net/npm/volantis-static/libs/jquery/dist/jquery.min.js")
|
1896
|
+
} else {
|
1897
|
+
return new Promise(resolve => {
|
1898
|
+
resolve()
|
1899
|
+
});
|
1900
|
+
}
|
1901
|
+
}
|
1902
|
+
}
|
1903
|
+
/********************** requestAnimationFrame ********************************/
|
1904
|
+
// 1、requestAnimationFrame 会把每一帧中的所有 DOM 操作集中起来,在一次重绘或回流中就完成,并且重绘或回流的时间间隔紧紧跟随浏览器的刷新频率,一般来说,这个频率为每秒60帧。
|
1905
|
+
// 2、在隐藏或不可见的元素中,requestAnimationFrame 将不会进行重绘或回流,这当然就意味着更少的的 cpu,gpu 和内存使用量。
|
1906
|
+
volantis.requestAnimationFrame = (fn)=>{
|
1907
|
+
if (!window.requestAnimationFrame) {
|
1908
|
+
window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame;
|
1909
|
+
}
|
1910
|
+
window.requestAnimationFrame(fn)
|
1911
|
+
}
|
1912
|
+
/************************ layoutHelper *****************************************/
|
1913
|
+
volantis.layoutHelper = (helper, html, opt)=>{
|
1914
|
+
opt = Object.assign({clean:false, pjax:true}, opt)
|
1915
|
+
function myhelper(helper, html, clean) {
|
1916
|
+
volantis.tempDiv = document.createElement("div");
|
1917
|
+
volantis.tempDiv.innerHTML = html;
|
1918
|
+
let layoutHelper = document.querySelector("#layoutHelper-"+helper)
|
1919
|
+
if (layoutHelper) {
|
1920
|
+
if (clean) {
|
1921
|
+
layoutHelper.innerHTML = ""
|
1922
|
+
}
|
1923
|
+
layoutHelper.append(volantis.tempDiv);
|
1924
|
+
}
|
1925
|
+
}
|
1926
|
+
myhelper(helper, html, opt.clean)
|
1927
|
+
if (opt.pjax) {
|
1928
|
+
volantis.pjax.push(()=>{
|
1929
|
+
myhelper(helper, html, opt.clean)
|
1930
|
+
},"layoutHelper-"+helper)
|
1931
|
+
}
|
1932
|
+
}
|
1933
|
+
/****************************** 滚动事件处理 ****************************************/
|
1934
|
+
volantis.scroll = {
|
1935
|
+
engine: new RunItem(),
|
1936
|
+
unengine: new RunItem(),
|
1937
|
+
};
|
1938
|
+
volantis.scroll = Object.assign(volantis.scroll, {
|
1939
|
+
push: volantis.scroll.engine.push,
|
1940
|
+
});
|
1941
|
+
// 滚动条距离顶部的距离
|
1942
|
+
volantis.scroll.getScrollTop = () =>{
|
1943
|
+
let scrollPos;
|
1944
|
+
if (window.pageYOffset) {
|
1945
|
+
scrollPos = window.pageYOffset;
|
1946
|
+
} else if (document.compatMode && document.compatMode != 'BackCompat') {
|
1947
|
+
scrollPos = document.documentElement.scrollTop;
|
1948
|
+
} else if (document.body) {
|
1949
|
+
scrollPos = document.body.scrollTop;
|
1950
|
+
}
|
1951
|
+
return scrollPos;
|
1952
|
+
}
|
1953
|
+
// 使用 requestAnimationFrame 处理滚动事件
|
1954
|
+
// `volantis.scroll.del` 中存储了一个数值, 该数值检测一定时间间隔内滚动条滚动的位移, 数值的检测频率是浏览器的刷新频率. 数值为正数时, 表示向下滚动. 数值为负数时, 表示向上滚动.
|
1955
|
+
volantis.scroll.handleScrollEvents = () => {
|
1956
|
+
volantis.scroll.lastScrollTop = volantis.scroll.getScrollTop()
|
1957
|
+
function loop() {
|
1958
|
+
const scrollTop = volantis.scroll.getScrollTop();
|
1959
|
+
if (volantis.scroll.lastScrollTop !== scrollTop) {
|
1960
|
+
volantis.scroll.del = scrollTop - volantis.scroll.lastScrollTop;
|
1961
|
+
volantis.scroll.lastScrollTop = scrollTop;
|
1962
|
+
// if (volantis.scroll.del > 0) {
|
1963
|
+
// console.log("向下滚动");
|
1964
|
+
// } else {
|
1965
|
+
// console.log("向上滚动");
|
1966
|
+
// }
|
1967
|
+
// 注销过期的unengine未滚动事件
|
1968
|
+
volantis.scroll.unengine.list=[]
|
1969
|
+
volantis.scroll.engine.start();
|
1970
|
+
}else{
|
1971
|
+
volantis.scroll.unengine.start();
|
1972
|
+
}
|
1973
|
+
volantis.requestAnimationFrame(loop)
|
1974
|
+
}
|
1975
|
+
volantis.requestAnimationFrame(loop)
|
1976
|
+
}
|
1977
|
+
volantis.scroll.handleScrollEvents()
|
1978
|
+
volantis.scroll.ele = null;
|
1979
|
+
// 触发页面滚动至目标元素位置
|
1980
|
+
volantis.scroll.to = (ele, option = {}) => {
|
1981
|
+
if (!ele) return;
|
1982
|
+
volantis.scroll.ele = ele;
|
1983
|
+
// 默认配置
|
1984
|
+
opt = {
|
1985
|
+
top: ele.getBoundingClientRect().top + document.documentElement.scrollTop,
|
1986
|
+
behavior: "smooth"
|
1987
|
+
}
|
1988
|
+
// 定义配置
|
1989
|
+
if ("top" in option) {
|
1990
|
+
opt.top = option.top
|
1991
|
+
}
|
1992
|
+
if ("behavior" in option) {
|
1993
|
+
opt.behavior = option.behavior
|
1994
|
+
}
|
1995
|
+
if ("addTop" in option) {
|
1996
|
+
opt.top += option.addTop
|
1997
|
+
}
|
1998
|
+
if (!("observerDic" in option)) {
|
1999
|
+
option.observerDic = 100
|
2000
|
+
}
|
2001
|
+
// 滚动
|
2002
|
+
window.scrollTo(opt);
|
2003
|
+
// 监视器
|
2004
|
+
// 监视并矫正元素滚动到指定位置
|
2005
|
+
// 用于处理 lazyload 引起的 cls 导致的定位失败问题
|
2006
|
+
// option.observer = false
|
2007
|
+
if (option.observer) {
|
2008
|
+
setTimeout(() => {
|
2009
|
+
if (volantis.scroll.ele != ele) {
|
2010
|
+
return
|
2011
|
+
}
|
2012
|
+
volantis.scroll.unengine.push(() => {
|
2013
|
+
let me = ele.getBoundingClientRect().top
|
2014
|
+
if(!(me >= -option.observerDic && me <= option.observerDic)){
|
2015
|
+
volantis.scroll.to(ele, option)
|
2016
|
+
}
|
2017
|
+
volantis.scroll.unengine.remove("unengineObserver")
|
2018
|
+
},"unengineObserver")
|
2019
|
+
},1000)
|
2020
|
+
}
|
2021
|
+
}
|
2022
|
+
/********************** Content Visibility ********************************/
|
2023
|
+
// 见 source/css/first.styl 如果遇到任何问题 删除 .post-story 即可
|
2024
|
+
// 一个元素被声明 content-visibility 属性后 如果元素不在 viewport 中 浏览器不会计算其后代元素样式和属性 从而节省 Style & Layout 耗时
|
2025
|
+
// content-visibility 的副作用: 锚点失效 等等(实验初期 暂不明确), 使用此方法清除样式
|
2026
|
+
volantis.cleanContentVisibility = ()=>{
|
2027
|
+
if (document.querySelector(".post-story")) {
|
2028
|
+
console.log("cleanContentVisibility");
|
2029
|
+
document.querySelectorAll(".post-story").forEach(e=>{
|
2030
|
+
e.classList.remove("post-story")
|
2031
|
+
})
|
2032
|
+
}
|
2033
|
+
}
|
2034
|
+
/******************************************************************************/
|
2035
|
+
/******************************************************************************/
|
2036
|
+
/******************************************************************************/
|
2037
|
+
//图像加载出错时的处理
|
2038
|
+
function errorImgAvatar(img) {
|
2039
|
+
img.src = "https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/avatar/round/3442075.svg";
|
2040
|
+
img.onerror = null;
|
2041
|
+
}
|
2042
|
+
function errorImgCover(img) {
|
2043
|
+
img.src = "https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/cover/76b86c0226ffd.svg";
|
2044
|
+
img.onerror = null;
|
2045
|
+
}
|
2046
|
+
/******************************************************************************/
|
2047
|
+
</script>
|
2048
|
+
|
2049
|
+
<!-- import head_end begin -->
|
2050
|
+
<!-- import head_end end -->
|
2051
|
+
<!-- Custom Files headEnd begin-->
|
2052
|
+
|
2053
|
+
<!-- Custom Files headEnd end-->
|
2054
|
+
<!-- front-matter head_end begin -->
|
2055
|
+
<!-- front-matter head_end end -->
|
2056
|
+
</head>
|
2057
|
+
<body itemscope itemtype="http://schema.org/WebPage">
|
2058
|
+
<!-- import body_begin begin-->
|
2059
|
+
<!-- import body_begin end-->
|
2060
|
+
<!-- Custom Files bodyBegin begin-->
|
2061
|
+
|
2062
|
+
<!-- Custom Files bodyBegin end-->
|
2063
|
+
<!-- front-matter body_begin begin -->
|
2064
|
+
<!-- front-matter body_begin end -->
|
2065
|
+
<header itemscope itemtype="http://schema.org/WPHeader" id="l_header" class="l_header auto shadow floatable blur " style='opacity: 0' >
|
2066
|
+
<div class='container'>
|
2067
|
+
<div id='wrapper'>
|
2068
|
+
<div class='nav-sub'>
|
2069
|
+
<p class="title"></p>
|
2070
|
+
<ul class='switcher nav-list-h m-phone' id="pjax-header-nav-list">
|
2071
|
+
<li><a id="s-comment" class="fa-solid fa-comments fa-fw" target="_self" href="/" onclick="return false;" title="comment"></a></li>
|
2072
|
+
|
2073
|
+
<li><a id="s-toc" class="s-toc fa-solid fa-list fa-fw" target="_self" href="/" onclick="return false;" title="toc"></a></li>
|
2074
|
+
|
2075
|
+
</ul>
|
2076
|
+
</div>
|
2077
|
+
<div class="nav-main">
|
2078
|
+
|
2079
|
+
|
2080
|
+
<a class="title flat-box" target="_self" href='/'>
|
2081
|
+
|
2082
|
+
|
2083
|
+
|
2084
|
+
Mlikiowa
|
2085
|
+
|
2086
|
+
</a>
|
2087
|
+
|
2088
|
+
|
2089
|
+
<div class='menu navigation'>
|
2090
|
+
<ul class='nav-list-h m-pc'>
|
2091
|
+
|
2092
|
+
|
2093
|
+
|
2094
|
+
|
2095
|
+
|
2096
|
+
<li>
|
2097
|
+
<a class="menuitem flat-box faa-parent animated-hover"
|
2098
|
+
href="/" title="博客"
|
2099
|
+
|
2100
|
+
|
2101
|
+
|
2102
|
+
active-action="action-home"
|
2103
|
+
>
|
2104
|
+
<i class='fa-solid fa-rss fa-fw'></i>博客
|
2105
|
+
</a>
|
2106
|
+
|
2107
|
+
</li>
|
2108
|
+
|
2109
|
+
|
2110
|
+
|
2111
|
+
|
2112
|
+
|
2113
|
+
<li>
|
2114
|
+
<a class="menuitem flat-box faa-parent animated-hover"
|
2115
|
+
href="/categories/" title="分类"
|
2116
|
+
|
2117
|
+
|
2118
|
+
|
2119
|
+
active-action="action-categories"
|
2120
|
+
>
|
2121
|
+
<i class='fa-solid fa-folder-open fa-fw'></i>分类
|
2122
|
+
</a>
|
2123
|
+
|
2124
|
+
</li>
|
2125
|
+
|
2126
|
+
|
2127
|
+
|
2128
|
+
|
2129
|
+
|
2130
|
+
<li>
|
2131
|
+
<a class="menuitem flat-box faa-parent animated-hover"
|
2132
|
+
href="/tags/" title="标签"
|
2133
|
+
|
2134
|
+
|
2135
|
+
|
2136
|
+
active-action="action-tags"
|
2137
|
+
>
|
2138
|
+
<i class='fa-solid fa-tags fa-fw'></i>标签
|
2139
|
+
</a>
|
2140
|
+
|
2141
|
+
</li>
|
2142
|
+
|
2143
|
+
|
2144
|
+
|
2145
|
+
|
2146
|
+
|
2147
|
+
<li>
|
2148
|
+
<a class="menuitem flat-box faa-parent animated-hover"
|
2149
|
+
href="/archives/" title="归档"
|
2150
|
+
|
2151
|
+
|
2152
|
+
|
2153
|
+
active-action="action-archives"
|
2154
|
+
>
|
2155
|
+
<i class='fa-solid fa-archive fa-fw'></i>归档
|
2156
|
+
</a>
|
2157
|
+
|
2158
|
+
</li>
|
2159
|
+
|
2160
|
+
|
2161
|
+
|
2162
|
+
|
2163
|
+
|
2164
|
+
<li>
|
2165
|
+
<a class="menuitem flat-box faa-parent animated-hover"
|
2166
|
+
href="/friends/" title="友链"
|
2167
|
+
|
2168
|
+
|
2169
|
+
|
2170
|
+
active-action="action-friends"
|
2171
|
+
>
|
2172
|
+
<i class='fa-solid fa-link fa-fw'></i>友链
|
2173
|
+
</a>
|
2174
|
+
|
2175
|
+
</li>
|
2176
|
+
|
2177
|
+
|
2178
|
+
|
2179
|
+
|
2180
|
+
|
2181
|
+
<li>
|
2182
|
+
<a class="menuitem flat-box faa-parent animated-hover"
|
2183
|
+
href="/about/" title="关于"
|
2184
|
+
|
2185
|
+
|
2186
|
+
|
2187
|
+
active-action="action-about"
|
2188
|
+
>
|
2189
|
+
<i class='fa-solid fa-info-circle fa-fw'></i>关于
|
2190
|
+
</a>
|
2191
|
+
|
2192
|
+
</li>
|
2193
|
+
|
2194
|
+
|
2195
|
+
|
2196
|
+
</ul>
|
2197
|
+
</div>
|
2198
|
+
|
2199
|
+
<div class="m_search">
|
2200
|
+
<form name="searchform" class="form u-search-form">
|
2201
|
+
<i class="icon fa-solid fa-search fa-fw"></i>
|
2202
|
+
<input type="text" class="input u-search-input" placeholder="Search..." />
|
2203
|
+
</form>
|
2204
|
+
</div>
|
2205
|
+
|
2206
|
+
|
2207
|
+
<ul class='switcher nav-list-h m-phone'>
|
2208
|
+
|
2209
|
+
<li><a class="s-search fa-solid fa-search fa-fw" target="_self" href="/" onclick="return false;" title="search"></a></li>
|
2210
|
+
|
2211
|
+
<li>
|
2212
|
+
<a class="s-menu fa-solid fa-bars fa-fw" target="_self" href="/" onclick="return false;" title="menu"></a>
|
2213
|
+
<ul class="menu-phone list-v navigation white-box">
|
2214
|
+
|
2215
|
+
|
2216
|
+
|
2217
|
+
<li>
|
2218
|
+
<a class="menuitem flat-box faa-parent animated-hover"
|
2219
|
+
href="/" title="博客"
|
2220
|
+
|
2221
|
+
|
2222
|
+
|
2223
|
+
active-action="action-home"
|
2224
|
+
>
|
2225
|
+
<i class='fa-solid fa-rss fa-fw'></i>博客
|
2226
|
+
</a>
|
2227
|
+
|
2228
|
+
</li>
|
2229
|
+
|
2230
|
+
|
2231
|
+
|
2232
|
+
|
2233
|
+
|
2234
|
+
<li>
|
2235
|
+
<a class="menuitem flat-box faa-parent animated-hover"
|
2236
|
+
href="/categories/" title="分类"
|
2237
|
+
|
2238
|
+
|
2239
|
+
|
2240
|
+
active-action="action-categories"
|
2241
|
+
>
|
2242
|
+
<i class='fa-solid fa-folder-open fa-fw'></i>分类
|
2243
|
+
</a>
|
2244
|
+
|
2245
|
+
</li>
|
2246
|
+
|
2247
|
+
|
2248
|
+
|
2249
|
+
|
2250
|
+
|
2251
|
+
<li>
|
2252
|
+
<a class="menuitem flat-box faa-parent animated-hover"
|
2253
|
+
href="/tags/" title="标签"
|
2254
|
+
|
2255
|
+
|
2256
|
+
|
2257
|
+
active-action="action-tags"
|
2258
|
+
>
|
2259
|
+
<i class='fa-solid fa-tags fa-fw'></i>标签
|
2260
|
+
</a>
|
2261
|
+
|
2262
|
+
</li>
|
2263
|
+
|
2264
|
+
|
2265
|
+
|
2266
|
+
|
2267
|
+
|
2268
|
+
<li>
|
2269
|
+
<a class="menuitem flat-box faa-parent animated-hover"
|
2270
|
+
href="/archives/" title="归档"
|
2271
|
+
|
2272
|
+
|
2273
|
+
|
2274
|
+
active-action="action-archives"
|
2275
|
+
>
|
2276
|
+
<i class='fa-solid fa-archive fa-fw'></i>归档
|
2277
|
+
</a>
|
2278
|
+
|
2279
|
+
</li>
|
2280
|
+
|
2281
|
+
|
2282
|
+
|
2283
|
+
|
2284
|
+
|
2285
|
+
<li>
|
2286
|
+
<a class="menuitem flat-box faa-parent animated-hover"
|
2287
|
+
href="/friends/" title="友链"
|
2288
|
+
|
2289
|
+
|
2290
|
+
|
2291
|
+
active-action="action-friends"
|
2292
|
+
>
|
2293
|
+
<i class='fa-solid fa-link fa-fw'></i>友链
|
2294
|
+
</a>
|
2295
|
+
|
2296
|
+
</li>
|
2297
|
+
|
2298
|
+
|
2299
|
+
|
2300
|
+
|
2301
|
+
|
2302
|
+
<li>
|
2303
|
+
<a class="menuitem flat-box faa-parent animated-hover"
|
2304
|
+
href="/about/" title="关于"
|
2305
|
+
|
2306
|
+
|
2307
|
+
|
2308
|
+
active-action="action-about"
|
2309
|
+
>
|
2310
|
+
<i class='fa-solid fa-info-circle fa-fw'></i>关于
|
2311
|
+
</a>
|
2312
|
+
|
2313
|
+
</li>
|
2314
|
+
|
2315
|
+
|
2316
|
+
|
2317
|
+
</ul>
|
2318
|
+
</li>
|
2319
|
+
</ul>
|
2320
|
+
|
2321
|
+
<!-- Custom Files header begin -->
|
2322
|
+
|
2323
|
+
<!-- Custom Files header end -->
|
2324
|
+
</div>
|
2325
|
+
</div>
|
2326
|
+
</div>
|
2327
|
+
</header>
|
2328
|
+
|
2329
|
+
<div id="l_body">
|
2330
|
+
<div id="l_cover">
|
2331
|
+
|
2332
|
+
|
2333
|
+
<!-- see: /layout/_partial/scripts/_ctrl/coverCtrl.ejs -->
|
2334
|
+
<div id="half" class='cover-wrapper post search' style="display: ;">
|
2335
|
+
|
2336
|
+
<div class='cover-bg lazyload placeholder' data-bg="https://picst.sunbangyan.cn/2023/12/19/e1a85b7ffee8beef520ef52df5c296da.jpeg"></div>
|
2337
|
+
|
2338
|
+
<div class='cover-body'>
|
2339
|
+
<div class='top'>
|
2340
|
+
|
2341
|
+
|
2342
|
+
<p class="title">Mlikiowa Home Village</p>
|
2343
|
+
|
2344
|
+
|
2345
|
+
</div>
|
2346
|
+
<div class='bottom'>
|
2347
|
+
|
2348
|
+
<div class="m_search">
|
2349
|
+
<form name="searchform" class="form u-search-form">
|
2350
|
+
<input type="text" class="input u-search-input" placeholder="A Wonderful Theme for Hexo" />
|
2351
|
+
<i class="icon fa-solid fa-search fa-fw"></i>
|
2352
|
+
</form>
|
2353
|
+
</div>
|
2354
|
+
|
2355
|
+
<div class='menu navigation'>
|
2356
|
+
<div class='list-h'>
|
2357
|
+
|
2358
|
+
|
2359
|
+
<a href="/"
|
2360
|
+
|
2361
|
+
|
2362
|
+
active-action="action-home">
|
2363
|
+
<p>博客</p>
|
2364
|
+
</a>
|
2365
|
+
|
2366
|
+
<a href="/categories/"
|
2367
|
+
|
2368
|
+
|
2369
|
+
target="_self"
|
2370
|
+
|
2371
|
+
active-action="action-categories">
|
2372
|
+
<p>分类</p>
|
2373
|
+
</a>
|
2374
|
+
|
2375
|
+
<a href="/tags/"
|
2376
|
+
|
2377
|
+
|
2378
|
+
active-action="action-tags">
|
2379
|
+
<p>标签</p>
|
2380
|
+
</a>
|
2381
|
+
|
2382
|
+
<a href="/archives/"
|
2383
|
+
|
2384
|
+
|
2385
|
+
active-action="action-archives">
|
2386
|
+
<p>归档</p>
|
2387
|
+
</a>
|
2388
|
+
|
2389
|
+
<a href="/friends/"
|
2390
|
+
|
2391
|
+
|
2392
|
+
active-action="action-friends">
|
2393
|
+
<p>友链</p>
|
2394
|
+
</a>
|
2395
|
+
|
2396
|
+
<a href="/about/"
|
2397
|
+
|
2398
|
+
|
2399
|
+
active-action="action-about">
|
2400
|
+
<p>关于</p>
|
2401
|
+
</a>
|
2402
|
+
|
2403
|
+
|
2404
|
+
</div>
|
2405
|
+
</div>
|
2406
|
+
</div>
|
2407
|
+
</div>
|
2408
|
+
|
2409
|
+
<div id="scroll-down" style="display: none;"><i class="fa fa-chevron-down scroll-down-effects"></i></div>
|
2410
|
+
</div>
|
2411
|
+
|
2412
|
+
|
2413
|
+
</div>
|
2414
|
+
|
2415
|
+
<div id="safearea">
|
2416
|
+
<div class="body-wrapper">
|
2417
|
+
|
2418
|
+
<div id="l_main" class=''>
|
2419
|
+
<article itemscope itemtype="http://schema.org/Article" class="article post white-box reveal md shadow floatable blur article-type-post" id="post" itemscope itemprop="blogPost">
|
2420
|
+
<link itemprop="mainEntityOfPage" href="https://nanaeo.cn/2022/08/13/GaussWave/">
|
2421
|
+
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
|
2422
|
+
<meta itemprop="name" content="Village">
|
2423
|
+
</span>
|
2424
|
+
<span hidden itemprop="post" itemscope itemtype="http://schema.org/Post">
|
2425
|
+
<meta itemprop="name" content="Village">
|
2426
|
+
<meta itemprop="description" content="It is a little blog~">
|
2427
|
+
</span>
|
2428
|
+
|
2429
|
+
|
2430
|
+
|
2431
|
+
|
2432
|
+
<span hidden>
|
2433
|
+
<meta itemprop="image" content="https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png">
|
2434
|
+
</span>
|
2435
|
+
|
2436
|
+
<div class="article-meta" id="top">
|
2437
|
+
|
2438
|
+
|
2439
|
+
|
2440
|
+
<h1 class="title" itemprop="name headline">
|
2441
|
+
高斯滤波
|
2442
|
+
</h1>
|
2443
|
+
<div class='new-meta-box'>
|
2444
|
+
|
2445
|
+
|
2446
|
+
|
2447
|
+
<div class='new-meta-item author' itemprop="author" itemscope itemtype="http://schema.org/Person">
|
2448
|
+
<a itemprop="url" class='author' href="/" rel="nofollow">
|
2449
|
+
<img itemprop="image" src="https://q1.qlogo.cn/g?b=qq&nk=1627126029&s=100" class="lazyload" data-srcset="https://q1.qlogo.cn/g?b=qq&nk=1627126029&s=100" srcset="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==">
|
2450
|
+
<p itemprop="name">Mlikiowa</p>
|
2451
|
+
</a>
|
2452
|
+
</div>
|
2453
|
+
|
2454
|
+
|
2455
|
+
|
2456
|
+
|
2457
|
+
|
2458
|
+
<div class='new-meta-item category'>
|
2459
|
+
<i class="fas fa-folder-open fa-fw" aria-hidden="true"></i>
|
2460
|
+
<a class="category-link" href="/categories/DevLog/">DevLog</a>
|
2461
|
+
|
2462
|
+
<span hidden itemprop="about" itemscope itemtype="http://schema.org/Thing">
|
2463
|
+
<a href="/categories/DevLog/" itemprop="url"><span itemprop="name">DevLog</span></a>
|
2464
|
+
</span>
|
2465
|
+
|
2466
|
+
</div>
|
2467
|
+
|
2468
|
+
|
2469
|
+
|
2470
|
+
|
2471
|
+
|
2472
|
+
<div class="new-meta-item date" itemprop="dateCreated datePublished" datetime="2022-08-13T16:00:00+00:00">
|
2473
|
+
<a class='notlink'>
|
2474
|
+
<i class="fas fa-calendar-alt fa-fw" aria-hidden="true"></i>
|
2475
|
+
<p>发布于:2022年8月14日</p>
|
2476
|
+
</a>
|
2477
|
+
</div>
|
2478
|
+
|
2479
|
+
|
2480
|
+
|
2481
|
+
|
2482
|
+
|
2483
|
+
<div class="new-meta-item wordcount">
|
2484
|
+
<a class='notlink'>
|
2485
|
+
<i class="fas fa-keyboard fa-fw" aria-hidden="true"></i>
|
2486
|
+
<p>字数:2k 字</p>
|
2487
|
+
</a>
|
2488
|
+
</div>
|
2489
|
+
<div class="new-meta-item readtime">
|
2490
|
+
<a class='notlink'>
|
2491
|
+
<i class="fas fa-hourglass-half fa-fw" aria-hidden="true"></i>
|
2492
|
+
<p>时长:7 分钟</p>
|
2493
|
+
</a>
|
2494
|
+
</div>
|
2495
|
+
|
2496
|
+
|
2497
|
+
|
2498
|
+
|
2499
|
+
<!-- Custom Files topMeta begin-->
|
2500
|
+
|
2501
|
+
<!-- Custom Files topMeta end-->
|
2502
|
+
</div>
|
2503
|
+
|
2504
|
+
</div>
|
2505
|
+
|
2506
|
+
|
2507
|
+
<div id="layoutHelper-page-plugins"></div>
|
2508
|
+
<div id="post-body" itemprop="articleBody">
|
2509
|
+
<p>高斯滤波的实现</p>
|
2510
|
+
<span id="more"></span>
|
2511
|
+
|
2512
|
+
<div class="story post-story"><h2 id="本文提示"><a href="#本文提示" class="headerlink" title="本文提示"></a>本文提示</h2><p>本文提供了相关代码和算法仅为示例学习,并非标准案例,并且OpenCV提供了高斯滤波函数,如果遇到不明白的概念和地方可以参考引用文章理解,也可以尝试在搜索引擎上搜索相关概念和图片示例,由于本站资源原因,暂不提供图片。</p>
|
2513
|
+
<p>tips: 本文为了方便仅是灰度图片处理<br>如果需要彩色图片应该尝试修改代码三种通道进行分别处理或其它方法。</p>
|
2514
|
+
</div><div class="story post-story"><h2 id="概念理解-部分来自百科等"><a href="#概念理解-部分来自百科等" class="headerlink" title="概念理解(部分来自百科等)"></a>概念理解(部分来自百科等)</h2><h3 id="滤波"><a href="#滤波" class="headerlink" title="滤波"></a>滤波</h3><p>滤波就对图像像素点及其邻域点的灰度值按照一定的参数规则进行加权平均,可以有效滤去理想图像中叠加的高频噪声。常用的滤波有线性滤波、中值滤波、均值滤波、双边滤波、高斯滤波等。滤波有抑制噪声的作用,但这会使得图像边缘模糊。(摘自别的地方)</p>
|
2515
|
+
<h3 id="低通滤波"><a href="#低通滤波" class="headerlink" title="低通滤波"></a>低通滤波</h3><p>低通滤波是一种过滤方式,规则为低频信号能正常通过,而超过设定临界值的高频信号则被阻隔、减弱,图像处理领域可用来模糊。</p>
|
2516
|
+
<h3 id="高通滤波"><a href="#高通滤波" class="headerlink" title="高通滤波"></a>高通滤波</h3><p>高通滤波(high-pass filter) 是一种过滤方式,规则为高频信号能正常通过,而低于设定临界值的低频信号则被阻隔、减弱。但是阻隔、减弱的幅度则会依据不同的频率以及不同的滤波程序(目的)而改变,图像处理领域可用于锐化。</p>
|
2517
|
+
<h3 id="高斯滤波"><a href="#高斯滤波" class="headerlink" title="高斯滤波"></a>高斯滤波</h3><p>高斯滤波是一种线性平滑滤波,适用于消除高斯噪声,广泛应用于图像处理的减噪过程,对处理呈现正态分布(高斯分布)的噪声(包括图像噪声)效果显著。<br>tips: 常用高斯模糊就是使用高斯滤波完成的, 高斯模糊是低通滤波的一种, 也就是滤波函数是低通高斯函数, 但是高斯滤波是指用高斯函数作为滤波函数, 至于是不是模糊,要看是高斯低通还是高斯高通, 低通就是模糊, 高通就是锐化。</p>
|
2518
|
+
<h3 id="核算子、模板、结构都是一种"><a href="#核算子、模板、结构都是一种" class="headerlink" title="核算子、模板、结构都是一种"></a>核算子、模板、结构都是一种</h3><p>当我们进行图像处理时时,使用到的权用一个矩阵表示,可以利用该矩阵计算对应像素,同时我们叫这个矩阵为核算子、模板、结构。(示例见前提指明)<br>大小可小可大,并且一般为奇数,<br>Que:核大小为什么是都是类似3×3/5×5 奇数呢?<br>其中一个原因是定位中心锚点,偶数是无法确定中心点的。</p>
|
2519
|
+
<h3 id="滤波核"><a href="#滤波核" class="headerlink" title="滤波核"></a>滤波核</h3><p>当进行滤波时,里面是核的内容是权重并且可以用于处理像素,那么该核称为滤波核。<br>(通俗解释 专业解释 请查询资料)</p>
|
2520
|
+
<h3 id="归一化"><a href="#归一化" class="headerlink" title="归一化"></a>归一化</h3><p>就是生成核或者说模板加起来的权不为一,这时候我们核内每一个值除以核内总值,就实现了归一化。</p>
|
2521
|
+
<h3 id="卷积核"><a href="#卷积核" class="headerlink" title="卷积核"></a>卷积核</h3><p>如果一个核被用于卷积那么该核也可以被称为卷积核。(通俗解释 专业解释 请查询资料)</p>
|
2522
|
+
<h3 id="高斯核"><a href="#高斯核" class="headerlink" title="高斯核"></a>高斯核</h3><p>那么高斯核固然就是高斯分布生成的核了</p>
|
2523
|
+
</div><div class="story post-story"><h2 id="环境与依赖"><a href="#环境与依赖" class="headerlink" title="环境与依赖"></a>环境与依赖</h2><p>Python 本次使用的编程语言<br>OpenCV 跨平台计算机视觉库<br>Windows11 本文中代码运行系统</p>
|
2524
|
+
<h3 id="OpenCv库安装"><a href="#OpenCv库安装" class="headerlink" title="OpenCv库安装"></a>OpenCv库安装</h3><p>(清华源 可自行切换)</p>
|
2525
|
+
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python</span><br><span class="line">pip install opencv-contrib-python -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python</span><br></pre></td></tr></table></figure>
|
2526
|
+
</div><div class="story post-story"><h2 id="举例"><a href="#举例" class="headerlink" title="举例"></a>举例</h2><p>最终滤波核示例 (提示:权请保证和为1 此处已经归一化 但并非真实情况)<br>0.1 0.1 0.2<br>0.1 0.1 0.1<br>0.1 0.1 0.1</p>
|
2527
|
+
<p>为3×3网格坐标结构<br>该模板大小 3×3</p>
|
2528
|
+
</div><div class="story post-story"><h2 id="算法过程"><a href="#算法过程" class="headerlink" title="算法过程"></a>算法过程</h2><h3 id="高斯滤波实现方法"><a href="#高斯滤波实现方法" class="headerlink" title="高斯滤波实现方法"></a>高斯滤波实现方法</h3><p>看完以上相信各位并没有很多理解,并不要紧,联系实际我们进一步进行<br>高斯滤波通常情况下有两种实现方式,一是用离散化窗口滑窗卷积, 另一种通过傅里叶变换,其中第一种毕竟常见,可能这时候有人又问了,这又是什么,别急,咱先慢慢来,离散化窗口滑窗卷积其实就是进行有限次的移动核运算区域的卷积运算,那么我们可以开始了。</p>
|
2529
|
+
<h3 id="算法过程-1"><a href="#算法过程-1" class="headerlink" title="算法过程"></a>算法过程</h3><p>0.图像灰度处理 (为了方便)</p>
|
2530
|
+
<ol>
|
2531
|
+
<li>生成滤波核</li>
|
2532
|
+
<li>进行卷积处理图像</li>
|
2533
|
+
</ol>
|
2534
|
+
<h3 id="生成滤波核"><a href="#生成滤波核" class="headerlink" title="生成滤波核"></a>生成滤波核</h3><p><img src="https://s2.loli.net/2022/08/14/4dgAQ2RCInSM8m6.gif" class="lazyload" data-srcset="https://s2.loli.net/2022/08/14/4dgAQ2RCInSM8m6.gif" srcset="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="CodeCogsEqn.gif"><br>(此处为一维高斯函数)</p>
|
2535
|
+
<p>sigma 为标准差 图像平滑程度取决于该值<br>我们使用高斯函数进行生成对应滤波核<br>离中心点越远那么边缘值的权值越小,我们依照高斯二维函数就可以生成对应滤波核。<br>代码具体参考如下</p>
|
2536
|
+
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">def GaussKernel(size,k,sigma):</span><br><span class="line"> _t = np.zeros((size,size),np.float32)</span><br><span class="line"> for i in range (size):</span><br><span class="line"> for j in range (size):</span><br><span class="line"> norm = math.pow(i-k,2) + pow(j-k,2)</span><br><span class="line"> _t[i,j] = math.exp(-norm/(2*math.pow(sigma,2)))/2*math.pi*pow(sigma,2)</span><br><span class="line"> sum = np.sum(_t)</span><br><span class="line"> kernel = _t/sum</span><br><span class="line"> return kernel</span><br></pre></td></tr></table></figure>
|
2537
|
+
<h3 id="卷积生成"><a href="#卷积生成" class="headerlink" title="卷积生成"></a>卷积生成</h3><p>然后我们使用对应的滤波权值进行乘以像素值,就可以生成新值,但是滤波核仅3×3大小,我们在原图像每一个像素点运算一次,即可生成新的图形。<br>运算为: 每个像素点周围点 权×值 的和为中心点新值。</p>
|
2538
|
+
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">def mygaussFilter(img_gray,kernel):</span><br><span class="line"> h,w = img_gray.shape</span><br><span class="line"> k_h,k_w = kernel.shape</span><br><span class="line"> for i in range(int(k_h/2),h-int(k_h/2)):</span><br><span class="line"> for j in range(int(k_h/2),w-int(k_h/2)):</span><br><span class="line"> sum = 0</span><br><span class="line"> for k in range(0,k_h):</span><br><span class="line"> for l in range(0,k_h):</span><br><span class="line"> sum += img_gray[i-int(k_h/2)+k,j-int(k_h/2)+l]*kernel[k,l]</span><br><span class="line"> img_gray[i,j] = sum</span><br><span class="line"> return img_gray</span><br></pre></td></tr></table></figure>
|
2539
|
+
</div><div class="story post-story"><h2 id="样例代码"><a href="#样例代码" class="headerlink" title="样例代码"></a>样例代码</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br></pre></td><td class="code"><pre><span class="line">import math</span><br><span class="line">import cv2</span><br><span class="line">import numpy as np</span><br><span class="line">def GaussKernel(size,k,sigma):</span><br><span class="line"> _t = np.zeros((size,size),np.float32)</span><br><span class="line"> for i in range (size):</span><br><span class="line"> for j in range (size):</span><br><span class="line"> norm = math.pow(i-k,2) + pow(j-k,2)</span><br><span class="line"> _t[i,j] = math.exp(-norm/(2*math.pow(sigma,2)))/2*math.pi*pow(sigma,2)</span><br><span class="line"> sum = np.sum(_t)</span><br><span class="line"> kernel = _t/sum</span><br><span class="line"> return kernel</span><br><span class="line"></span><br><span class="line">def mygaussFilter(img_gray,kernel):</span><br><span class="line"> h,w = img_gray.shape</span><br><span class="line"> k_h,k_w = kernel.shape</span><br><span class="line"> for i in range(int(k_h/2),h-int(k_h/2)):</span><br><span class="line"> for j in range(int(k_h/2),w-int(k_h/2)):</span><br><span class="line"> sum = 0</span><br><span class="line"> for k in range(0,k_h):</span><br><span class="line"> for l in range(0,k_h):</span><br><span class="line"> sum += img_gray[i-int(k_h/2)+k,j-int(k_h/2)+l]*kernel[k,l]</span><br><span class="line"> img_gray[i,j] = sum</span><br><span class="line"> return img_gray</span><br><span class="line"></span><br><span class="line">if __name__ == '__main__':</span><br><span class="line"> img = cv2.imread("demo.jpg")</span><br><span class="line"> img_gray = cv2.cvtColor(img,cv2.COLOR_RGB2GRAY)</span><br><span class="line"> img_g = img_gray.copy()</span><br><span class="line"> k=1</span><br><span class="line"> size = 2*k+1</span><br><span class="line"> kernel = gausskernel(size,k,1.5)</span><br><span class="line"> print(kernel)</span><br><span class="line"> img_B,img_G,img_R = cv2.split(img)</span><br><span class="line"> img_gauss_B = mygaussFilter(img_B,kernel)</span><br><span class="line"> img_gauss_G = mygaussFilter(img_G,kernel)</span><br><span class="line"> img_gauss_R = mygaussFilter(img_R,kernel)</span><br><span class="line"> img_gauss = cv2.merge([img_gauss_B,img_gauss_G,img_gauss_R])</span><br><span class="line"> img_comp = np.hstack((img,img_gauss))</span><br><span class="line"> cv2.imshow("gauss",img_comp)</span><br><span class="line"> cv2.waitKey(0)</span><br></pre></td></tr></table></figure>
|
2540
|
+
</div><div class="story post-story"><h2 id="直接OpenCV操作-非原理实现方案-使用封装方法"><a href="#直接OpenCV操作-非原理实现方案-使用封装方法" class="headerlink" title="直接OpenCV操作(非原理实现方案 使用封装方法)"></a>直接OpenCV操作(非原理实现方案 使用封装方法)</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">import cv2</span><br><span class="line">Gn=cv2.imread("Gaussian_noise.jpg") </span><br><span class="line">Gf=cv2.GaussianBlur(Gn,(3,3),0,0)</span><br><span class="line">cv2.imshow("噪声图像",Gn)</span><br><span class="line">cv2.imshow("滤波图像",Gf)</span><br><span class="line">cv2.waitKey()</span><br><span class="line">cv2.destroyAllWindows()</span><br></pre></td></tr></table></figure>
|
2541
|
+
</div><div class="story post-story"><h2 id="Que-边界点的处理"><a href="#Que-边界点的处理" class="headerlink" title="Que: 边界点的处理"></a>Que: 边界点的处理</h2><p>如果一个点处于边界,周边没有足够的点,怎么办?<br>一个变通方法,就是把已有的点拷贝到另一面的对应位置,模拟出完整的矩阵。<br>当然我们这里很简单,就是进行矩阵补零上去,用零进行模拟完整矩阵。</p>
|
2542
|
+
</div><div class="story post-story"><h2 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h2><p>高斯滤波可以让图像高斯噪声降低,并且平滑图像,并且opencv等库已经提供封装,我们可以很快的使用</p>
|
2543
|
+
</div><div class="story post-story"><h2 id="文章引用"><a href="#文章引用" class="headerlink" title="文章引用"></a>文章引用</h2><p>高斯滤波<br><a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_51571728/article/details/121527964">https://blog.csdn.net/weixin_51571728/article/details/121527964</a><br>高斯滤波核<br><a target="_blank" rel="noopener" href="https://blog.csdn.net/qqq777_/article/details/112800310">https://blog.csdn.net/qqq777_/article/details/112800310</a><br>有关线性滤波、滤波核的基本概念(概念理解)<br><a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_42664622/article/details/103672899">https://blog.csdn.net/weixin_42664622/article/details/103672899</a><br>数字图像处理基础 — 高斯滤波<br><a target="_blank" rel="noopener" href="https://zhuanlan.zhihu.com/p/82569305">https://zhuanlan.zhihu.com/p/82569305</a><br>图像滤波原理(不推荐)<br><a target="_blank" rel="noopener" href="https://view.inews.qq.com/a/20220425A06HHF00">https://view.inews.qq.com/a/20220425A06HHF00</a></p>
|
2544
|
+
</div><div class="story post-story"><h2 id="提示"><a href="#提示" class="headerlink" title="提示"></a>提示</h2><p>该文章并不准确,如果有错误请积极指出。</p>
|
2545
|
+
|
2546
|
+
</div>
|
2547
|
+
</div>
|
2548
|
+
|
2549
|
+
|
2550
|
+
|
2551
|
+
<div class='footer'>
|
2552
|
+
<!-- 参考资料、相关资料等 -->
|
2553
|
+
|
2554
|
+
<!-- 相关文章 -->
|
2555
|
+
|
2556
|
+
<!-- 版权声明组件 -->
|
2557
|
+
|
2558
|
+
|
2559
|
+
|
2560
|
+
<div class="copyright license">
|
2561
|
+
<div class="license-title">高斯滤波</div>
|
2562
|
+
<div class="license-link"><a href="https://nanaeo.cn/2022/08/13/GaussWave/">https://nanaeo.cn/2022/08/13/GaussWave/</a>
|
2563
|
+
</div>
|
2564
|
+
<div class="license-meta">
|
2565
|
+
<div class="license-meta-item">
|
2566
|
+
<div class="license-meta-title">本文作者</div>
|
2567
|
+
<div class="license-meta-text">Mlikiowa</div>
|
2568
|
+
</div>
|
2569
|
+
<div class="license-meta-item">
|
2570
|
+
<div class="license-meta-title">发布于</div>
|
2571
|
+
<div class="license-meta-text">2022年8月14日</div>
|
2572
|
+
</div>
|
2573
|
+
|
2574
|
+
<div class="license-meta-item">
|
2575
|
+
<div class="license-meta-title">更新于</div>
|
2576
|
+
<div class="license-meta-text">2023年12月19日</div>
|
2577
|
+
</div>
|
2578
|
+
|
2579
|
+
|
2580
|
+
<div class="license-meta-item">
|
2581
|
+
<div class="license-meta-title">许可协议</div>
|
2582
|
+
<div class="license-meta-text"><a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh#" target="_blank">CC BY-NC-SA 4.0</a></div>
|
2583
|
+
</div>
|
2584
|
+
</div>
|
2585
|
+
<div class="license-statement">署名-非商业性使用-相同方式共享 4.0 国际。</div>
|
2586
|
+
</div>
|
2587
|
+
|
2588
|
+
|
2589
|
+
<!-- 打赏组件 -->
|
2590
|
+
|
2591
|
+
</div>
|
2592
|
+
|
2593
|
+
|
2594
|
+
|
2595
|
+
|
2596
|
+
|
2597
|
+
<div class='article-meta' id="bottom">
|
2598
|
+
<div class='new-meta-box'>
|
2599
|
+
|
2600
|
+
|
2601
|
+
<div class="new-meta-item date" itemprop="dateModified" datetime="2023-12-19T14:33:48+08:00">
|
2602
|
+
<a class='notlink'>
|
2603
|
+
<i class="fa-solid fa-edit fa-fw" aria-hidden="true"></i>
|
2604
|
+
<p>更新于:2023年12月19日</p>
|
2605
|
+
</a>
|
2606
|
+
</div>
|
2607
|
+
|
2608
|
+
|
2609
|
+
|
2610
|
+
|
2611
|
+
|
2612
|
+
|
2613
|
+
<div class="new-meta-item meta-tags"><a class="tag" href="/tags/DevLog/" rel="nofollow"><i class="fas fa-hashtag fa-fw" aria-hidden="true"></i><p>DevLog</p></a></div> <div class="new-meta-item meta-tags"><a class="tag" href="/tags/Gauss/" rel="nofollow"><i class="fas fa-hashtag fa-fw" aria-hidden="true"></i><p>Gauss</p></a></div>
|
2614
|
+
<span hidden itemprop="keywords">DevLog Gauss</span>
|
2615
|
+
|
2616
|
+
|
2617
|
+
|
2618
|
+
|
2619
|
+
</div>
|
2620
|
+
<!-- Custom Files bottomMeta begin -->
|
2621
|
+
|
2622
|
+
<!-- Custom Files bottomMeta end -->
|
2623
|
+
</div>
|
2624
|
+
|
2625
|
+
|
2626
|
+
|
2627
|
+
|
2628
|
+
|
2629
|
+
|
2630
|
+
<div class="prev-next">
|
2631
|
+
|
2632
|
+
|
2633
|
+
<a class='next' href='/2022/08/04/NewBlog/'>
|
2634
|
+
<p class='title'>新博客建好啦<i class="fa-solid fa-chevron-right" aria-hidden="true"></i></p>
|
2635
|
+
<p class='content'>Hi Hexo,I am Mlikiowa!是全新的Hexo/vlolantis博客,我又回来写博客了!
|
2636
|
+
|
2637
|
+
|
2638
|
+
回忆2019.Previous
|
2639
|
+
使用过Emlog Wordpress来搭建...</p>
|
2640
|
+
</a>
|
2641
|
+
|
2642
|
+
</div>
|
2643
|
+
|
2644
|
+
<!-- Custom Files postEnd begin-->
|
2645
|
+
|
2646
|
+
<!-- Custom Files postEnd end-->
|
2647
|
+
</article>
|
2648
|
+
|
2649
|
+
|
2650
|
+
|
2651
|
+
|
2652
|
+
|
2653
|
+
<article class="post white-box shadow floatable blur" id="comments">
|
2654
|
+
<span hidden>
|
2655
|
+
<meta itemprop="discussionUrl" content="/2022/08/13/GaussWave/index.html#comments">
|
2656
|
+
</span>
|
2657
|
+
<p ct><i class='fa-solid fa-comments'></i> 评论</p>
|
2658
|
+
|
2659
|
+
|
2660
|
+
<div id="layoutHelper-comments"></div>
|
2661
|
+
|
2662
|
+
</article>
|
2663
|
+
|
2664
|
+
|
2665
|
+
|
2666
|
+
|
2667
|
+
|
2668
|
+
|
2669
|
+
</div>
|
2670
|
+
<aside id='l_side' itemscope itemtype="http://schema.org/WPSideBar">
|
2671
|
+
|
2672
|
+
|
2673
|
+
|
2674
|
+
|
2675
|
+
|
2676
|
+
|
2677
|
+
|
2678
|
+
|
2679
|
+
|
2680
|
+
|
2681
|
+
<div class="widget-sticky pjax">
|
2682
|
+
|
2683
|
+
|
2684
|
+
|
2685
|
+
|
2686
|
+
|
2687
|
+
<section class="widget toc-wrapper desktop mobile " id="toc-div" >
|
2688
|
+
|
2689
|
+
<header>
|
2690
|
+
|
2691
|
+
<i class="fa-solid fa-list fa-fw" aria-hidden="true"></i><span class='name'>Content</span>
|
2692
|
+
|
2693
|
+
</header>
|
2694
|
+
|
2695
|
+
|
2696
|
+
<div class='content'>
|
2697
|
+
<ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%9C%AC%E6%96%87%E6%8F%90%E7%A4%BA"><span class="toc-text">本文提示</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%A6%82%E5%BF%B5%E7%90%86%E8%A7%A3-%E9%83%A8%E5%88%86%E6%9D%A5%E8%87%AA%E7%99%BE%E7%A7%91%E7%AD%89"><span class="toc-text">概念理解(部分来自百科等)</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%BB%A4%E6%B3%A2"><span class="toc-text">滤波</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BD%8E%E9%80%9A%E6%BB%A4%E6%B3%A2"><span class="toc-text">低通滤波</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%AB%98%E9%80%9A%E6%BB%A4%E6%B3%A2"><span class="toc-text">高通滤波</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%AB%98%E6%96%AF%E6%BB%A4%E6%B3%A2"><span class="toc-text">高斯滤波</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%A0%B8%E7%AE%97%E5%AD%90%E3%80%81%E6%A8%A1%E6%9D%BF%E3%80%81%E7%BB%93%E6%9E%84%E9%83%BD%E6%98%AF%E4%B8%80%E7%A7%8D"><span class="toc-text">核算子、模板、结构都是一种</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%BB%A4%E6%B3%A2%E6%A0%B8"><span class="toc-text">滤波核</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%BD%92%E4%B8%80%E5%8C%96"><span class="toc-text">归一化</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%8D%B7%E7%A7%AF%E6%A0%B8"><span class="toc-text">卷积核</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%AB%98%E6%96%AF%E6%A0%B8"><span class="toc-text">高斯核</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%8E%AF%E5%A2%83%E4%B8%8E%E4%BE%9D%E8%B5%96"><span class="toc-text">环境与依赖</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#OpenCv%E5%BA%93%E5%AE%89%E8%A3%85"><span class="toc-text">OpenCv库安装</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%B8%BE%E4%BE%8B"><span class="toc-text">举例</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%AE%97%E6%B3%95%E8%BF%87%E7%A8%8B"><span class="toc-text">算法过程</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%AB%98%E6%96%AF%E6%BB%A4%E6%B3%A2%E5%AE%9E%E7%8E%B0%E6%96%B9%E6%B3%95"><span class="toc-text">高斯滤波实现方法</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%AE%97%E6%B3%95%E8%BF%87%E7%A8%8B-1"><span class="toc-text">算法过程</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%94%9F%E6%88%90%E6%BB%A4%E6%B3%A2%E6%A0%B8"><span class="toc-text">生成滤波核</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%8D%B7%E7%A7%AF%E7%94%9F%E6%88%90"><span class="toc-text">卷积生成</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%A0%B7%E4%BE%8B%E4%BB%A3%E7%A0%81"><span class="toc-text">样例代码</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%9B%B4%E6%8E%A5OpenCV%E6%93%8D%E4%BD%9C-%E9%9D%9E%E5%8E%9F%E7%90%86%E5%AE%9E%E7%8E%B0%E6%96%B9%E6%A1%88-%E4%BD%BF%E7%94%A8%E5%B0%81%E8%A3%85%E6%96%B9%E6%B3%95"><span class="toc-text">直接OpenCV操作(非原理实现方案 使用封装方法)</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Que-%E8%BE%B9%E7%95%8C%E7%82%B9%E7%9A%84%E5%A4%84%E7%90%86"><span class="toc-text">Que: 边界点的处理</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%80%BB%E7%BB%93"><span class="toc-text">总结</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%96%87%E7%AB%A0%E5%BC%95%E7%94%A8"><span class="toc-text">文章引用</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%8F%90%E7%A4%BA"><span class="toc-text">提示</span></a></li></ol>
|
2698
|
+
</div>
|
2699
|
+
</section>
|
2700
|
+
|
2701
|
+
|
2702
|
+
|
2703
|
+
</div>
|
2704
|
+
|
2705
|
+
|
2706
|
+
<!-- 没有 pjax 占位会报错 万恶的 pjax -->
|
2707
|
+
|
2708
|
+
<div class="pjax">
|
2709
|
+
<!-- pjax占位 -->
|
2710
|
+
</div>
|
2711
|
+
|
2712
|
+
<div class="pjax">
|
2713
|
+
<!-- pjax占位 -->
|
2714
|
+
</div>
|
2715
|
+
|
2716
|
+
<div class="pjax">
|
2717
|
+
<!-- pjax占位 -->
|
2718
|
+
</div>
|
2719
|
+
|
2720
|
+
<div class="pjax">
|
2721
|
+
<!-- pjax占位 -->
|
2722
|
+
</div>
|
2723
|
+
|
2724
|
+
<div class="pjax">
|
2725
|
+
<!-- pjax占位 -->
|
2726
|
+
</div>
|
2727
|
+
|
2728
|
+
<div class="pjax">
|
2729
|
+
<!-- pjax占位 -->
|
2730
|
+
</div>
|
2731
|
+
|
2732
|
+
<div class="pjax">
|
2733
|
+
<!-- pjax占位 -->
|
2734
|
+
</div>
|
2735
|
+
|
2736
|
+
<div class="pjax">
|
2737
|
+
<!-- pjax占位 -->
|
2738
|
+
</div>
|
2739
|
+
|
2740
|
+
<!-- Custom Files side begin -->
|
2741
|
+
|
2742
|
+
<!-- Custom Files side end -->
|
2743
|
+
</aside>
|
2744
|
+
|
2745
|
+
|
2746
|
+
|
2747
|
+
<!--此文件用来存放一些不方便取值的变量-->
|
2748
|
+
<!--思路大概是将值藏到重加载的区域内-->
|
2749
|
+
|
2750
|
+
<pjax>
|
2751
|
+
<script>
|
2752
|
+
window.pdata={}
|
2753
|
+
pdata.ispage=true;
|
2754
|
+
pdata.commentPath="";
|
2755
|
+
pdata.commentPlaceholder="";
|
2756
|
+
pdata.commentConfig={};
|
2757
|
+
// see: /layout/_partial/scripts/_ctrl/coverCtrl.ejs
|
2758
|
+
|
2759
|
+
// header
|
2760
|
+
var l_header=document.getElementById("l_header");
|
2761
|
+
|
2762
|
+
l_header.classList.remove("show");
|
2763
|
+
|
2764
|
+
|
2765
|
+
// cover
|
2766
|
+
var cover_wrapper=document.querySelector('#l_cover .cover-wrapper');
|
2767
|
+
var scroll_down=document.getElementById('scroll-down');
|
2768
|
+
cover_wrapper.id="half";
|
2769
|
+
cover_wrapper.style.display="";
|
2770
|
+
scroll_down.style.display="none";
|
2771
|
+
|
2772
|
+
|
2773
|
+
</script>
|
2774
|
+
</pjax>
|
2775
|
+
</div>
|
2776
|
+
|
2777
|
+
|
2778
|
+
<footer class="footer clearfix" itemscope itemtype="http://schema.org/WPFooter">
|
2779
|
+
<br><br>
|
2780
|
+
|
2781
|
+
|
2782
|
+
<div class='copyright'>
|
2783
|
+
<p>⌘ Hexo With Volantis</p>
|
2784
|
+
|
2785
|
+
</div>
|
2786
|
+
|
2787
|
+
|
2788
|
+
<!-- Custom Files footer begin-->
|
2789
|
+
|
2790
|
+
<!-- Custom Files footer end-->
|
2791
|
+
</footer>
|
2792
|
+
|
2793
|
+
|
2794
|
+
<a id="s-top" class="fa-solid fa-arrow-up fa-fw" href="/" onclick="return false;" title="top"></a>
|
2795
|
+
</div>
|
2796
|
+
</div>
|
2797
|
+
<div>
|
2798
|
+
<script>
|
2799
|
+
/******************** volantis.dom ********************************/
|
2800
|
+
// 页面选择器 将dom对象缓存起来 see: /source/js/app.js etc.
|
2801
|
+
volantis.dom.bodyAnchor = volantis.dom.$(document.getElementById("safearea")); // 页面主体
|
2802
|
+
volantis.dom.topBtn = volantis.dom.$(document.getElementById('s-top')); // 向上
|
2803
|
+
volantis.dom.wrapper = volantis.dom.$(document.getElementById('wrapper')); // 整个导航栏
|
2804
|
+
volantis.dom.coverAnchor = volantis.dom.$(document.querySelector('#l_cover .cover-wrapper')); // 1个
|
2805
|
+
volantis.dom.switcher = volantis.dom.$(document.querySelector('#l_header .switcher .s-search')); // 搜索按钮 移动端 1个
|
2806
|
+
volantis.dom.header = volantis.dom.$(document.getElementById('l_header')); // 移动端导航栏
|
2807
|
+
volantis.dom.search = volantis.dom.$(document.querySelector('#l_header .m_search')); // 搜索框 桌面端 移动端 1个
|
2808
|
+
volantis.dom.mPhoneList = volantis.dom.$(document.querySelectorAll('#l_header .m-phone .list-v')); // 手机端 子菜单 多个
|
2809
|
+
</script>
|
2810
|
+
|
2811
|
+
<script>
|
2812
|
+
|
2813
|
+
volantis.css("https://fastly.jsdelivr.net/npm/volantis-static/libs/@fortawesome/fontawesome-free/css/all.min.css");
|
2814
|
+
|
2815
|
+
|
2816
|
+
|
2817
|
+
</script>
|
2818
|
+
|
2819
|
+
<!-- required -->
|
2820
|
+
|
2821
|
+
|
2822
|
+
<!-- internal -->
|
2823
|
+
|
2824
|
+
<script src="/js/app.js"></script>
|
2825
|
+
|
2826
|
+
|
2827
|
+
|
2828
|
+
|
2829
|
+
|
2830
|
+
|
2831
|
+
<!-- rightmenu要在darkmode之前(ToggleButton) darkmode要在comments之前(volantis.dark.push)-->
|
2832
|
+
|
2833
|
+
|
2834
|
+
|
2835
|
+
<script>
|
2836
|
+
function loadIssuesJS() {
|
2837
|
+
|
2838
|
+
const sites_api = document.getElementById('sites-api');
|
2839
|
+
if (sites_api != undefined && typeof SitesJS === 'undefined') {
|
2840
|
+
volantis.js("/js/plugins/tags/sites.js")
|
2841
|
+
}
|
2842
|
+
|
2843
|
+
|
2844
|
+
const friends_api = document.getElementById('friends-api');
|
2845
|
+
if (friends_api != undefined && typeof FriendsJS === 'undefined') {
|
2846
|
+
volantis.js("/js/plugins/tags/friends.js")
|
2847
|
+
}
|
2848
|
+
|
2849
|
+
|
2850
|
+
const contributors_api = document.getElementById('contributors-api');
|
2851
|
+
if (contributors_api != undefined && typeof ContributorsJS === 'undefined') {
|
2852
|
+
volantis.js("/js/plugins/tags/contributors.js")
|
2853
|
+
}
|
2854
|
+
|
2855
|
+
};
|
2856
|
+
loadIssuesJS()
|
2857
|
+
volantis.pjax.push(()=>{
|
2858
|
+
loadIssuesJS();
|
2859
|
+
})
|
2860
|
+
|
2861
|
+
</script>
|
2862
|
+
|
2863
|
+
|
2864
|
+
|
2865
|
+
|
2866
|
+
<script defer src="https://fastly.jsdelivr.net/npm/volantis-static/libs/vanilla-lazyload/dist/lazyload.min.js"></script>
|
2867
|
+
<script>
|
2868
|
+
// https://www.npmjs.com/package/vanilla-lazyload
|
2869
|
+
// Set the options globally
|
2870
|
+
// to make LazyLoad self-initialize
|
2871
|
+
window.lazyLoadOptions = {
|
2872
|
+
elements_selector: ".lazyload",
|
2873
|
+
threshold: 0
|
2874
|
+
};
|
2875
|
+
// Listen to the initialization event
|
2876
|
+
// and get the instance of LazyLoad
|
2877
|
+
window.addEventListener(
|
2878
|
+
"LazyLoad::Initialized",
|
2879
|
+
function (event) {
|
2880
|
+
window.lazyLoadInstance = event.detail.instance;
|
2881
|
+
},
|
2882
|
+
false
|
2883
|
+
);
|
2884
|
+
document.addEventListener('DOMContentLoaded', function () {
|
2885
|
+
lazyLoadInstance.update();
|
2886
|
+
});
|
2887
|
+
document.addEventListener('pjax:complete', function () {
|
2888
|
+
lazyLoadInstance.update();
|
2889
|
+
});
|
2890
|
+
</script>
|
2891
|
+
|
2892
|
+
|
2893
|
+
|
2894
|
+
|
2895
|
+
|
2896
|
+
|
2897
|
+
<script>
|
2898
|
+
window.FPConfig = {
|
2899
|
+
delay: 0,
|
2900
|
+
ignoreKeywords: ["#"],
|
2901
|
+
maxRPS: 6,
|
2902
|
+
hoverDelay: 0
|
2903
|
+
};
|
2904
|
+
</script>
|
2905
|
+
<script defer src="https://fastly.jsdelivr.net/npm/volantis-static/libs/flying-pages/flying-pages.min.js"></script>
|
2906
|
+
|
2907
|
+
|
2908
|
+
|
2909
|
+
|
2910
|
+
|
2911
|
+
|
2912
|
+
|
2913
|
+
|
2914
|
+
|
2915
|
+
<script>
|
2916
|
+
volantis.layoutHelper("comments",`<div id="giscus_container"></div>`)
|
2917
|
+
|
2918
|
+
volantis.giscus = {};
|
2919
|
+
|
2920
|
+
function check_giscus() {
|
2921
|
+
if (volantis.dark.mode === "dark") {
|
2922
|
+
volantis.giscus.Theme = 'dark';
|
2923
|
+
} else {
|
2924
|
+
volantis.giscus.Theme = 'light';
|
2925
|
+
}
|
2926
|
+
|
2927
|
+
return document.getElementById("giscus_container");
|
2928
|
+
}
|
2929
|
+
|
2930
|
+
function pjax_giscus() {
|
2931
|
+
const HEAD = check_giscus();
|
2932
|
+
if (!HEAD) return;
|
2933
|
+
let cfg = Object.assign({"theme":{"light":"light","dark":"dark"},"repo":"Mlikiowa/MliKiowa.github.io","repo-id":"R_kgDOHxvLiA","category":"General","category-id":"DIC_kwDOHxvLiM4CQr9N","mapping":"url","reactions-enabled":"1","emit-metadata":"0","lang":"zh-CN"},pdata.commentConfig)
|
2934
|
+
const script = document.createElement('script');
|
2935
|
+
script.setAttribute('src', 'https://giscus.app/client.js');
|
2936
|
+
Object.keys(cfg).forEach(k=>{
|
2937
|
+
if (k != "theme") {
|
2938
|
+
script.setAttribute('data-'+k, cfg[k]);
|
2939
|
+
}
|
2940
|
+
})
|
2941
|
+
script.setAttribute('data-theme', volantis.giscus.Theme);
|
2942
|
+
script.setAttribute('crossorigin', "anonymous");
|
2943
|
+
HEAD.appendChild(script);
|
2944
|
+
}
|
2945
|
+
|
2946
|
+
function dark_giscus() {
|
2947
|
+
const HEAD = check_giscus();
|
2948
|
+
if (!HEAD) return;
|
2949
|
+
|
2950
|
+
const message = {
|
2951
|
+
setConfig: {
|
2952
|
+
theme: volantis.giscus.Theme
|
2953
|
+
}
|
2954
|
+
};
|
2955
|
+
const giscusIframe = document.querySelector('iframe.giscus-frame');
|
2956
|
+
giscusIframe.contentWindow.postMessage({ giscus: message }, 'https://giscus.app');
|
2957
|
+
}
|
2958
|
+
pjax_giscus();
|
2959
|
+
volantis.pjax.push(pjax_giscus);
|
2960
|
+
volantis.dark.push(dark_giscus);
|
2961
|
+
</script>
|
2962
|
+
|
2963
|
+
|
2964
|
+
|
2965
|
+
|
2966
|
+
|
2967
|
+
|
2968
|
+
|
2969
|
+
<!-- optional -->
|
2970
|
+
|
2971
|
+
<script>
|
2972
|
+
const SearchServiceDataPathRoot = ("/" || "/").endsWith("/") ?
|
2973
|
+
"/" || "/" :
|
2974
|
+
"//" || "/";
|
2975
|
+
const SearchServiceDataPath = SearchServiceDataPathRoot + "content.json";
|
2976
|
+
|
2977
|
+
function loadSearchScript() {
|
2978
|
+
// see: layout/_partial/scripts/_ctrl/cdnCtrl.ejs
|
2979
|
+
return volantis.js("/js/search/hexo.js");
|
2980
|
+
}
|
2981
|
+
|
2982
|
+
function loadSearchService() {
|
2983
|
+
loadSearchScript();
|
2984
|
+
document.querySelectorAll(".input.u-search-input").forEach((e) => {
|
2985
|
+
e.removeEventListener("focus", loadSearchService, false);
|
2986
|
+
});
|
2987
|
+
|
2988
|
+
document.querySelectorAll(".u-search-form").forEach((e) => {
|
2989
|
+
e.addEventListener("submit", (event) => {
|
2990
|
+
event.preventDefault();
|
2991
|
+
}, false);
|
2992
|
+
});
|
2993
|
+
}
|
2994
|
+
|
2995
|
+
// 打开并搜索 字符串 s
|
2996
|
+
function OpenSearch(s) {
|
2997
|
+
if (typeof SearchService === 'undefined')
|
2998
|
+
loadSearchScript().then(() => {
|
2999
|
+
SearchService.setQueryText(s);
|
3000
|
+
SearchService.search();
|
3001
|
+
});
|
3002
|
+
else {
|
3003
|
+
SearchService.setQueryText(s);
|
3004
|
+
SearchService.search();
|
3005
|
+
}
|
3006
|
+
}
|
3007
|
+
|
3008
|
+
// 访问含有 ?s=xxx 的链接时打开搜索 // 与搜索引擎 structured data 相关: /scripts/helpers/structured-data/lib/config.js
|
3009
|
+
if (window.location.search && /^\?s=/g.test(window.location.search)) {
|
3010
|
+
let queryText = decodeURI(window.location.search)
|
3011
|
+
.replace(/\ /g, "-")
|
3012
|
+
.replace(/^\?s=/g, "");
|
3013
|
+
OpenSearch(queryText);
|
3014
|
+
}
|
3015
|
+
|
3016
|
+
// 搜索输入框获取焦点时加载搜索
|
3017
|
+
document.querySelectorAll(".input.u-search-input").forEach((e) => {
|
3018
|
+
e.addEventListener("focus", loadSearchService, false);
|
3019
|
+
});
|
3020
|
+
</script>
|
3021
|
+
|
3022
|
+
|
3023
|
+
|
3024
|
+
|
3025
|
+
|
3026
|
+
|
3027
|
+
|
3028
|
+
<script>
|
3029
|
+
|
3030
|
+
|
3031
|
+
|
3032
|
+
function pjax_highlightjs_copyCode(){
|
3033
|
+
if (!(document.querySelector(".highlight .code pre") ||
|
3034
|
+
document.querySelector(".article pre code"))) {
|
3035
|
+
return;
|
3036
|
+
}
|
3037
|
+
VolantisApp.utilCopyCode(".highlight .code pre, .article pre code")
|
3038
|
+
}
|
3039
|
+
volantis.requestAnimationFrame(pjax_highlightjs_copyCode)
|
3040
|
+
volantis.pjax.push(pjax_highlightjs_copyCode)
|
3041
|
+
|
3042
|
+
</script>
|
3043
|
+
|
3044
|
+
|
3045
|
+
|
3046
|
+
|
3047
|
+
|
3048
|
+
|
3049
|
+
|
3050
|
+
|
3051
|
+
|
3052
|
+
|
3053
|
+
|
3054
|
+
|
3055
|
+
<script>
|
3056
|
+
function load_swiper() {
|
3057
|
+
if (!document.querySelectorAll(".swiper-container")[0]) return;
|
3058
|
+
volantis.css("https://fastly.jsdelivr.net/npm/volantis-static/libs/swiper/swiper-bundle.min.css");
|
3059
|
+
volantis.js("https://fastly.jsdelivr.net/npm/volantis-static/libs/swiper/swiper-bundle.min.js").then(() => {
|
3060
|
+
pjax_swiper();
|
3061
|
+
});
|
3062
|
+
}
|
3063
|
+
|
3064
|
+
load_swiper();
|
3065
|
+
|
3066
|
+
function pjax_swiper() {
|
3067
|
+
volantis.swiper = new Swiper('.swiper-container', {
|
3068
|
+
slidesPerView: 'auto',
|
3069
|
+
spaceBetween: 8,
|
3070
|
+
centeredSlides: true,
|
3071
|
+
loop: true,
|
3072
|
+
pagination: {
|
3073
|
+
el: '.swiper-pagination',
|
3074
|
+
clickable: true,
|
3075
|
+
},
|
3076
|
+
navigation: {
|
3077
|
+
nextEl: '.swiper-button-next',
|
3078
|
+
prevEl: '.swiper-button-prev',
|
3079
|
+
},
|
3080
|
+
});
|
3081
|
+
}
|
3082
|
+
|
3083
|
+
volantis.pjax.push(() => {
|
3084
|
+
if (!document.querySelectorAll(".swiper-container")[0]) return;
|
3085
|
+
if (typeof volantis.swiper === "undefined") {
|
3086
|
+
load_swiper();
|
3087
|
+
} else {
|
3088
|
+
pjax_swiper();
|
3089
|
+
}
|
3090
|
+
});
|
3091
|
+
</script>
|
3092
|
+
|
3093
|
+
|
3094
|
+
<!-- pjax 标签必须存在于所有页面 否则 pjax error -->
|
3095
|
+
<pjax>
|
3096
|
+
|
3097
|
+
</pjax>
|
3098
|
+
|
3099
|
+
<script>
|
3100
|
+
function listennSidebarTOC() {
|
3101
|
+
const navItems = document.querySelectorAll(".toc li");
|
3102
|
+
if (!navItems.length) return;
|
3103
|
+
let targets = []
|
3104
|
+
const sections = [...navItems].map((element) => {
|
3105
|
+
const link = element.querySelector(".toc-link");
|
3106
|
+
const target = document.getElementById(
|
3107
|
+
decodeURI(link.getAttribute("href")).replace("#", "")
|
3108
|
+
);
|
3109
|
+
targets.push(target)
|
3110
|
+
// 解除 a 标签 href 的 锚点定位, a 标签 href 的 锚点定位 会随机启用?? 产生错位???
|
3111
|
+
link.setAttribute("onclick","return false;")
|
3112
|
+
link.setAttribute("toc-action","toc-"+decodeURI(link.getAttribute("href")).replace("#", ""))
|
3113
|
+
link.setAttribute("href","/")
|
3114
|
+
// 配置 点击 触发新的锚点定位
|
3115
|
+
link.addEventListener("click", (event) => {
|
3116
|
+
event.preventDefault();
|
3117
|
+
// 这里的 addTop 是通过错位使得 toc 自动展开.
|
3118
|
+
volantis.scroll.to(target,{addTop: 5, observer:true})
|
3119
|
+
// Anchor id
|
3120
|
+
history.pushState(null, document.title, "#" + target.id);
|
3121
|
+
});
|
3122
|
+
return target;
|
3123
|
+
});
|
3124
|
+
|
3125
|
+
function activateNavByIndex(target) {
|
3126
|
+
if (target.classList.contains("active-current")) return;
|
3127
|
+
|
3128
|
+
document.querySelectorAll(".toc .active").forEach((element) => {
|
3129
|
+
element.classList.remove("active", "active-current");
|
3130
|
+
});
|
3131
|
+
target.classList.add("active", "active-current");
|
3132
|
+
let parent = target.parentNode;
|
3133
|
+
while (!parent.matches(".toc")) {
|
3134
|
+
if (parent.matches("li")) parent.classList.add("active");
|
3135
|
+
parent = parent.parentNode;
|
3136
|
+
}
|
3137
|
+
}
|
3138
|
+
|
3139
|
+
// 方案一:
|
3140
|
+
volantis.activateNavIndex=0
|
3141
|
+
activateNavByIndex(navItems[volantis.activateNavIndex])
|
3142
|
+
volantis.scroll.push(()=>{
|
3143
|
+
if (targets[0].getBoundingClientRect().top >= 0) {
|
3144
|
+
volantis.activateNavIndex = 0
|
3145
|
+
}else if (targets[targets.length-1].getBoundingClientRect().top < 0) {
|
3146
|
+
volantis.activateNavIndex = targets.length-1
|
3147
|
+
} else {
|
3148
|
+
for (let index = 0; index < targets.length; index++) {
|
3149
|
+
const target0 = targets[index];
|
3150
|
+
const target1 = targets[(index+1)%targets.length];
|
3151
|
+
if (target0.getBoundingClientRect().top < 0&&target1.getBoundingClientRect().top >= 0) {
|
3152
|
+
volantis.activateNavIndex=index
|
3153
|
+
break;
|
3154
|
+
}
|
3155
|
+
}
|
3156
|
+
}
|
3157
|
+
activateNavByIndex(navItems[volantis.activateNavIndex])
|
3158
|
+
})
|
3159
|
+
|
3160
|
+
// 方案二:
|
3161
|
+
// IntersectionObserver 不是完美精确到像素级别 也不是低延时性的
|
3162
|
+
// function findIndex(entries) {
|
3163
|
+
// let index = 0;
|
3164
|
+
// let entry = entries[index];
|
3165
|
+
// if (entry.boundingClientRect.top > 0) {
|
3166
|
+
// index = sections.indexOf(entry.target);
|
3167
|
+
// return index === 0 ? 0 : index - 1;
|
3168
|
+
// }
|
3169
|
+
// for (; index < entries.length; index++) {
|
3170
|
+
// if (entries[index].boundingClientRect.top <= 0) {
|
3171
|
+
// entry = entries[index];
|
3172
|
+
// } else {
|
3173
|
+
// return sections.indexOf(entry.target);
|
3174
|
+
// }
|
3175
|
+
// }
|
3176
|
+
// return sections.indexOf(entry.target);
|
3177
|
+
// }
|
3178
|
+
// function createIntersectionObserver(marginTop) {
|
3179
|
+
// marginTop = Math.floor(marginTop + 10000);
|
3180
|
+
// let intersectionObserver = new IntersectionObserver(
|
3181
|
+
// (entries, observe) => {
|
3182
|
+
// let scrollHeight = document.documentElement.scrollHeight;
|
3183
|
+
// if (scrollHeight > marginTop) {
|
3184
|
+
// observe.disconnect();
|
3185
|
+
// createIntersectionObserver(scrollHeight);
|
3186
|
+
// return;
|
3187
|
+
// }
|
3188
|
+
// let index = findIndex(entries);
|
3189
|
+
// activateNavByIndex(navItems[index]);
|
3190
|
+
// }, {
|
3191
|
+
// rootMargin: marginTop + "px 0px -100% 0px",
|
3192
|
+
// threshold: 0,
|
3193
|
+
// }
|
3194
|
+
// );
|
3195
|
+
// sections.forEach((element) => {
|
3196
|
+
// element && intersectionObserver.observe(element);
|
3197
|
+
// });
|
3198
|
+
// }
|
3199
|
+
// createIntersectionObserver(document.documentElement.scrollHeight);
|
3200
|
+
}
|
3201
|
+
|
3202
|
+
document.addEventListener("DOMContentLoaded", ()=>{
|
3203
|
+
volantis.requestAnimationFrame(listennSidebarTOC)
|
3204
|
+
});
|
3205
|
+
document.addEventListener("pjax:success", ()=>{
|
3206
|
+
volantis.requestAnimationFrame(listennSidebarTOC)
|
3207
|
+
});
|
3208
|
+
</script>
|
3209
|
+
|
3210
|
+
|
3211
|
+
<script>
|
3212
|
+
try {
|
3213
|
+
// https://web.dev/content-visibility/
|
3214
|
+
// https://www.caniuse.com/?search=content-visibility
|
3215
|
+
// https://infrequently.org/2020/12/content-visibility-scroll-fix/
|
3216
|
+
// https://infrequently.org/2020/12/resize-resilient-deferred-rendering/
|
3217
|
+
|
3218
|
+
// 备注 目前已知的问题:
|
3219
|
+
// 动态修改导致的内容高度变化(例如评论框异步渲染的外部盒子高度变化) 无法提前获知, 进而导致的首次滚动条跳动无法去除 (wontfix) 事实上不使用 content-visibility 也会有跳动, 不过是比使用 content-visibility 跳动提前
|
3220
|
+
// scrollreveal 插件潜在问题 目前尚不明确
|
3221
|
+
|
3222
|
+
let eqIsh = (a, b, fuzz = 2) => {
|
3223
|
+
return Math.abs(a - b) <= fuzz;
|
3224
|
+
};
|
3225
|
+
|
3226
|
+
let rectNotEQ = (a, b) => {
|
3227
|
+
return !eqIsh(a.width, b.width) || !eqIsh(a.height, b.height);
|
3228
|
+
};
|
3229
|
+
|
3230
|
+
// Keep a map of elements and the dimensions of
|
3231
|
+
// their place-holders, re-setting the element's
|
3232
|
+
// intrinsic size when we get updated measurements
|
3233
|
+
// from observers.
|
3234
|
+
let spaced = new WeakMap();
|
3235
|
+
|
3236
|
+
// Only call this when known cheap, post layout
|
3237
|
+
let reserveSpace = (el, rect = el.getClientBoundingRect()) => {
|
3238
|
+
let old = spaced.get(el);
|
3239
|
+
// Set intrinsic size to prevent jumping on un-painting:
|
3240
|
+
// https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override
|
3241
|
+
if (!old || rectNotEQ(old, rect)) {
|
3242
|
+
spaced.set(el, rect);
|
3243
|
+
el.style["contain-intrinsic-size"] = `${rect.width}px ${rect.height}px`;
|
3244
|
+
}
|
3245
|
+
};
|
3246
|
+
|
3247
|
+
let iObs = new IntersectionObserver(
|
3248
|
+
(entries, o) => {
|
3249
|
+
entries.forEach((entry) => {
|
3250
|
+
// We don't care if the element is intersecting or
|
3251
|
+
// has been laid out as our page structure ensures
|
3252
|
+
// they'll get the right width.
|
3253
|
+
reserveSpace(entry.target, entry.boundingClientRect);
|
3254
|
+
});
|
3255
|
+
},
|
3256
|
+
{ rootMargin: "500px 0px 500px 0px" }
|
3257
|
+
);
|
3258
|
+
|
3259
|
+
let rObs = new ResizeObserver((entries, o) => {
|
3260
|
+
entries.forEach((entry) => {
|
3261
|
+
reserveSpace(entry.target, entry.contentRect);
|
3262
|
+
});
|
3263
|
+
});
|
3264
|
+
|
3265
|
+
let resizeResilientDeferredRendering = (Selector) => {
|
3266
|
+
let articles = document.querySelectorAll(Selector);
|
3267
|
+
|
3268
|
+
if (articles.length) {
|
3269
|
+
articles.forEach((el) => {
|
3270
|
+
iObs.observe(el);
|
3271
|
+
rObs.observe(el);
|
3272
|
+
});
|
3273
|
+
|
3274
|
+
// Workaround for Chrome bug, part 2.
|
3275
|
+
//
|
3276
|
+
// Re-enable browser management of rendering for the
|
3277
|
+
// first article after the first paint. Double-rAF
|
3278
|
+
// to ensure we get called after a layout.
|
3279
|
+
requestAnimationFrame(() => {
|
3280
|
+
requestAnimationFrame(() => {
|
3281
|
+
articles[0].style["content-visibility"] = "auto";
|
3282
|
+
});
|
3283
|
+
});
|
3284
|
+
}
|
3285
|
+
};
|
3286
|
+
|
3287
|
+
let contentVisibilityScrollFix = () => {
|
3288
|
+
if (!("content-visibility" in document.documentElement.style)) {
|
3289
|
+
return;
|
3290
|
+
}
|
3291
|
+
resizeResilientDeferredRendering(".post-story");
|
3292
|
+
};
|
3293
|
+
contentVisibilityScrollFix();
|
3294
|
+
volantis.pjax.push(contentVisibilityScrollFix);
|
3295
|
+
} catch (error) {
|
3296
|
+
console.log(error);
|
3297
|
+
}
|
3298
|
+
</script>
|
3299
|
+
|
3300
|
+
|
3301
|
+
|
3302
|
+
<script>
|
3303
|
+
document.onreadystatechange = function () {
|
3304
|
+
if (document.readyState == 'complete') {
|
3305
|
+
// 页面加载完毕 样式加载失败,或是当前网速慢,或是开启了省流模式
|
3306
|
+
const { saveData, effectiveType } = navigator.connection || navigator.mozConnection || navigator.webkitConnection || {}
|
3307
|
+
if (getComputedStyle(document.querySelector("#safearea"), null)["display"] == "none" || saveData || /2g/.test(effectiveType)) {
|
3308
|
+
document.querySelectorAll(".reveal").forEach(function (e) {
|
3309
|
+
e.style["opacity"] = "1";
|
3310
|
+
});
|
3311
|
+
document.querySelector("#safearea").style["display"] = "block";
|
3312
|
+
}
|
3313
|
+
}
|
3314
|
+
}
|
3315
|
+
</script>
|
3316
|
+
|
3317
|
+
|
3318
|
+
<script type="application/ld+json">[{"@context":"http://schema.org","@type":"Organization","name":"Village","url":"https://nanaeo.cn/","logo":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png","width":192,"height":192}},{"@context":"http://schema.org","@type":"Person","name":"Mlikiowa","image":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png"},"url":"https://nanaeo.cn/","sameAs":["https://github.com/volantis-x"],"description":"It is a little blog~"},{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"https://nanaeo.cn/","name":"Village"}},{"@type":"ListItem","position":2,"item":{"@id":"https://nanaeo.cn/categories/DevLog/","name":"DevLog"}},{"@type":"ListItem","position":3,"item":{"@id":"https://nanaeo.cn/2022/08/13/GaussWave/","name":"高斯滤波"}}]},{"@context":"http://schema.org","@type":"WebSite","name":"Village","url":"https://nanaeo.cn/","keywords":null,"description":"It is a little blog~","author":{"@type":"Person","name":"Mlikiowa","image":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png"},"url":"https://nanaeo.cn/","description":"It is a little blog~"},"publisher":{"@type":"Organization","name":"Village","url":"https://nanaeo.cn/","logo":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png","width":192,"height":192}},"potentialAction":{"@type":"SearchAction","name":"Site Search","target":{"@type":"EntryPoint","urlTemplate":"https://nanaeo.cn?s={search_term_string}"},"query-input":"required name=search_term_string"}},{"@context":"http://schema.org","@type":"BlogPosting","headline":"高斯滤波","description":"高斯滤波的实现","inLanguage":["zh-CN","en","default"],"mainEntityOfPage":{"@type":"WebPage","@id":"https://nanaeo.cn/2022/08/13/GaussWave/"},"author":{"@type":"Person","name":"Mlikiowa","image":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png"},"url":"https://nanaeo.cn/"},"publisher":{"@type":"Organization","name":"Village","logo":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png","width":192,"height":192}},"url":"https://nanaeo.cn/2022/08/13/GaussWave/","wordCount":7,"datePublished":"2022-08-13T16:00:00.000Z","dateModified":"2023-12-19T06:33:48.885Z","articleSection":"DevLog","keywords":"DevLog,Gauss","image":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png","width":192,"height":192}}]</script>
|
3319
|
+
|
3320
|
+
|
3321
|
+
|
3322
|
+
|
3323
|
+
<!--
|
3324
|
+
pjax重载区域接口:
|
3325
|
+
1. <pjax></pjax> 标签 pjax 标签必须存在于所有页面 否则 pjax error
|
3326
|
+
2. script[data-pjax]
|
3327
|
+
3. .pjax-reload script
|
3328
|
+
4. .pjax
|
3329
|
+
-->
|
3330
|
+
|
3331
|
+
|
3332
|
+
|
3333
|
+
<script src="https://fastly.jsdelivr.net/npm/volantis-static/libs/pjax/pjax.min.js"></script>
|
3334
|
+
|
3335
|
+
|
3336
|
+
<script>
|
3337
|
+
var pjax;
|
3338
|
+
document.addEventListener('DOMContentLoaded', function () {
|
3339
|
+
pjax = new Pjax({
|
3340
|
+
elements: 'a[href]:not([href^="#"]):not([href="javascript:void(0)"]):not([pjax-fancybox]):not([onclick="return false;"]):not([onclick="return!1"]):not([target="_blank"]):not([target="view_window"]):not([href$=".xml"])',
|
3341
|
+
selectors: [
|
3342
|
+
"head title",
|
3343
|
+
"head meta[name=keywords]",
|
3344
|
+
"head meta[name=description]",
|
3345
|
+
|
3346
|
+
"#l_main",
|
3347
|
+
"#pjax-header-nav-list",
|
3348
|
+
".pjax",
|
3349
|
+
"pjax", // <pjax></pjax> 标签
|
3350
|
+
"script[data-pjax], .pjax-reload script" // script标签添加data-pjax 或 script标签外层添加.pjax-reload 的script代码段重载
|
3351
|
+
],
|
3352
|
+
cacheBust: false, // url 地址追加时间戳,用以避免浏览器缓存
|
3353
|
+
timeout: 5000,
|
3354
|
+
|
3355
|
+
});
|
3356
|
+
});
|
3357
|
+
|
3358
|
+
document.addEventListener('pjax:send', function (e) {
|
3359
|
+
//window.stop(); // 相当于点击了浏览器的停止按钮
|
3360
|
+
|
3361
|
+
try {
|
3362
|
+
var currentUrl = window.location.pathname;
|
3363
|
+
var targetUrl = e.triggerElement.href;
|
3364
|
+
var banUrl = [""];
|
3365
|
+
if (banUrl[0] != "") {
|
3366
|
+
banUrl.forEach(item => {
|
3367
|
+
if(currentUrl.indexOf(item) != -1 || targetUrl.indexOf(item) != -1) {
|
3368
|
+
window.location.href = targetUrl;
|
3369
|
+
}
|
3370
|
+
});
|
3371
|
+
}
|
3372
|
+
} catch (error) {}
|
3373
|
+
|
3374
|
+
// 使用 volantis.pjax.send 方法传入pjax:send回调函数 参见layout/_partial/scripts/global.ejs
|
3375
|
+
volantis.pjax.method.send.start();
|
3376
|
+
});
|
3377
|
+
|
3378
|
+
document.addEventListener('pjax:complete', function () {
|
3379
|
+
// 使用 volantis.pjax.push 方法传入重载函数 参见layout/_partial/scripts/global.ejs
|
3380
|
+
volantis.pjax.method.complete.start();
|
3381
|
+
});
|
3382
|
+
|
3383
|
+
document.addEventListener('pjax:error', function (e) {
|
3384
|
+
if(volantis.debug) {
|
3385
|
+
console.error(e);
|
3386
|
+
console.log('pjax error: \n' + JSON.stringify(e));
|
3387
|
+
}else{
|
3388
|
+
// 使用 volantis.pjax.error 方法传入pjax:error回调函数 参见layout/_partial/scripts/global.ejs
|
3389
|
+
volantis.pjax.method.error.start();
|
3390
|
+
window.location.href = e.triggerElement.href;
|
3391
|
+
}
|
3392
|
+
});
|
3393
|
+
</script>
|
3394
|
+
|
3395
|
+
|
3396
|
+
</div>
|
3397
|
+
<!-- import body_end begin-->
|
3398
|
+
<script data-pjax async src="https://ackee.nanaeo.cn/tracker.js" data-ackee-server="https://ackee.nanaeo.cn" data-ackee-domain-id="3e94aa30-5cea-4f2b-9ec6-c0178d3beb0c"></script>
|
3399
|
+
<script>"serviceWorker"in navigator&&navigator.serviceWorker.register("/volantis-sw.js").then(function(n){n.onupdatefound=function(){var e=n.installing;e.onstatechange=function(){switch(e.state){case"installed":navigator.serviceWorker.controller?console.log("Updated serviceWorker."):console.log("serviceWorker Sucess!");break;case"redundant":console.log("The installing service worker became redundant.")}}}}).catch(function(e){console.log("Error during service worker registration:",e)}); </script>
|
3400
|
+
<!-- import body_end end-->
|
3401
|
+
<!-- Custom Files bodyEnd begin-->
|
3402
|
+
|
3403
|
+
<!-- Custom Files bodyEnd end-->
|
3404
|
+
<!-- front-matter body_end begin -->
|
3405
|
+
<!-- front-matter body_end end -->
|
3406
|
+
</body>
|
3407
|
+
</html>
|