Skip to content

Commit 511a000

Browse files
committed
Site updated: 2017-05-04 15:57:26
1 parent 880ba9e commit 511a000

File tree

63 files changed

+3431
-1393
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+3431
-1393
lines changed

2017/04/10/Jwt-介绍/index.html

+47-19
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77

8-
<html class="theme-next mist use-motion" lang="zh-Hans">
8+
<html class="theme-next pisces use-motion" lang="zh-Hans">
99
<head>
1010
<meta charset="UTF-8"/>
1111
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
@@ -111,7 +111,7 @@
111111
var NexT = window.NexT || {};
112112
var CONFIG = {
113113
root: '/',
114-
scheme: 'Mist',
114+
scheme: 'Pisces',
115115
sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":true,"scrollpercent":true},
116116
fancybox: true,
117117
motion: true,
@@ -341,14 +341,7 @@ <h1 class="site-subtitle" itemprop="description">爱生活、爱技术、积极
341341

342342

343343

344-
<h2 class="post-title" itemprop="name headline">
345-
346-
347-
348-
Jwt 介绍
349-
350-
351-
</h2>
344+
<h2 class="post-title" itemprop="name headline">Jwt 介绍</h2>
352345

353346

354347
<div class="post-meta">
@@ -742,7 +735,7 @@ <h1 id="为什么要使用JWT?"><a href="#为什么要使用JWT?" class="hea
742735
<div class="theme-info">
743736
主题 -
744737
<a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
745-
NexT.Mist
738+
NexT.Pisces
746739
</a>
747740
</div>
748741

@@ -803,6 +796,8 @@ <h1 id="为什么要使用JWT?"><a href="#为什么要使用JWT?" class="hea
803796

804797

805798

799+
800+
806801

807802

808803

@@ -824,6 +819,9 @@ <h1 id="为什么要使用JWT?"><a href="#为什么要使用JWT?" class="hea
824819

825820
<script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
826821

822+
823+
<script type="text/javascript" src="/lib/canvas-ribbon/canvas-ribbon.js"></script>
824+
827825

828826

829827

@@ -837,6 +835,13 @@ <h1 id="为什么要使用JWT?"><a href="#为什么要使用JWT?" class="hea
837835

838836

839837

838+
839+
<script type="text/javascript" src="/js/src/affix.js?v=5.1.0"></script>
840+
841+
<script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.0"></script>
842+
843+
844+
840845

841846
<script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
842847
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>
@@ -904,10 +909,13 @@ <h1 id="为什么要使用JWT?"><a href="#为什么要使用JWT?" class="hea
904909
<script type="text/javascript">
905910
// Popup Window;
906911
var isfetched = false;
912+
var isXml = true;
907913
// Search DB path;
908914
var search_path = "";
909915
if (search_path.length === 0) {
910916
search_path = "search.xml";
917+
} else if (search_path.endsWith("json")) {
918+
isXml = false;
911919
}
912920
var path = "/" + search_path;
913921
// monitor main search box;
@@ -927,27 +935,41 @@ <h1 id="为什么要使用JWT?"><a href="#为什么要使用JWT?" class="hea
927935
.css('overflow', 'hidden');
928936
$('.search-popup-overlay').click(onPopupClose);
929937
$('.popup').toggle();
930-
$('#local-search-input').focus();
938+
var $localSearchInput = $('#local-search-input');
939+
$localSearchInput.attr("autocapitalize", "none");
940+
$localSearchInput.attr("autocorrect", "off");
941+
$localSearchInput.focus();
931942
}
932943

933944
// search function;
934945
var searchFunc = function(path, search_id, content_id) {
935946
'use strict';
947+
948+
// start loading animation
949+
$("body")
950+
.append('<div class="search-popup-overlay local-search-pop-overlay">' +
951+
'<div id="search-loading-icon">' +
952+
'<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
953+
'</div>' +
954+
'</div>')
955+
.css('overflow', 'hidden');
956+
$("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');
957+
936958
$.ajax({
937959
url: path,
938-
dataType: "xml",
960+
dataType: isXml ? "xml" : "json",
939961
async: true,
940-
success: function( xmlResponse ) {
962+
success: function(res) {
941963
// get the contents from search data
942964
isfetched = true;
943965
$('.popup').detach().appendTo('.header-inner');
944-
var datas = $( "entry", xmlResponse ).map(function() {
966+
var datas = isXml ? $("entry", res).map(function() {
945967
return {
946-
title: $( "title", this ).text(),
968+
title: $("title", this).text(),
947969
content: $("content",this).text(),
948-
url: $( "url" , this).text()
970+
url: $("url" , this).text()
949971
};
950-
}).get();
972+
}).get() : res;
951973
var input = document.getElementById(search_id);
952974
var resultContent = document.getElementById(content_id);
953975
var inputEventFunction = function() {
@@ -1168,9 +1190,15 @@ <h1 id="为什么要使用JWT?"><a href="#为什么要使用JWT?" class="hea
11681190
}
11691191
});
11701192
}
1193+
1194+
// remove loading animation
1195+
$(".local-search-pop-overlay").remove();
1196+
$('body').css('overflow', '');
1197+
11711198
proceedsearch();
11721199
}
1173-
});}
1200+
});
1201+
}
11741202

11751203
// handle and trigger popup window;
11761204
$('.popup-trigger').click(function(e) {

2017/04/11/kafka-介绍/index.html

+47-19
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77

8-
<html class="theme-next mist use-motion" lang="zh-Hans">
8+
<html class="theme-next pisces use-motion" lang="zh-Hans">
99
<head>
1010
<meta charset="UTF-8"/>
1111
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
@@ -115,7 +115,7 @@
115115
var NexT = window.NexT || {};
116116
var CONFIG = {
117117
root: '/',
118-
scheme: 'Mist',
118+
scheme: 'Pisces',
119119
sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":true,"scrollpercent":true},
120120
fancybox: true,
121121
motion: true,
@@ -345,14 +345,7 @@ <h1 class="site-subtitle" itemprop="description">爱生活、爱技术、积极
345345

346346

347347

348-
<h2 class="post-title" itemprop="name headline">
349-
350-
351-
352-
kafka 介绍
353-
354-
355-
</h2>
348+
<h2 class="post-title" itemprop="name headline">kafka 介绍</h2>
356349

357350

358351
<div class="post-meta">
@@ -847,7 +840,7 @@ <h3 id="kafka-流处理"><a href="#kafka-流处理" class="headerlink" title="ka
847840
<div class="theme-info">
848841
主题 -
849842
<a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
850-
NexT.Mist
843+
NexT.Pisces
851844
</a>
852845
</div>
853846

@@ -908,6 +901,8 @@ <h3 id="kafka-流处理"><a href="#kafka-流处理" class="headerlink" title="ka
908901

909902

910903

904+
905+
911906

912907

913908

@@ -929,6 +924,9 @@ <h3 id="kafka-流处理"><a href="#kafka-流处理" class="headerlink" title="ka
929924

930925
<script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
931926

927+
928+
<script type="text/javascript" src="/lib/canvas-ribbon/canvas-ribbon.js"></script>
929+
932930

933931

934932

@@ -942,6 +940,13 @@ <h3 id="kafka-流处理"><a href="#kafka-流处理" class="headerlink" title="ka
942940

943941

944942

943+
944+
<script type="text/javascript" src="/js/src/affix.js?v=5.1.0"></script>
945+
946+
<script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.0"></script>
947+
948+
949+
945950

946951
<script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
947952
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>
@@ -1009,10 +1014,13 @@ <h3 id="kafka-流处理"><a href="#kafka-流处理" class="headerlink" title="ka
10091014
<script type="text/javascript">
10101015
// Popup Window;
10111016
var isfetched = false;
1017+
var isXml = true;
10121018
// Search DB path;
10131019
var search_path = "";
10141020
if (search_path.length === 0) {
10151021
search_path = "search.xml";
1022+
} else if (search_path.endsWith("json")) {
1023+
isXml = false;
10161024
}
10171025
var path = "/" + search_path;
10181026
// monitor main search box;
@@ -1032,27 +1040,41 @@ <h3 id="kafka-流处理"><a href="#kafka-流处理" class="headerlink" title="ka
10321040
.css('overflow', 'hidden');
10331041
$('.search-popup-overlay').click(onPopupClose);
10341042
$('.popup').toggle();
1035-
$('#local-search-input').focus();
1043+
var $localSearchInput = $('#local-search-input');
1044+
$localSearchInput.attr("autocapitalize", "none");
1045+
$localSearchInput.attr("autocorrect", "off");
1046+
$localSearchInput.focus();
10361047
}
10371048

10381049
// search function;
10391050
var searchFunc = function(path, search_id, content_id) {
10401051
'use strict';
1052+
1053+
// start loading animation
1054+
$("body")
1055+
.append('<div class="search-popup-overlay local-search-pop-overlay">' +
1056+
'<div id="search-loading-icon">' +
1057+
'<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
1058+
'</div>' +
1059+
'</div>')
1060+
.css('overflow', 'hidden');
1061+
$("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');
1062+
10411063
$.ajax({
10421064
url: path,
1043-
dataType: "xml",
1065+
dataType: isXml ? "xml" : "json",
10441066
async: true,
1045-
success: function( xmlResponse ) {
1067+
success: function(res) {
10461068
// get the contents from search data
10471069
isfetched = true;
10481070
$('.popup').detach().appendTo('.header-inner');
1049-
var datas = $( "entry", xmlResponse ).map(function() {
1071+
var datas = isXml ? $("entry", res).map(function() {
10501072
return {
1051-
title: $( "title", this ).text(),
1073+
title: $("title", this).text(),
10521074
content: $("content",this).text(),
1053-
url: $( "url" , this).text()
1075+
url: $("url" , this).text()
10541076
};
1055-
}).get();
1077+
}).get() : res;
10561078
var input = document.getElementById(search_id);
10571079
var resultContent = document.getElementById(content_id);
10581080
var inputEventFunction = function() {
@@ -1273,9 +1295,15 @@ <h3 id="kafka-流处理"><a href="#kafka-流处理" class="headerlink" title="ka
12731295
}
12741296
});
12751297
}
1298+
1299+
// remove loading animation
1300+
$(".local-search-pop-overlay").remove();
1301+
$('body').css('overflow', '');
1302+
12761303
proceedsearch();
12771304
}
1278-
});}
1305+
});
1306+
}
12791307

12801308
// handle and trigger popup window;
12811309
$('.popup-trigger').click(function(e) {

0 commit comments

Comments
 (0)