-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
346 lines (322 loc) · 35.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>一叶扁舟</title><meta name="author" content="Viking"><meta name="copyright" content="Viking"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="实践是检验真理的唯一标准">
<meta property="og:type" content="website">
<meta property="og:title" content="一叶扁舟">
<meta property="og:url" content="https://vark.fun/index.html">
<meta property="og:site_name" content="一叶扁舟">
<meta property="og:description" content="实践是检验真理的唯一标准">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://avatars.githubusercontent.com/u/27732503?v=4">
<meta property="article:author" content="Viking">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://avatars.githubusercontent.com/u/27732503?v=4"><link rel="shortcut icon" href="/img/weblogo.png"><link rel="canonical" href="https://vark.fun/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
root: '/',
algolia: undefined,
localSearch: undefined,
translate: undefined,
noticeOutdate: undefined,
highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
copy: {
success: '复制成功',
error: '复制错误',
noSupport: '浏览器不支持'
},
relativeDate: {
homepage: false,
post: false
},
runtime: '天',
date_suffix: {
just: '刚刚',
min: '分钟前',
hour: '小时前',
day: '天前',
month: '个月前'
},
copyright: undefined,
lightbox: 'fancybox',
Snackbar: undefined,
source: {
jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
justifiedGallery: {
js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
},
fancybox: {
js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
}
},
isPhotoFigcaption: false,
islazyload: false,
isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
title: '一叶扁舟',
isPost: false,
isHome: true,
isHighlightShrink: false,
isToc: false,
postUpdate: '2022-08-04 15:03:19'
}</script><noscript><style type="text/css">
#nav {
opacity: 1
}
.justified-gallery img {
opacity: 1
}
#recent-posts time,
#post-meta time {
display: inline !important
}
</style></noscript><script>(win=>{
win.saveToLocal = {
set: function setWithExpiry(key, value, ttl) {
if (ttl === 0) return
const now = new Date()
const expiryDay = ttl * 86400000
const item = {
value: value,
expiry: now.getTime() + expiryDay,
}
localStorage.setItem(key, JSON.stringify(item))
},
get: function getWithExpiry(key) {
const itemStr = localStorage.getItem(key)
if (!itemStr) {
return undefined
}
const item = JSON.parse(itemStr)
const now = new Date()
if (now.getTime() > item.expiry) {
localStorage.removeItem(key)
return undefined
}
return item.value
}
}
win.getScript = url => new Promise((resolve, reject) => {
const script = document.createElement('script')
script.src = url
script.async = true
script.onerror = reject
script.onload = script.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
script.onload = script.onreadystatechange = null
resolve()
}
document.head.appendChild(script)
})
win.activateDarkMode = function () {
document.documentElement.setAttribute('data-theme', 'dark')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
}
}
win.activateLightMode = function () {
document.documentElement.setAttribute('data-theme', 'light')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
}
}
const t = saveToLocal.get('theme')
if (t === 'dark') activateDarkMode()
else if (t === 'light') activateLightMode()
const asideStatus = saveToLocal.get('aside-status')
if (asideStatus !== undefined) {
if (asideStatus === 'hide') {
document.documentElement.classList.add('hide-aside')
} else {
document.documentElement.classList.remove('hide-aside')
}
}
})(window)</script><link rel="stylesheet" href="/css/custom.css" media="defer" onload="this.media='all'"><!-- hexo injector head_end start --><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Zfour/[email protected]/clock.css"><!-- hexo injector head_end end --><meta name="generator" content="Hexo 5.4.0"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="wizard-scene"><div class="wizard-objects"><div class="wizard-square"></div><div class="wizard-circle"></div><div class="wizard-triangle"></div></div><div class="wizard"><div class="wizard-body"></div><div class="wizard-right-arm"><div class="wizard-right-hand"></div></div><div class="wizard-left-arm"><div class="wizard-left-hand"></div></div><div class="wizard-head"><div class="wizard-beard"></div><div class="wizard-face"><div class="wizard-adds"></div></div><div class="wizard-hat"><div class="wizard-hat-of-the-hat"></div><div class="wizard-four-point-star --first"></div><div class="wizard-four-point-star --second"></div><div class="wizard-four-point-star --third"></div></div></div></div></div></div><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="author-avatar"><img class="avatar-img" src="https://avatars.githubusercontent.com/u/27732503?v=4" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">文章</div><div class="length-num">5</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">标签</div><div class="length-num">8</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 个人</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> 电影</span></a></li><li><a class="site-page child" href="/games/"><i class="fa-fw fas fa-gamepad"></i><span> 游戏</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友情链接</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background-image: url('https://cdn.jsdelivr.net/gh/Viking602/viking602.github.io@master/img/71303816_p0.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">一叶扁舟</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 个人</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> 电影</span></a></li><li><a class="site-page child" href="/games/"><i class="fa-fw fas fa-gamepad"></i><span> 游戏</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友情链接</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">一叶扁舟</h1><div id="site-subtitle"><span id="subtitle"></span></div><div id="site_social_icons"><a class="social-icon" href="https://github.com/Viking602" target="_blank" title=""><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:[email protected]" target="_blank" title=""><i class="fas fa-envelope"></i></a></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item wow animate__zoomIn"><div class="post_cover left_radius"><a href="/2021/06/24/hello-world/" title="Hello World"> <img class="post_bg" src="https://cdn.jsdelivr.net/gh/Viking602/viking602.github.io@master/img/79008828_p0.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Hello World"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/06/24/hello-world/" title="Hello World">Hello World</a><div class="article-meta-wrap"><span class="article-meta"><i class="fas fa-thumbtack sticky"></i><span class="sticky">置顶</span><span class="article-meta__separator">|</span></span><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2021-06-24T08:56:38.000Z" title="发表于 2021-06-24 16:56:38">2021-06-24</time></span></div><div class="content">0x00欢迎光临!这里是本站第一篇文章!
0x01简短介绍搬砖人一枚,这里将会分享一些自己学习或者工作中一些知识~希望能对你有帮助!
0x02本站说明本站目前采用的是 Hexo框架 + Github托管,cloudflare作为CDN,部分静态资源使用jsdelivr~ 主题目前采用的是Butterfly 3.7.8 加上一部分的修改。(文章部分封面以及topImg都是仓鼠太太的图哦~ https://www.pixiv.net/users/333556 这里可以找到~!)
</div></div></div><div class="recent-post-item wow animate__zoomIn"><div class="post_cover right_radius"><a href="/2021/06/26/Hexo-Jenkins%E6%8C%81%E7%BB%AD%E6%9E%84%E5%BB%BA/" title="记一次Jenkins持续构建Hexo"> <img class="post_bg" src="https://cdn.jsdelivr.net/gh/Viking602/viking602.github.io@master/img/71471901_p0.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="记一次Jenkins持续构建Hexo"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/06/26/Hexo-Jenkins%E6%8C%81%E7%BB%AD%E6%9E%84%E5%BB%BA/" title="记一次Jenkins持续构建Hexo">记一次Jenkins持续构建Hexo</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2021-06-25T17:11:07.000Z" title="发表于 2021-06-26 01:11:07">2021-06-26</time></span></div><div class="content">前言这两天看到不少用github actions、travis-c 等,各种持续构建教程了,本文是针对Jenkins做持续构建的一次记录,这里就不对hexo安装以及Jenkins安装说太多了~
提交你的Hexo代码到Github进入你的hexo目录下运行以下命令12345git initgit add .git commit -m "first commit"git remote add origin '仓库名称'git push -u origin master # 注意现在github默认仓库名称已经变成的main
BLOG根目录新建一个 .gitignore输入以下内容文件内的目录及文件则不会随着push上传
12345678910.DS_StoreThumbs.dbdb.json*.lognode_modules/public/.deploy*/.deploy_git*/.ideathemes/butterfly/.github
在Github新建一个tokenGithub Token页面点击箭头处新增一个token选择权限 选择repo ...</div></div></div><div class="recent-post-item wow animate__zoomIn"><div class="post_cover left_radius"><a href="/2021/06/25/Windows11-TPM/" title="技嘉BIOS开启TPM支持"> <img class="post_bg" src="https://cdn.jsdelivr.net/gh/Viking602/viking602.github.io@master/img/66858660_p0.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="技嘉BIOS开启TPM支持"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/06/25/Windows11-TPM/" title="技嘉BIOS开启TPM支持">技嘉BIOS开启TPM支持</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2021-06-25T06:12:17.000Z" title="发表于 2021-06-25 14:12:17">2021-06-25</time></span></div><div class="content">前言北京时间2021年6月25日早些时候微软发布了全新一代操作系统Windows11(虽然之前说Windows10是最后一个版本…)。这次Windows11与以往不同的是安装需要支持TPM2.0,大概研究了一下大部分主板是不带TPM芯片而仅仅是预留了接口,但是较新的CPU是自带TPM的,所以在主板BIOS里也就可以开启TPM的支持
技嘉x570主板开启方法(AMD)开机进入BIOS进入BIOS之后 选择到 SettingsSettings 下有一个Miscellaneous
选择Miscellaneous并进入进入 Miscellaneous 之后可以看到一个选项AMD CPU fTPM 这个选项默认是关闭的状态这里选择打开 就可以了
其他安全启动开机进入到BIOS后选择到 BOOT 有一个 CSM 需要把它关闭才可以选择下面的安全启动
微软放出的CPU支持列表AMD 最低为Zen3Intel 最低为8代酷睿高通
结束以上都开启之后打开Windows 安全中心 设备安全性就可以看两个选项已经完全开启
</div></div></div><div class="recent-post-item wow animate__zoomIn"><div class="post_cover right_radius"><a href="/2021/06/24/Python-delfile/" title="Python清理一段时间之前的文件"> <img class="post_bg" src="https://cdn.jsdelivr.net/gh/Viking602/viking602.github.io@master/img/66858660_p0.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Python清理一段时间之前的文件"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/06/24/Python-delfile/" title="Python清理一段时间之前的文件">Python清理一段时间之前的文件</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2021-06-24T12:56:38.000Z" title="发表于 2021-06-24 20:56:38">2021-06-24</time></span></div><div class="content">前言前几天发现自己硬盘快满了,查了一下发现是QQ的图片,也不知道为什么QQ自带的扫描扫不到他这个图片,全删了又怕影响到现在刚收到的图片,就写了个脚本来定向清理这个文件夹下面一段时期之前的图片。
代码如下123456789101112131415161718192021222324252627282930import osimport timeimport datetimepath = '这里输入目录'today = datetime.datetime.today()fileday = datetime.timedelta(days=30) # 此处设置文件删除天数day = today - filedaydef del_file(): count = 0 for root, dirs, files in os.walk(path): for filename in files: file = os.path.join(root, filename) timestamp = os.path.g ...</div></div></div><div class="recent-post-item wow animate__zoomIn"><div class="post_cover left_radius"><a href="/2021/06/24/hexo-github/" title="Hexo部署Github绑定个人域名"> <img class="post_bg" src="https://cdn.jsdelivr.net/gh/Viking602/viking602.github.io@master/img/79008828_p0.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Hexo部署Github绑定个人域名"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/06/24/hexo-github/" title="Hexo部署Github绑定个人域名">Hexo部署Github绑定个人域名</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2021-06-24T11:56:38.000Z" title="发表于 2021-06-24 19:56:38">2021-06-24</time></span></div><div class="content">Github绑定域名设置一条CNAME首先需要把自己需要绑定的域名设置一条CNAME记录到 你的用户名.github.io
Github设置绑定域名在github选择自己的项目 → Settings → Pages 按下图操作即可
另外此处遇到的一个坑就是 每次hexo d更新项目后域名绑定失效问题
以下为配置方法请在/BLOG/source/目录下新建CNAME文件内容仅填写自己的域名即可此处设置完成后控制台重新输入 hexo g 在看public文件夹会多一个CNAME文件这时候在操作hexo deploy CNAME文件就会上传到github github会根据这个文件来检查域名的DNS设置
</div></div></div><nav id="pagination"><div class="pagination"><span class="page-number current">1</span></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="card-info-avatar is-center"><img class="avatar-img" src="https://avatars.githubusercontent.com/u/27732503?v=4" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/><div class="author-info__name">Viking</div><div class="author-info__description">实践是检验真理的唯一标准</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">5</div></a></div><div class="card-info-data-item is-center"><a href="/tags/"><div class="headline">标签</div><div class="length-num">8</div></a></div></div><a class="button--animated" id="card-info-btn" href="mailto:[email protected]"><i class="fas fa-envelope"></i><span>联系我</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/Viking602" target="_blank" title=""><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:[email protected]" target="_blank" title=""><i class="fas fa-envelope"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">随缘发点没什么用的东西~</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2021/06/26/Hexo-Jenkins%E6%8C%81%E7%BB%AD%E6%9E%84%E5%BB%BA/" title="记一次Jenkins持续构建Hexo"><img src="https://cdn.jsdelivr.net/gh/Viking602/viking602.github.io@master/img/71471901_p0.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="记一次Jenkins持续构建Hexo"/></a><div class="content"><a class="title" href="/2021/06/26/Hexo-Jenkins%E6%8C%81%E7%BB%AD%E6%9E%84%E5%BB%BA/" title="记一次Jenkins持续构建Hexo">记一次Jenkins持续构建Hexo</a><time datetime="2021-06-25T17:11:07.000Z" title="发表于 2021-06-26 01:11:07">2021-06-26</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/06/25/Windows11-TPM/" title="技嘉BIOS开启TPM支持"><img src="https://cdn.jsdelivr.net/gh/Viking602/viking602.github.io@master/img/66858660_p0.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="技嘉BIOS开启TPM支持"/></a><div class="content"><a class="title" href="/2021/06/25/Windows11-TPM/" title="技嘉BIOS开启TPM支持">技嘉BIOS开启TPM支持</a><time datetime="2021-06-25T06:12:17.000Z" title="发表于 2021-06-25 14:12:17">2021-06-25</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/06/24/Python-delfile/" title="Python清理一段时间之前的文件"><img src="https://cdn.jsdelivr.net/gh/Viking602/viking602.github.io@master/img/66858660_p0.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Python清理一段时间之前的文件"/></a><div class="content"><a class="title" href="/2021/06/24/Python-delfile/" title="Python清理一段时间之前的文件">Python清理一段时间之前的文件</a><time datetime="2021-06-24T12:56:38.000Z" title="发表于 2021-06-24 20:56:38">2021-06-24</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/06/24/hexo-github/" title="Hexo部署Github绑定个人域名"><img src="https://cdn.jsdelivr.net/gh/Viking602/viking602.github.io@master/img/79008828_p0.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Hexo部署Github绑定个人域名"/></a><div class="content"><a class="title" href="/2021/06/24/hexo-github/" title="Hexo部署Github绑定个人域名">Hexo部署Github绑定个人域名</a><time datetime="2021-06-24T11:56:38.000Z" title="发表于 2021-06-24 19:56:38">2021-06-24</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/06/24/hello-world/" title="Hello World"><img src="https://cdn.jsdelivr.net/gh/Viking602/viking602.github.io@master/img/79008828_p0.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Hello World"/></a><div class="content"><a class="title" href="/2021/06/24/hello-world/" title="Hello World">Hello World</a><time datetime="2021-06-24T08:56:38.000Z" title="发表于 2021-06-24 16:56:38">2021-06-24</time></div></div></div></div><div class="card-widget" id="card-newest-comments"><div class="item-headline"><i class="fas fa-bolt"></i><span>最新评论</span></div><div class="aside-list"><span>正在加载中...</span></div></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/tags/Github/" style="font-size: 1.1em; color: #999">Github</a> <a href="/tags/Hexo/" style="font-size: 1.5em; color: #99a9bf">Hexo</a> <a href="/tags/Jenkins/" style="font-size: 1.1em; color: #999">Jenkins</a> <a href="/tags/Python/" style="font-size: 1.1em; color: #999">Python</a> <a href="/tags/TPM/" style="font-size: 1.1em; color: #999">TPM</a> <a href="/tags/Windows/" style="font-size: 1.1em; color: #999">Windows</a> <a href="/tags/%E5%85%B3%E4%BA%8E/" style="font-size: 1.1em; color: #999">关于</a> <a href="/tags/%E8%BF%90%E7%BB%B4/" style="font-size: 1.1em; color: #999">运维</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/06/"><span class="card-archive-list-date">六月 2021</span><span class="card-archive-list-count">5</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">5</div></div><div class="webinfo-item"><div class="item-name">已运行时间 :</div><div class="item-count" id="runtimeshow" data-publishDate="2021-06-22T16:00:00.000Z"></div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2022-08-04T07:03:19.100Z"></div></div></div></div></div></div></main><footer id="footer" style="background-image: url('https://cdn.jsdelivr.net/gh/Viking602/viking602.github.io@master/img/71303816_p0.jpg')"><div id="footer-wrap"><div class="copyright">©2020 - 2022 By Viking</div><br />
<a target="_blank" href="https://hexo.io" title="由Hexo强力驱动"><img src="https://img.shields.io/badge/Frame-Hexo-blue?style=flat&logo=hexo"></a>
<a target="_blank" href="https://github.com/jerryc127/hexo-theme-butterfly" title="主题使用Butterfly 3.7.8"><img src="https://img.shields.io/badge/Theme-Butterfly-6513df?style=flat&logo=bitdefender"></a>
<a target="_blank" href="https://www.jsdelivr.com/" title="本站采用jsDelivr为静态资源提供加速"><img src="https://img.shields.io/badge/CDN-jsDelivr-orange?style=flat&logo=jsDelivr"></a>
<a target="_blank" href="https://github.com/" title="本站项目托管于Github"><img src="https://img.shields.io/badge/Source-Github-d021d6?style=flat&logo=GitHub"></a>
<a target="_blank" href="https://creativecommons.org/licenses/by-nc-sa/4.0/" title="本站采用知识共享署名-非商业性使用-相同方式共享4.0国际许可协议进行许可"><img src="https://img.shields.io/badge/Copyright-BY--NC--SA%204.0-d42328?style=flat&logo=Claris"></a>
<br />
<a target="_blank" href="https://beian.miit.gov.cn/">黑ICP备2021004373号</a></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/instant.page/instantpage.min.js" type="module"></script><script>var preloader = {
endLoading: () => {
document.body.style.overflow = 'auto';
document.getElementById('loading-box').classList.add("loaded")
},
initLoading: () => {
document.body.style.overflow = '';
document.getElementById('loading-box').classList.remove("loaded")
}
}
window.addEventListener('load',preloader.endLoading())</script><div class="js-pjax"><script>function subtitleType () {
fetch('https://v1.hitokoto.cn')
.then(response => response.json())
.then(data => {
if (true) {
var from = '出自 ' + data.from
var sub = "".length == 0 ? new Array() : "".split(',')
var both = sub.unshift(data.hitokoto, from)
var typed = new Typed('#subtitle', {
strings: sub,
startDelay: 300,
typeSpeed: 150,
loop: false,
backSpeed: 50,
})
} else {
document.getElementById('subtitle').innerHTML = data.hitokoto
}
})
}
if (true) {
if (typeof Typed === 'function') {
subtitleType()
} else {
getScript('https://cdn.jsdelivr.net/npm/typed.js/lib/typed.min.js').then(subtitleType)
}
} else {
subtitleType()
}
</script></div><script src="https://cdn.jsdelivr.net/npm/[email protected]/js/md5.min.js"></script><script>window.addEventListener('load', () => {
const changeContent = (content) => {
if (content === '') return content
content = content.replace(/<img.*?src="(.*?)"?[^\>]+>/ig, '[图片]') // replace image link
content = content.replace(/<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, '[链接]') // replace url
content = content.replace(/<pre><code>.*?<\/pre>/gi, '[代码]') // replace code
content = content.replace(/<[^>]+>/g,"") // remove html tag
if (content.length > 150) {
content = content.substring(0,150) + '...'
}
return content
}
const getIcon = (icon, mail) => {
if (icon) return icon
let defaultIcon = '?d=monsterid'
let iconUrl = `https://gravatar.loli.net/avatar/${md5(mail.toLowerCase()) + defaultIcon}`
return iconUrl
}
const generateHtml = array => {
let result = ''
if (array.length) {
for (let i = 0; i < array.length; i++) {
result += '<div class=\'aside-list-item\'>'
if (true) {
const name = 'src'
result += `<a href='${array[i].url}' class='thumbnail'><img ${name}='${array[i].avatar}' alt='${array[i].nick}'></a>`
}
result += `<div class='content'>
<a class='comment' href='${array[i].url}'>${array[i].content}</a>
<div class='name'><span>${array[i].nick} / </span><time datetime="${array[i].date}">${btf.diffDate(array[i].date, true)}</time></div>
</div></div>`
}
} else {
result += '没有评论'
}
let $dom = document.querySelector('#card-newest-comments .aside-list')
$dom.innerHTML= result
window.lazyLoadInstance && window.lazyLoadInstance.update()
window.pjax && window.pjax.refresh($dom)
}
const getComment = () => {
const serverURL = 'https://xac0svc6.lc-cn-n1-shared.com'
var settings = {
"method": "GET",
"headers": {
"X-LC-Id": 'xaC0svC6RfOg0zJv4cy2534x-gzGzoHsz',
"X-LC-Key": 'RaFYXiaSLGcHAWKeuEHznCJj',
"Content-Type": "application/json"
},
}
fetch(`${serverURL}/1.1/classes/Comment?limit=6&order=-createdAt`,settings)
.then(response => response.json())
.then(data => {
const valineArray = data.results.map(function (e) {
return {
'avatar': getIcon(e.QQAvatar, e.mail),
'content': changeContent(e.comment),
'nick': e.nick,
'url': e.url + '#' + e.objectId,
'date': e.updatedAt,
}
})
saveToLocal.set('valine-newest-comments', JSON.stringify(valineArray), 10/(60*24))
generateHtml(valineArray)
}).catch(e => {
const $dom = document.querySelector('#card-newest-comments .aside-list')
$dom.innerHTML= "无法获取评论,请确认相关配置是否正确"
})
}
const newestCommentInit = () => {
if (document.querySelector('#card-newest-comments .aside-list')) {
const data = saveToLocal.get('valine-newest-comments')
if (data) {
generateHtml(JSON.parse(data))
} else {
getComment()
}
}
}
newestCommentInit()
document.addEventListener('pjax:complete', newestCommentInit)
})</script><script async src="//at.alicdn.com/t/font_2264842_3izu8i5eoc2.js"></script><script async src="//at.alicdn.com/t/font_2632203_pyid6u4p54i.js"></script><script defer="defer" id="ribbon" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-ribbon.min.js" size="150" alpha="0.6" zIndex="-1" mobile="true" data-click="false"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div class="pjax-reload"><script async="async">var arr = document.getElementsByClassName('recent-post-item');
for(var i = 0;i<arr.length;i++){
arr[i].classList.add('wow');
arr[i].classList.add('animate__zoomIn');
arr[i].setAttribute('data-wow-duration', '2s');
arr[i].setAttribute('data-wow-delay', '1s');
arr[i].setAttribute('data-wow-offset', '100');
arr[i].setAttribute('data-wow-iteration', '2');
}</script><script async="async">var arr = document.getElementsByClassName('card-widget');
for(var i = 0;i<arr.length;i++){
arr[i].classList.add('wow');
arr[i].classList.add('animate__zoomIn');
arr[i].setAttribute('data-wow-duration', '');
arr[i].setAttribute('data-wow-delay', '');
arr[i].setAttribute('data-wow-offset', '');
arr[i].setAttribute('data-wow-iteration', '');
}</script></div><script defer="defer" src="/"></script><script defer="defer" src="/"></script></div><!-- hexo injector body_end start -->
<script data-pjax src="https://cdn.jsdelivr.net/gh/Zfour/[email protected]/hexo_githubcalendar.js"></script>
<script data-pjax>
function GithubCalendarConfig(){
var git_githubapiurl ="https://python-github-calendar-api.vercel.app/api?Viking602";
var git_color =['#ebedf0', '#fdcdec', '#fc9bd9', '#fa6ac5', '#f838b2', '#f5089f', '#c4067e', '#92055e', '#540336', '#48022f', '#30021f'];
var git_user ="Viking602";
var parent_div_git = document.getElementById('recent-posts');
var git_div_html = '<div class="recent-post-item" style="width:100%;height:auto;padding:10px;"><div id="github_loading" style="width:10%;height:100%;margin:0 auto;display: block"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50" xml:space="preserve"><path fill="#d0d0d0" d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z" transform="rotate(275.098 25 25)"><animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite"></animateTransform></path></svg></div><div id="github_container"></div></div>';
if(parent_div_git && location.pathname =='/'){
console.log('已挂载github calendar')
// parent_div_git.innerHTML=git_div_html+parent_div_git.innerHTML // 无报错,但不影响使用(支持pjax跳转)
parent_div_git.insertAdjacentHTML("afterbegin",git_div_html) // 有报错,但不影响使用(支持pjax跳转)
};
GithubCalendar(git_githubapiurl,git_color,git_user)
}
if(document.getElementById('recent-posts')){
GithubCalendarConfig()
}
</script>
<style>#github_container{min-height:280px}@media screen and (max-width:650px) {#github_container{background-image:;min-height:0px}}</style>
<style></style><script data-pjax>function electric_clock_injector_config(){
var parent_div_git = document.getElementsByClassName('sticky_layout')[0];
var item_html = '<div class="card-widget card-clock"><div class="card-glass"><div class="card-background"><div class="card-content"><div id="hexo_electric_clock"><img id="card-clock-loading" src="https://cdn.jsdelivr.net/gh/Zfour/Butterfly-clock/clock/images/weather/loading.gif" style="height: 120px; width: 100%;" data-ll-status="loading" class="entered loading"></div></div></div></div></div>';
console.log('已挂载electric_clock')
// parent_div_git.innerHTML=item_html+parent_div_git.innerHTML // 无报错,但不影响使用(支持pjax跳转)
parent_div_git.insertAdjacentHTML("afterbegin",item_html) // 有报错,但不影响使用(支持pjax跳转)
}if( document.getElementsByClassName('sticky_layout')[0] && (location.pathname ==='all'|| 'all' ==='all')){
electric_clock_injector_config()
} </script><script src="https://pv.sohu.com/cityjson?ie=utf-8"></script><script data-pjax src="https://cdn.jsdelivr.net/gh/Zfour/[email protected]/clock.js"></script><!-- hexo injector body_end end --></body></html>