-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
653 lines (497 loc) · 21.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
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
<!DOCTYPE html>
<html lang="en">
<!-- Head tag -->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="孙广君的个人博客CodeHub">
<meta name="keyword" content="codehub,blog">
<meta name="theme-color" content="#600090">
<meta name="msapplication-navbutton-color" content="#600090">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="#600090">
<link rel="manifest" href="/manifest.json">
<link rel="shortcut icon" href="http://file.codehub.com.cn/codehub.ico">
<link rel="alternate" type="application/atom+xml" title="CodeHub" href="/atom.xml">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.css">
<title>
CodeHub
</title>
<link rel="canonical" href="http://craryprimitiveman.github.io/">
<!-- Bootstrap Core CSS -->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="/css/blog-style.css">
<!-- Pygments Github CSS -->
<link rel="stylesheet" href="/css/syntax.css">
</head>
<style>
header.intro-header {
background-image: url('//o7bkkhiex.bkt.clouddn.com/lion-blur-bg.jpg')
}
</style>
<!-- hack iOS CSS :active style -->
<body ontouchstart="" class="animated fadeIn">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-custom navbar-fixed-top " id="nav-top" data-ispost = "false" data-istags="false
" data-ishome = "true" >
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header page-scroll">
<button type="button" class="navbar-toggle">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand animated pulse" href="/">
<span class="brand-logo">
CodeHub
</span>
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<!-- Known Issue, found by Hux:
<nav>'s height woule be hold on by its content.
so, when navbar scale out, the <nav> will cover tags.
also mask any touch event of tags, unfortunately.
-->
<!-- /.navbar-collapse -->
<div id="huxblog_navbar">
<div class="navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="/">Home</a>
</li>
<li>
<a href="/tags/">Tags</a>
</li>
</ul>
</div>
</div>
</div>
<!-- /.container -->
</nav>
<script>
// Drop Bootstarp low-performance Navbar
// Use customize navbar with high-quality material design animation
// in high-perf jank-free CSS3 implementation
// var $body = document.body;
var $toggle = document.querySelector('.navbar-toggle');
var $navbar = document.querySelector('#huxblog_navbar');
var $collapse = document.querySelector('.navbar-collapse');
$toggle.addEventListener('click', handleMagic)
function handleMagic(e){
if ($navbar.className.indexOf('in') > 0) {
// CLOSE
$navbar.className = " ";
// wait until animation end.
setTimeout(function(){
// prevent frequently toggle
if($navbar.className.indexOf('in') < 0) {
$collapse.style.height = "0px"
}
},400)
}else{
// OPEN
$collapse.style.height = "auto"
$navbar.className += " in";
}
}
</script>
<!-- Main Content -->
<style>
.custom-haojen-container .post-preview:nth-of-type(1),
.custom-haojen-container .post-preview-poetry:nth-of-type(1) {
text-align: center;
background-repeat: no-repeat;
border-radius: 3px;
background-size: cover;
padding: 0;
height: 300px;
display: table;
width: 100%;
background-color: rgba(0, 0, 0, 0.16);
}
/*去掉诗歌的背景图片*/
.custom-haojen-container .post-preview-poetry:nth-of-type(1) {
background-image: none !important;
background-color: rgba(255, 248, 220, 0.5);
}
.custom-haojen-container .post-preview:nth-child(1) h2,
.custom-haojen-container .post-preview:nth-child(1) .post-meta,
.custom-haojen-container .post-preview:nth-child(1) .post-subtitle {
text-shadow: 0 0 40px rgba(0, 0, 0, 1);
letter-spacing: 1px;
color: #fff;
margin-top: 0;
padding-left: 60px;
padding-right: 60px;
}
.custom-haojen-container .post-preview:nth-child(1) .post-meta {
font-size: .9em;
font-weight: 300;
margin-top: 0;
}
.custom-haojen-container .post-preview-poetry:nth-child(1) .post-subtitle {
letter-spacing: 6px;
font-size: 18px;
font-family: unset;
font-weight: 400;
color: rgba(0, 0, 0, .75)
}
/*不显示摘要*/
.custom-haojen-container .post-preview:nth-child(1) .post-content-preview {
display: none
}
/*只第一个显示背景图片*/
.custom-haojen-container .post-preview:not(:nth-child(1)) {
background-image: none !important;
}
/*第一个分界线去掉*/
.custom-haojen-container hr:nth-of-type(1) {
display: none;
}
/*主题*/
.custom-haojen-container .post-preview:nth-of-type(1) > a {
display: table-cell;
vertical-align: middle;
}
/*诗词标题*/
.custom-haojen-container .post-preview-poetry:nth-child(1) h2 {
font-size: 35px;
font-family: STKaiti;
color: rgba(0, 0, 0, .8);
}
.custom-haojen-container .post-preview-poetry:nth-of-type(1) .post-meta {
color: #0e2231;
}
@media (max-width: 768px) {
.custom-haojen-container .post-preview:nth-child(1) {
height: 240px;
}
.custom-haojen-container .post-preview-poetry:nth-child(1) h2 {
font-size: 28px !important;
margin-top: 0;
}
.custom-haojen-container .post-preview:nth-child(1) .post-subtitle {
font-size: 18px;
font-weight: 400;
padding-left: 0;
padding-right: 0;
}
.custom-haojen-container .post-preview:nth-of-type(1) > a {
padding: 20px
}
}
/*手机屏幕*/
@media (max-width: 400px) {
.custom-haojen-container .post-preview:nth-child(1) {
height: 195px;
}
.custom-haojen-container .post-preview-poetry:nth-child(1) h2 {
font-size: 20px !important;
}
.custom-haojen-container .post-preview:nth-child(1) .post-subtitle {
font-size: 16px;
}
.custom-haojen-container .post-preview:nth-child(1) a {
padding: 30px 20px;
}
}
</style>
<!-- Page Header -->
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 visible-xs-block visible-sm-block">
<div class="row">
<header class="intro-header">
<div class="container">
<div class="site-heading text-center">
<div class="about-me">
<!--移动端头部显示-->
<img src="http://file.codehub.com.cn/blog/avatar.jpeg"/>
<h5><a href="/about/">孙广君</a></h5>
<p>Talk is cheaper, show me the code.</p>
</div>
</div>
</div>
</header>
</div>
</div>
<!-- Main Content -->
<div class="container custom-haojen-container">
<!-- Post Container -->
<div class="row">
<div class="col-lg-8 col-lg-offset-1 col-md-8 col-md-offset-1 col-sm-12 col-xs-12 post-container">
<!-- Main Content -->
<div class="post-preview "
style="background-image: url('http://file.codehub.com.cn/blog/slide.jpg')">
<a href="/2018/04/golang-grace-restart/">
<h2 class="post-title">
Golang学习--平滑重启
</h2>
<p class="post-meta">
<i class="fa fa-calendar" aria-hidden="true"></i> 2018-04-05
</p>
<div class="post-content-preview">
<p>
在上一篇博客介绍TOML配置的时候,讲到了通过信号通知重载配置。我们在这一篇中介绍下如何的平滑重启server。
与重载配置相同的是我们也需要通过信号来通知server重启,但关键在于平滑重启,如果只是简单的重启,只需要kill掉,然后再拉起即可。平滑重启意味着server升级的时候可以不用停止..
</p>
</div>
</a>
</div>
<hr>
<div class="post-preview "
style="background-image: url('http://file.codehub.com.cn/blog/slide.jpg')">
<a href="/2017/12/golang-toml/">
<h2 class="post-title">
Golang学习--TOML配置处理
</h2>
<p class="post-meta">
<i class="fa fa-calendar" aria-hidden="true"></i> 2017-12-23
</p>
<div class="post-content-preview">
<p>
上一篇文章中我们学会了使用包管理工具,这样我们就可以很方便的使用包管理工具来管理我们依赖的包。
配置工具的选择但我们又遇到了一个问题,一个项目通常是有很多配置的,比如PHP的php.ini文件、Nginx的server.conf文件,那么Golang的项目又适合使用怎样的配置文件呢?
其实现在我..
</p>
</div>
</a>
</div>
<hr>
<div class="post-preview "
style="background-image: url('http://file.codehub.com.cn/blog/slide.jpg')">
<a href="/2017/12/golang-glide/">
<h2 class="post-title">
Golang学习--包管理工具glide
</h2>
<p class="post-meta">
<i class="fa fa-calendar" aria-hidden="true"></i> 2017-12-14
</p>
<div class="post-content-preview">
<p>
上一篇文章中我们已经成功的运行了go的代码,这是我们迈出的最基础的一步。
一个项目通常会依赖很多外部的库,当依赖的库比较多的时候,手工管理就会比较麻烦,这个时候就需要包管理工具出场了,帮你管理好所有依赖的库。
php项目中使用composer,javascript项目中使用npm,那么在go项目..
</p>
</div>
</a>
</div>
<hr>
<div class="post-preview "
style="background-image: url('http://file.codehub.com.cn/blog/slide.jpg')">
<a href="/2017/11/golang-start/">
<h2 class="post-title">
Golang学习--开篇
</h2>
<p class="post-meta">
<i class="fa fa-calendar" aria-hidden="true"></i> 2017-11-16
</p>
<div class="post-content-preview">
<p>
最近开始接收一个新项目,是使用Golang写的,需要重新捡起Golang来,于是就有了这个系列博客。
Golang的环境配置,我就不说了,让我们直接开始。
Golang官网:https://golang.orgGolang标准库文档:https://golang.org/pkgGolang中文标..
</p>
</div>
</a>
</div>
<hr>
<div class="post-preview "
style="background-image: url('http://file.codehub.com.cn/blog/slide.jpg')">
<a href="/2017/09/hello-world/">
<h2 class="post-title">
Hello World
</h2>
<p class="post-meta">
<i class="fa fa-calendar" aria-hidden="true"></i> 2017-09-22
</p>
<div class="post-content-preview">
<p>
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer i..
</p>
</div>
</a>
</div>
<hr>
<!-- 翻页 pager -->
<ul class="pager">
</ul>
</div>
<!-- Sidebar Container -->
<div class="
col-lg-3 col-lg-offset-0
col-md-3 col-md-offset-0
col-sm-12
col-xs-12
sidebar-container
">
<!-- About Me -->
<section class="visible-md visible-lg" style="padding: 0 18px">
<div class="short-about">
<!--侧边栏头像-->
<img src="http://file.codehub.com.cn/blog/avatar.jpeg"/>
<h5><a href="/about/">孙广君</a></h5>
<p>Talk is cheaper, show me the code.</p>
<hr>
<!-- SNS Link 社交 -->
<ul class="list-inline">
<li>
<a target="_blank" href="https://www.zhihu.com/people/sun-yan-jun-59">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-stack-1x fa-inverse">知</i>
</span>
</a>
</li>
<li>
<a target="_blank" href="http://weibo.com/1666866202">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-weibo fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li>
<a target="_blank" href="https://www.facebook.com/100003468474677">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li>
<a target="_blank" href="https://github.com/craryprimitiveman">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
</ul>
</div>
</section>
<!-- Featured Tags 标签 -->
<section>
<div class="tags">
<a href="/tags/#Golang" title="Golang"
rel="4">Golang</a>
</div>
</section>
<hr>
<h5 style="text-align: center;">友情链接</h5>
<ul class="list-inline" style="text-align: center;">
<li><a href="http://www.cnblogs.com/CraryPrimitiveMan/" target="_blank">博客园博客</a></li>
</ul>
</div>
</div>
</div>
<!-- Footer -->
<!-- Footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 text-center">
<br>
<ul class="list-inline text-center">
<li>
<a target="_blank" href="https://www.zhihu.com/people/sun-yan-jun-59">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-stack-1x fa-inverse">知</i>
</span>
</a>
</li>
<li>
<a target="_blank" href="http://weibo.com/1666866202">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-weibo fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li>
<a target="_blank" href="https://www.facebook.com/100003468474677">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li>
<a target="_blank" href="https://github.com/craryprimitiveman">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
</ul>
<p class="copyright text-muted">
Copyright © CodeHub Inc. All Rights Reserved
</br>
沪ICP备17038991号
</p>
<p class="copyright text-muted"></p>
</div>
</div>
</div>
</footer>
<!-- jQuery -->
<script src="/js/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="/js/bootstrap.min.js"></script>
<!-- Custom Theme JavaScript -->
<script src="/js/blog.js"></script>
<!-- async load function -->
<script>
function async(u, c) {
var d = document, t = 'script',
o = d.createElement(t),
s = d.getElementsByTagName(t)[0];
o.src = u;
if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
s.parentNode.insertBefore(o, s);
}
</script>
<!-- jquery.tagcloud.js -->
<script>
// only load tagcloud.js in tag.html
if($('#tag_cloud').length !== 0){
async("http://craryprimitiveman.github.io/js/jquery.tagcloud.js",function(){
$.fn.tagcloud.defaults = {
//size: {start: 1, end: 1, unit: 'em'},
color: {start: '#bbbbee', end: '#0085a1'},
};
$('#tag_cloud a').tagcloud();
})
}
</script>
<!--fastClick.js -->
<script>
async("//cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js", function(){
var $nav = document.querySelector("nav");
if($nav) FastClick.attach($nav);
})
</script>
<!-- Google Analytics -->
<!-- Baidu Tongji -->
<!-- swiftype -->
<script type="text/javascript">
(function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){
(w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t);
e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e);
})(window,document,'script','//s.swiftypecdn.com/install/v2/st.js','_st');
_st('install','','2.0.0');
</script>
<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<!--wechat title img-->
<img class="wechat-title-img" src="http://file.codehub.com.cn/blog/avatar.jpeg">
<div align="center" style="display: none">
<img border="0" src="http://cc.amazingcounters.com/counter.php?i=3221323&c=9664282" alt="AmazingCounters.com">
</div>
<script>'use strict';'serviceWorker'in navigator&&navigator.serviceWorker.register('service-worker.js').then(function(a){a.onupdatefound=function(){var b=a.installing;b.onstatechange=function(){switch(b.state){case'installed':navigator.serviceWorker.controller?console.log('New or updated content is available.'):console.log('Content is now available offline!');break;case'redundant':console.error('The installing service worker became redundant.');}}}}).catch(function(a){console.error('Error during service worker registration:',a)});
</script></body></html>