Commit 3d8c8767 authored by Van's avatar Van

🐛 fix #10

parent 71498192
Util.htmlDecode=function(t){var e=document.createElement("div");return e.innerHTML=decodeURIComponent(t),e.innerText};var Admin=function(){this.register={},this.tools=["#page-list","#theme-list","#link-list","#preference","#user-list","#plugin-list","#others","#category-list"],this.adTools=["link-list","preference","theme-list","page-list","user-list","plugin-list","others","category-list"]};$.extend(Admin.prototype,{logout:function(){window.location.href=Label.servePath+"/logout"},toggleMenu:function(){"-240px"===$("#tabs").css("left")?($("#tabs").css("left",0),$(".tabs__bg").show()):($("#tabs").css("left","-240px"),$(".tabs__bg").hide())},clearTip:function(){$("#tipMsg").text(""),$("#loadMsg").text("")},setHashByPage:function(t){var e=window.location.hash.split("/");/^\d*$/.test(e[e.length-1])?e[e.length-1]=t:e.push(t),window.location.hash=e.join("/")},selectTab:function(t){window.location.hash="#"+t},analyseHash:function(){for(var t=window.location.hash,e=t.substr(1,t.length-1).split("/"),i={page:1,hashList:[]},a=0;a<e.length;a++)a===e.length-1&&/^\d+$/.test(e[a])?i.page=e[a]:i.hashList.push(e[a]);return i},setCurByHash:function(){$(window).scrollTop(0),$("#tipMsg").text("");var t=admin.analyseHash(),e=t.hashList[1],i=t.hashList[2];if(1===t.hashList.length&&(e=t.hashList[0]),""!==e){try{if(admin.editors.articleEditor.getContent){if("article"!==e&&admin.article.isConfirm&&""!==admin.editors.articleEditor.getContent().replace(/\s/g,"")&&admin.article.content!==admin.editors.articleEditor.getContent()&&!confirm(Label.editorLeaveLabel))return void(window.location.hash="#article/article");if("article"===e&&admin.article.isConfirm&&""!==admin.editors.articleEditor.getContent().replace(/\s/g,"")&&admin.article.content!==admin.editors.articleEditor.getContent())return}}catch(t){console.log(t)}"article"!==e&&admin.editors.articleEditor.setContent&&admin.article.clear(),admin.article.isConfirm=!0,$("#tabs").tabs("setCurrent",e),$("#loadMsg").text(Label.loadingLabel),1===$("#tabsPanel_"+e).length?""===$("#tabsPanel_"+e).html().replace(/\s/g,"")?$("#tabsPanel_"+e).load("admin-"+e+".do",(function(){"article"===e&&admin.article.status.id?admin.register[e].init.call(admin.register[e].obj,admin.article.getAndSet):admin.register[e].init.call(admin.register[e].obj,t.page),i&&$("#tab"+e.substring(0,1).toUpperCase()+e.substring(1)).tabs("setCurrent",i),admin.plugin.setCurByHash(t)})):("article"===e&&admin.article.status.id&&admin.article.getAndSet(),admin.register[e]&&admin.register[e].refresh&&admin.register[e].refresh.call(admin.register[e].obj,t.page),i&&$("#tab"+e.substring(0,1).toUpperCase()+e.substring(1)).tabs("setCurrent",i),admin.plugin.setCurByHash(t)):($("#tipMsg").text("Error: No tab! "+Label.reportIssueLabel),$("#loadMsg").text(""))}},init:function(){Util.killIE(),$("#loadMsg").text(Label.loadingLabel),$("#tabs").tabs(),setInterval((function(){""!==$("#tipMsg").text()&&setTimeout((function(){$("#tipMsg").text("")}),7e3)}),6e3),$("#loadMsg").text(""),window.onbeforeunload=function(t){if("#article/article"===window.location.hash)return t&&(t.returnValue=Label.editorLeaveLabel),Label.editorLeaveLabel},$(document).ajaxError((function(t,e,i,a){200!==e.status&&$("#tipMsg").text(e.status+": "+a)}))},collapseNav:function(t){$(t).next().slideToggle("normal",(function(){"none"!==this.style.display?($(t).find(".icon-chevron-down")[0].className="icon-chevron-up fn__right",$(t).addClass("tab-current")):($(t).find(".icon-chevron-up")[0].className="icon-chevron-down fn__right",$(t).removeClass("tab-current")),$("#tabs > ul").height("auto"),$("#tabs > ul").height($("#tabs > ul").height()+80)}))},inited:function(){if("adminRole"!==Label.userRole)for(var t=0;t<this.adTools.length;t++)$("#tabs").tabs("remove",this.adTools[t]);else for(var e=0;e<this.tools.length;e++)if("#"+window.location.hash.split("/")[1]===this.tools[e]){$("#tabToolsTitle").click();break}this.setCurByHash()}});var admin=new Admin;
admin.editors={};var SoloEditor=function(e){this.conf=e,this.init()};$.extend(SoloEditor.prototype,{init:function(){this.editor=new Vditor(this.conf.id,{typewriterMode:this.conf.typewriterMode,cache:!0,tab:"\t",preview:{delay:500,mode:this.conf.previewMode,url:Label.servePath+"/console/markdown/2html",hljs:{enable:!Label.luteAvailable,style:Label.hljsStyle},parse:function(e){"none"!==e.style.display&&Util.parseLanguage()}},upload:{max:10485760,url:Label.uploadURL,token:Label.uploadToken,filename:function(e){return e.replace(/[^(a-zA-Z0-9\u4e00-\u9fa5\.)]/g,"").replace(/[\?\\/:|<>\*\[\]\(\)\$%\{\}@~]/g,"").replace("/\\s/g","")}},height:this.conf.height,counter:102400,resize:{enable:this.conf.resize},lang:Label.localeString}),"function"==typeof this.conf.fun&&this.conf.fun()},getContent:function(){return this.editor.getValue()},setContent:function(e){this.editor.setValue(e)},remove:function(){document.getElementById(this.editor.vditor.id).outerHTML=""}}),admin.editors.articleEditor={},admin.editors.abstractEditor={};
var TablePaginate=function(a){this.id=a,this.currentPage=1};$.extend(TablePaginate.prototype,{buildTable:function(a,t){var e={colModel:a,noDataTip:Label.noDataLabel};t||(e.expendRow={index:"expendRow"}),$("#"+this.id+"Table").table(e)},initPagination:function(){var a=this.id;$("#"+a+"Pagination").paginate({bind:function(a,t){t?$("#tipMsg").text(t):admin.setHashByPage(a)},currentPage:1,errorMessage:Label.inputErrorLabel,nextPageText:">",previousPageText:"<",goText:Label.gotoLabel,type:"custom",custom:[1],pageCount:1})},initCommentsDialog:function(){var a=this;$("#"+this.id+"Comments").dialog({modal:!0,hideFooter:!0,close:function(){return admin[a.id+"List"].getList(a.currentPage),!0}})},updateTablePagination:function(a,t,e){if((t=parseInt(t))>e.paginationPageCount&&t>1)return $("#tipMsg").text(Label.pageLabel+t+Label.notFoundLabel),void $("#loadMsg").text("");$("#"+this.id+"Table").table("update",{data:[{groupName:"all",groupData:a}]}),0===e.paginationPageCount&&(e.paginationPageCount=1),$("#"+this.id+"Pagination").paginate("update",{pageCount:e.paginationPageCount,currentPage:t,custom:e.paginationPageNums}),this.currentPage=t}});
admin.article={isConfirm:!0,status:{id:void 0,isArticle:void 0},content:"",get:function(t,e){this.status.id=t,this.status.isArticle=e,admin.selectTab("article/article")},getAndSet:function(){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$.ajax({url:Label.servePath+"/console/article/"+admin.article.status.id,type:"GET",cache:!1,success:function(t,e){if($("#tipMsg").text(t.msg),t.sc){$("#title").val(t.article.articleTitle),admin.editors.articleEditor.setContent(t.article.articleContent),admin.editors.abstractEditor.setContent(t.article.articleAbstract),admin.article.content=admin.editors.articleEditor.getContent();for(var i=t.article.articleTags,a="",l=0;l<i.length;l++)0===l?a=i[l].tagTitle:a+=","+i[l].tagTitle;$("#tag").val(a),$("#permalink").val(t.article.articlePermalink),$("#viewPwd").val(t.article.articleViewPwd),$("#articleCommentable").prop("checked",t.article.articleCommentable);var s=t.article.signs;$(".signs button").each((function(e){parseInt(t.article.articleSignId)===parseInt(s[e].oId)?$("#articleSign"+s[e].oId).addClass("selected"):$("#articleSign"+s[e].oId).removeClass("selected")})),admin.article.setStatus(),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},del:function(t,e,i){confirm(Label.confirmRemoveLabel+Label.articleLabel+'"'+Util.htmlDecode(i)+'"?')&&($("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$.ajax({url:Label.servePath+"/console/article/"+t,type:"DELETE",cache:!1,success:function(t,i){$("#tipMsg").text(t.msg),t.sc?admin[e+"List"].getList(1):$("#loadMsg").text("")}}))},add:function(t){if(admin.article.validate()){var e=this;e._addDisabled(),$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var i="";$(".signs button").each((function(){"selected"===this.className&&(i=this.id.substr(this.id.length-1,1))}));var a=admin.editors.articleEditor.getContent(),l=admin.editors.abstractEditor.getContent();if($("#articleThumbnail").prop("checked")){var s=$(".thumbnail__img").css("background-image");a="![]("+s.substring(5,s.length-2).replace("w/768","w/960").replace("h/432","h/540")+")\n\n"+a}var c={article:{articleTitle:$("#title").val(),articleContent:a,articleAbstract:l,articleTags:this.trimUniqueArray($("#tag").val()).toString(),articlePermalink:$("#permalink").val(),articleStatus:t,articleSignId:i,postToCommunity:$("#postToCommunity").prop("checked"),articleCommentable:$("#articleCommentable").prop("checked"),articleViewPwd:$("#viewPwd").val()}};$.ajax({url:Label.servePath+"/console/article/",type:"POST",cache:!1,data:JSON.stringify(c),success:function(e){$("#tipMsg").text(e.msg),e.sc&&(admin.article.status.id=void 0,0===t?admin.selectTab("article/article-list"):admin.selectTab("article/draft-list"),admin.article.isConfirm=!1)},complete:function(t,i){e._removeDisabled(),$("#loadMsg").text("")}})}},update:function(t){if(admin.article.validate()){var e=this;e._addDisabled(),$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var i="";$(".signs button").each((function(){"selected"===this.className&&(i=this.id.substr(this.id.length-1,1))}));var a=admin.editors.articleEditor.getContent(),l=admin.editors.abstractEditor.getContent();if($("#articleThumbnail").prop("checked")){var s=$(".thumbnail__img").css("background-image");a="![]("+s.substring(5,s.length-2).replace("w/768","w/960").replace("h/432","h/540")+") \n\n"+a}var c={article:{oId:this.status.id,articleTitle:$("#title").val(),articleContent:a,articleAbstract:l,articleTags:this.trimUniqueArray($("#tag").val()).toString(),articlePermalink:$("#permalink").val(),articleStatus:t,articleSignId:i,articleCommentable:$("#articleCommentable").prop("checked"),articleViewPwd:$("#viewPwd").val(),postToCommunity:$("#postToCommunity").prop("checked")}};$.ajax({url:Label.servePath+"/console/article/",type:"PUT",cache:!1,data:JSON.stringify(c),success:function(e,i){$("#tipMsg").text(e.msg),e.sc&&(0===t?admin.selectTab("article/article-list"):admin.selectTab("article/draft-list"),$("#tipMsg").text(Label.updateSuccLabel),admin.article.status.id=void 0,admin.article.isConfirm=!1)},complete:function(t,i){e._removeDisabled(),$("#loadMsg").text("")}})}},setStatus:function(){$.ajax({url:Label.servePath+"/console/tags",type:"GET",cache:!1,success:function(t,e){if($("#tipMsg").text(t.msg),t.sc){if(!(0>=t.tags.length)){$("#tagCheckboxPanel>span").remove("");for(var i="",a=0;a<t.tags.length;a++)i+="<span>"+t.tags[a].tagTitle+"</span>";$("#tagCheckboxPanel").html(i+'<div class="fn__clear"></div>'),$("#loadMsg").text("")}}else $("#loadMsg").text("")}}),this.status?this.status.isArticle?($("#unSubmitArticle").show(),$("#saveArticle").hide(),$("#submitArticle").show()):($("#submitArticle").show(),$("#unSubmitArticle").hide(),$("#saveArticle").show()):($("#submitArticle").show(),$("#unSubmitArticle").hide(),$("#saveArticle").show(),$("#postToCommunityPanel").show())},clear:function(){this.status={id:void 0,isArticle:void 0},this.setStatus(),$("#title").val(""),admin.editors.articleEditor.setContent(""),admin.editors.abstractEditor.setContent(""),$("#tag").val(""),$("#tagCheckboxPanel").hide().find("span").removeClass("selected"),$("#permalink").val(""),$("#articleCammentable").prop("checked",!0),$("#postToCommunity").prop("checked",!1),$(".signs button").each((function(t){this.className=0===t?"selected":""})),$("#articleThumbnail").prop("checked")&&$("#articleThumbnail").click()},init:function(t){$(".signs button").click((function(t){$(".signs button").removeClass("selected"),$(this).addClass("selected")})),$("#tipMsg").text(Label.uploadMsg),$.ajax({url:Label.servePath+"/console/tags",type:"GET",cache:!1,success:function(t,e){if($("#tipMsg").text(t.msg),t.sc){if(!(0>=t.tags.length)){for(var i=[],a=0;a<t.tags.length;a++)i.push(t.tags[a].tagTitle);$("#tag").completed({height:160,buttonText:Label.selectLabel,data:i}),$("#loadMsg").text("")}}else $("#loadMsg").text("")}}),$("#submitArticle").click((function(){admin.article.status.id?admin.article.update(0):admin.article.add(0)})),$("#saveArticle").click((function(){admin.article.status.id?admin.article.update(admin.article.status.isArticle?0:1):admin.article.add(1)})),admin.editors.articleEditor=new SoloEditor({id:"articleContent",height:500,fun:t,previewMode:"both",resize:!1,typewriterMode:!0}),admin.editors.abstractEditor=new SoloEditor({id:"abstract",height:200,previewMode:"editor",resize:!0,typewriterMode:!1}),$("#articleThumbnailBtn").click((function(){$.ajax({url:Label.servePath+"/console/thumbs?n=1&w=768&h=432",type:"GET",cache:!1,success:function(t,e){t.sc?$("#articleThumbnailBtn").prev().css("background-image","url("+t.data[0]+")"):$("#loadMsg").text(t.msg)}})})).click()},validate:function(){var t=admin.editors.articleEditor.getContent();if(""===$("#title").val().replace(/\s/g,""))$("#tipMsg").text(Label.titleEmptyLabel),$("#title").focus().val("");else{if(""!==t.replace(/\s/g,""))return!0;$("#tipMsg").text(Label.contentEmptyLabel)}return!1},unPublish:function(){var t=this;t._addDisabled(),$.ajax({url:Label.servePath+"/console/article/unpublish/"+admin.article.status.id,type:"PUT",cache:!1,success:function(t,e){$("#tipMsg").text(t.msg),t.sc&&(admin.selectTab("article/draft-list"),admin.article.status.id=void 0,admin.article.isConfirm=!1)},complete:function(e,i){t._removeDisabled(),$("#loadMsg").text("")}})},trimUniqueArray:function(t){for(var e=(t=t.toString()).split(","),i=0;i<e.length;i++)e[i]=e[i].replace(/(^\s*)|(\s*$)/g,""),""===e[i]&&(e.splice(i,1),i--);return $.unique(e).toString()},prePost:function(){if($("#loadMsg").text(Label.loadingLabel),admin.article.content="",admin.editors.articleEditor.getContent){var t=admin.editors.articleEditor.getContent();"#article/article"===window.location.hash&&""!==t.replace(/\s/g,"")&&confirm(Label.editorPostLabel)&&admin.article.clear(),$("#tipMsg").text(""),$("#loadMsg").text("")}},_addDisabled:function(){$("#unSubmitArticle").attr("disabled","disabled"),$("#saveArticle").attr("disabled","disabled"),$("#submitArticle").attr("disabled","disabled")},_removeDisabled:function(){$("#unSubmitArticle").removeAttr("disabled"),$("#saveArticle").removeAttr("disabled"),$("#submitArticle").removeAttr("disabled")}},admin.register.article={obj:admin.article,init:admin.article.init,refresh:function(){admin.editors.abstractEditor.setContent(""),admin.editors.articleEditor.setContent(""),$("#loadMsg").text(""),$("#tipMsg").text(Label.uploadMsg)}};
admin.article={isConfirm:!0,status:{id:void 0,isArticle:void 0},content:"",get:function(t,e){this.status.id=t,this.status.isArticle=e,admin.selectTab("article/article")},getAndSet:function(){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$.ajax({url:Label.servePath+"/console/article/"+admin.article.status.id,type:"GET",cache:!1,success:function(t,e){if($("#tipMsg").text(t.msg),t.sc){$("#title").val(t.article.articleTitle),admin.editors.articleEditor.setContent(t.article.articleContent),admin.editors.abstractEditor.setContent(t.article.articleAbstract),admin.article.content=admin.editors.articleEditor.getContent();for(var i=t.article.articleTags,a="",l=0;l<i.length;l++)0===l?a=i[l].tagTitle:a+=","+i[l].tagTitle;$("#tag").val(a),$("#permalink").val(t.article.articlePermalink),$("#viewPwd").val(t.article.articleViewPwd),$("#articleCommentable").prop("checked",t.article.articleCommentable);var s=t.article.signs;$(".signs button").each((function(e){parseInt(t.article.articleSignId)===parseInt(s[e].oId)?$("#articleSign"+s[e].oId).addClass("selected"):$("#articleSign"+s[e].oId).removeClass("selected")})),admin.article.setStatus(),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},del:function(t,e,i){confirm(Label.confirmRemoveLabel+Label.articleLabel+'"'+Util.htmlDecode(i)+'"?')&&($("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$.ajax({url:Label.servePath+"/console/article/"+t,type:"DELETE",cache:!1,success:function(t,i){if($("#tipMsg").text(t.msg),t.sc)if(2===document.querySelectorAll("tr").length){const t=Math.max(admin[e+"List"].tablePagination.currentPage-1,1);admin[e+"List"].getList(t),admin.setHashByPage(t)}else admin[e+"List"].getList(admin[e+"List"].tablePagination.currentPage);else $("#loadMsg").text("")}}))},add:function(t){if(admin.article.validate()){var e=this;e._addDisabled(),$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var i="";$(".signs button").each((function(){"selected"===this.className&&(i=this.id.substr(this.id.length-1,1))}));var a=admin.editors.articleEditor.getContent(),l=admin.editors.abstractEditor.getContent();if($("#articleThumbnail").prop("checked")){var s=$(".thumbnail__img").css("background-image");a="![]("+s.substring(5,s.length-2).replace("w/768","w/960").replace("h/432","h/540")+")\n\n"+a}var r={article:{articleTitle:$("#title").val(),articleContent:a,articleAbstract:l,articleTags:this.trimUniqueArray($("#tag").val()).toString(),articlePermalink:$("#permalink").val(),articleStatus:t,articleSignId:i,postToCommunity:$("#postToCommunity").prop("checked"),articleCommentable:$("#articleCommentable").prop("checked"),articleViewPwd:$("#viewPwd").val()}};$.ajax({url:Label.servePath+"/console/article/",type:"POST",cache:!1,data:JSON.stringify(r),success:function(e){$("#tipMsg").text(e.msg),e.sc&&(admin.article.status.id=void 0,0===t?admin.selectTab("article/article-list"):admin.selectTab("article/draft-list"),admin.article.isConfirm=!1)},complete:function(t,i){e._removeDisabled(),$("#loadMsg").text("")}})}},update:function(t){if(admin.article.validate()){var e=this;e._addDisabled(),$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var i="";$(".signs button").each((function(){"selected"===this.className&&(i=this.id.substr(this.id.length-1,1))}));var a=admin.editors.articleEditor.getContent(),l=admin.editors.abstractEditor.getContent();if($("#articleThumbnail").prop("checked")){var s=$(".thumbnail__img").css("background-image");a="![]("+s.substring(5,s.length-2).replace("w/768","w/960").replace("h/432","h/540")+") \n\n"+a}var r={article:{oId:this.status.id,articleTitle:$("#title").val(),articleContent:a,articleAbstract:l,articleTags:this.trimUniqueArray($("#tag").val()).toString(),articlePermalink:$("#permalink").val(),articleStatus:t,articleSignId:i,articleCommentable:$("#articleCommentable").prop("checked"),articleViewPwd:$("#viewPwd").val(),postToCommunity:$("#postToCommunity").prop("checked")}};$.ajax({url:Label.servePath+"/console/article/",type:"PUT",cache:!1,data:JSON.stringify(r),success:function(e,i){$("#tipMsg").text(e.msg),e.sc&&(0===t?admin.selectTab("article/article-list"):admin.selectTab("article/draft-list"),$("#tipMsg").text(Label.updateSuccLabel),admin.article.status.id=void 0,admin.article.isConfirm=!1)},complete:function(t,i){e._removeDisabled(),$("#loadMsg").text("")}})}},setStatus:function(){$.ajax({url:Label.servePath+"/console/tags",type:"GET",cache:!1,success:function(t,e){if($("#tipMsg").text(t.msg),t.sc){if(!(0>=t.tags.length)){$("#tagCheckboxPanel>span").remove("");for(var i="",a=0;a<t.tags.length;a++)i+="<span>"+t.tags[a].tagTitle+"</span>";$("#tagCheckboxPanel").html(i+'<div class="fn__clear"></div>'),$("#loadMsg").text("")}}else $("#loadMsg").text("")}}),this.status?this.status.isArticle?($("#unSubmitArticle").show(),$("#saveArticle").hide(),$("#submitArticle").show()):($("#submitArticle").show(),$("#unSubmitArticle").hide(),$("#saveArticle").show()):($("#submitArticle").show(),$("#unSubmitArticle").hide(),$("#saveArticle").show(),$("#postToCommunityPanel").show())},clear:function(){this.status={id:void 0,isArticle:void 0},this.setStatus(),$("#title").val(""),admin.editors.articleEditor.setContent(""),admin.editors.abstractEditor.setContent(""),$("#tag").val(""),$("#tagCheckboxPanel").hide().find("span").removeClass("selected"),$("#permalink").val(""),$("#articleCammentable").prop("checked",!0),$("#postToCommunity").prop("checked",!1),$(".signs button").each((function(t){this.className=0===t?"selected":""})),$("#articleThumbnail").prop("checked")&&$("#articleThumbnail").click()},init:function(t){$(".signs button").click((function(t){$(".signs button").removeClass("selected"),$(this).addClass("selected")})),$("#tipMsg").text(Label.uploadMsg),$.ajax({url:Label.servePath+"/console/tags",type:"GET",cache:!1,success:function(t,e){if($("#tipMsg").text(t.msg),t.sc){if(!(0>=t.tags.length)){for(var i=[],a=0;a<t.tags.length;a++)i.push(t.tags[a].tagTitle);$("#tag").completed({height:160,buttonText:Label.selectLabel,data:i}),$("#loadMsg").text("")}}else $("#loadMsg").text("")}}),$("#submitArticle").click((function(){admin.article.status.id?admin.article.update(0):admin.article.add(0)})),$("#saveArticle").click((function(){admin.article.status.id?admin.article.update(admin.article.status.isArticle?0:1):admin.article.add(1)})),admin.editors.articleEditor=new SoloEditor({id:"articleContent",height:500,fun:t,previewMode:"both",resize:!1,typewriterMode:!0}),admin.editors.abstractEditor=new SoloEditor({id:"abstract",height:200,previewMode:"editor",resize:!0,typewriterMode:!1}),$("#articleThumbnailBtn").click((function(){$.ajax({url:Label.servePath+"/console/thumbs?n=1&w=768&h=432",type:"GET",cache:!1,success:function(t,e){t.sc?$("#articleThumbnailBtn").prev().css("background-image","url("+t.data[0]+")"):$("#loadMsg").text(t.msg)}})})).click()},validate:function(){var t=admin.editors.articleEditor.getContent();if(""===$("#title").val().replace(/\s/g,""))$("#tipMsg").text(Label.titleEmptyLabel),$("#title").focus().val("");else{if(""!==t.replace(/\s/g,""))return!0;$("#tipMsg").text(Label.contentEmptyLabel)}return!1},unPublish:function(){var t=this;t._addDisabled(),$.ajax({url:Label.servePath+"/console/article/unpublish/"+admin.article.status.id,type:"PUT",cache:!1,success:function(t,e){$("#tipMsg").text(t.msg),t.sc&&(admin.selectTab("article/draft-list"),admin.article.status.id=void 0,admin.article.isConfirm=!1)},complete:function(e,i){t._removeDisabled(),$("#loadMsg").text("")}})},trimUniqueArray:function(t){for(var e=(t=t.toString()).split(","),i=0;i<e.length;i++)e[i]=e[i].replace(/(^\s*)|(\s*$)/g,""),""===e[i]&&(e.splice(i,1),i--);return $.unique(e).toString()},prePost:function(){if($("#loadMsg").text(Label.loadingLabel),admin.article.content="",admin.editors.articleEditor.getContent){var t=admin.editors.articleEditor.getContent();"#article/article"===window.location.hash&&""!==t.replace(/\s/g,"")&&confirm(Label.editorPostLabel)&&admin.article.clear(),$("#tipMsg").text(""),$("#loadMsg").text("")}},_addDisabled:function(){$("#unSubmitArticle").attr("disabled","disabled"),$("#saveArticle").attr("disabled","disabled"),$("#submitArticle").attr("disabled","disabled")},_removeDisabled:function(){$("#unSubmitArticle").removeAttr("disabled"),$("#saveArticle").removeAttr("disabled"),$("#submitArticle").removeAttr("disabled")}},admin.register.article={obj:admin.article,init:admin.article.init,refresh:function(){admin.editors.abstractEditor.setContent(""),admin.editors.articleEditor.setContent(""),$("#loadMsg").text(""),$("#tipMsg").text(Label.uploadMsg)}};
admin.comment={open:function(e,t){this.getList(e,t),$("#"+t+"Comments").dialog("open")},getList:function(e,t){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text(""),$("#"+t+"Comments").html("");var a="article";"page"===t&&(a="page"),$.ajax({url:Label.servePath+"/console/comments/"+a+"/"+e,type:"GET",cache:!1,success:function(a,n){if($("#tipMsg").text(a.msg),a.sc){for(var m=a.comments,s="",o=0;o<m.length;o++){var l="<a target='_blank' href='"+m[o].commentURL+"'>",c=m[o].commentContent;"http://"===m[o].commentURL&&(l="<a target='_blank'>"),s+="<div class='comment-title'><span class='fn__left'>"+l+m[o].commentName+"</a>",m[o].commentOriginalCommentName&&(s+="@"+m[o].commentOriginalCommentName),s+="</span><a title='"+Label.removeLabel+"' class='fn__right fn__pointer' href=\"javascript:admin.comment.del('"+m[o].oId+"', '"+t+"', '"+e+"')\">"+Label.removeLabel+"</a><span class='fn__right'>&nbsp;&nbsp;"+$.bowknot.getDate(m[o].commentTime)+"&nbsp;</span><div class='fn__clear'></div></div><div class='vditor-reset'>"+c+"</div>"}""===s&&(s=Label.noCommentLabel),$("#"+t+"Comments").html(s),Util.parseMarkdown(),Util.parseLanguage(),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},del:function(e,t,a){if(confirm(Label.confirmRemoveLabel+Label.commentLabel+"?")){$("#loadMsg").text(Label.loadingLabel);var n="article";"page"===t&&(n="page"),$.ajax({url:Label.servePath+"/console/"+n+"/comment/"+e,type:"DELETE",cache:!1,success:function(e,n){$("#tipMsg").text(e.msg),e.sc?(admin.comment.getList(a,t),$("#loadMsg").text("")):$("#loadMsg").text("")}})}}};
admin.articleList={tablePagination:new TablePaginate("article"),init:function(t){this.tablePagination.buildTable([{text:Label.titleLabel,index:"title",minWidth:110,style:"padding-left: 12px;font-size:14px;"},{text:Label.authorLabel,index:"author",width:150,style:"padding-left: 12px;"},{text:Label.commentLabel,index:"comments",width:80,style:"padding-left: 12px;"},{text:Label.viewLabel,width:60,index:"articleViewCount",style:"padding-left: 12px;"},{text:Label.dateLabel,index:"date",width:90,style:"padding-left: 12px;"}]),this.tablePagination.initPagination(),this.tablePagination.initCommentsDialog(),this.getList(t);var e=this;$("#articleListBtn").click((function(){e.getList(t)})),$("#articleListInput").keypress((function(a){13===a.keyCode&&e.getList(t)}))},syncToHacpai:function(t){$.ajax({url:Label.servePath+"/console/article/push2rhy?id="+t,type:"GET",cache:!1,success:function(t,e){$("#tipMsg").text(Label.pushSuccLabel)}})},getList:function(t){var e=this;$("#loadMsg").text(Label.loadingLabel),$.ajax({url:Label.servePath+"/console/articles/status/published/"+t+"/"+Label.PAGE_SIZE+"/"+Label.WINDOW_SIZE+"?k="+$("#articleListInput").val(),type:"GET",cache:!1,success:function(a,i){if($("#tipMsg").text(a.msg),a.sc){for(var l=a.articles,n=[],c=0;c<l.length;c++){n[c]={},n[c].title='<a href="'+Label.servePath+l[c].articlePermalink+"\" target='_blank' title='"+l[c].articleTitle+"' class='no-underline'>"+l[c].articleTitle+"</a><span class='table-tag'>"+l[c].articleTags+"</span>",n[c].date=$.bowknot.getDate(l[c].articleCreateTime),n[c].comments=l[c].articleCommentCount,n[c].articleViewCount=l[c].articleViewCount,n[c].author=l[c].authorName;var o=l[c].articlePutTop?Label.cancelPutTopLabel:Label.putTopLabel;n[c].expendRow="<a href='javascript:void(0)' onclick=\"admin.article.get('"+l[c].oId+"', true)\">"+Label.updateLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.article.del('"+l[c].oId+"', 'article', '"+encodeURIComponent(l[c].articleTitle)+"')\">"+Label.removeLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.articleList.syncToHacpai('"+l[c].oId+"')\">"+Label.pushToHacpaiLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.articleList.popTop(this, '"+l[c].oId+"')\">"+o+"</a> <a href='javascript:void(0)' onclick=\"admin.comment.open('"+l[c].oId+"', 'article')\">"+Label.commentLabel+"</a>"}e.tablePagination.updateTablePagination(n,t,a.pagination),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},popTop:function(t,e){$("#loadMsg").text(Label.loadingLabel),$("#tipMsg").text("");var a=$(t),i="canceltop",l=Label.putTopLabel;a.html()===Label.putTopLabel&&(i="puttop",l=Label.cancelPutTopLabel),$.ajax({url:Label.servePath+"/console/article/"+i+"/"+e,type:"PUT",cache:!1,success:function(t,e){$("#tipMsg").text(t.msg),t.sc?(a.html(l),$("#loadMsg").text("")):$("#loadMsg").text("")}})}},admin.register["article-list"]={obj:admin.articleList,init:admin.articleList.init,refresh:admin.articleList.getList};
admin.draftList={tablePagination:new TablePaginate("draft"),init:function(t){this.tablePagination.buildTable([{text:Label.titleLabel,index:"title",minWidth:110,style:"padding-left: 12px;font-size:14px;"},{text:Label.authorLabel,index:"author",width:150,style:"padding-left: 12px;"},{text:Label.commentLabel,index:"comments",width:80,style:"padding-left: 12px;"},{text:Label.viewLabel,width:60,index:"articleViewCount",style:"padding-left: 12px;"},{text:Label.dateLabel,index:"date",width:90,style:"padding-left: 12px;"}]),this.tablePagination.initPagination(),this.tablePagination.initCommentsDialog(),this.getList(t)},getList:function(t){$("#loadMsg").text(Label.loadingLabel);var e=this;$.ajax({url:Label.servePath+"/console/articles/status/unpublished/"+t+"/"+Label.PAGE_SIZE+"/"+Label.WINDOW_SIZE,type:"GET",cache:!1,success:function(a,i){if($("#tipMsg").text(a.msg),a.sc){for(var l=a.articles,n=[],d=0;d<l.length;d++)n[d]={},n[d].tags=l[d].articleTags,n[d].date=$.bowknot.getDate(l[d].articleCreateTime),n[d].comments=l[d].articleCommentCount,n[d].articleViewCount=l[d].articleViewCount,n[d].author=l[d].authorName,n[d].title="<a class='no-underline' href='"+Label.servePath+l[d].articlePermalink+"' target='_blank'>"+l[d].articleTitle+"</a><span class='table-tag'>"+l[d].articleTags+"</span>",n[d].expendRow="<a href='javascript:void(0)' onclick=\"admin.article.get('"+l[d].oId+"', false);\">"+Label.updateLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.article.del('"+l[d].oId+"', 'draft', '"+encodeURIComponent(l[d].articleTitle)+"')\">"+Label.removeLabel+"</a> <a href='javascript:void(0)' onclick=\"admin.comment.open('"+l[d].oId+"', 'draft')\">"+Label.commentLabel+"</a>";e.tablePagination.updateTablePagination(n,t,a.pagination),$("#loadMsg").text("")}else $("#loadMsg").text("")}})}},admin.register["draft-list"]={obj:admin.draftList,init:admin.draftList.init,refresh:admin.draftList.getList};
......
......@@ -20,7 +20,7 @@
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.6.0.5, Aug 6, 2019
* @version 1.6.1.0, Dec 15, 2019
*/
admin.article = {
// 当发文章,取消发布,更新文章时设置为 false。不需在离开编辑器时进行提示。
......@@ -48,7 +48,7 @@ admin.article = {
$('#tipMsg').text('')
$.ajax({
url: Label.servePath + '/console/article/' +
admin.article.status.id,
admin.article.status.id,
type: 'GET',
cache: false,
success: function (result, textStatus) {
......@@ -121,7 +121,15 @@ admin.article = {
return
}
admin[fromId + 'List'].getList(1)
if (document.querySelectorAll('tr').length === 2) {
const refreshPage = Math.max(
(admin[fromId + 'List'].tablePagination.currentPage - 1), 1)
admin[fromId + 'List'].getList(refreshPage)
admin.setHashByPage(refreshPage)
} else {
admin[fromId + 'List'].getList(
admin[fromId + 'List'].tablePagination.currentPage)
}
},
})
}
......@@ -419,7 +427,7 @@ admin.article = {
fun: fun,
previewMode: 'both',
resize: false,
typewriterMode: true
typewriterMode: true,
})
admin.editors.abstractEditor = new SoloEditor({
......@@ -473,7 +481,7 @@ admin.article = {
that._addDisabled()
$.ajax({
url: Label.servePath + '/console/article/unpublish/' +
admin.article.status.id,
admin.article.status.id,
type: 'PUT',
cache: false,
success: function (result, textStatus) {
......
......@@ -43,9 +43,7 @@ $.extend(TablePaginate.prototype, {
}
}
$("#" + this.id + "Table").table(tableData);
},
/*
* 初始化分页
*/
......@@ -84,7 +82,7 @@ $.extend(TablePaginate.prototype, {
}
});
},
/*
* 更新 table & paginateion
*/
......@@ -101,11 +99,11 @@ $.extend(TablePaginate.prototype, {
groupData: data
}]
});
if (pageInfo.paginationPageCount === 0) {
pageInfo.paginationPageCount = 1;
}
$("#" + this.id + "Pagination").paginate("update", {
pageCount: pageInfo.paginationPageCount,
currentPage: currentPage,
......
.article__toc{overflow:auto}.article__toc::-webkit-scrollbar{display:none}.article__toc li{list-style-type:none}.article__toc li a{padding-left:10px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.article__toc li a:hover{text-decoration:none}.article__toc li.toc__h3 a{padding-left:20px}.article__toc li.toc__h4 a{padding-left:30px}.article__toc li.toc__h5 a{padding-left:40px}.user__site:hover{text-decoration:none}@-webkit-keyframes tooltip-appear{from{opacity:0}to{opacity:1}}@keyframes tooltip-appear{from{opacity:0}to{opacity:1}}.vditor-tooltipped{position:relative;cursor:pointer}.vditor-tooltipped::after{position:absolute;z-index:1000000;display:none;padding:5px 8px;font-size:11px;font-weight:normal;-webkit-font-smoothing:subpixel-antialiased;color:#fff;text-align:center;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:rgba(0,0,0,0.8);border-radius:3px;line-height:16px;opacity:0}.vditor-tooltipped::before{position:absolute;z-index:1000001;display:none;width:0;height:0;color:rgba(0,0,0,0.8);pointer-events:none;content:"";border:5px solid transparent;opacity:0}.vditor-tooltipped--hover::before,.vditor-tooltipped--hover::after,.vditor-tooltipped:hover::before,.vditor-tooltipped:hover::after,.vditor-tooltipped:active::before,.vditor-tooltipped:active::after,.vditor-tooltipped:focus::before,.vditor-tooltipped:focus::after{display:inline-block;text-decoration:none;-webkit-animation-name:tooltip-appear;animation-name:tooltip-appear;-webkit-animation-duration:0.15s;animation-duration:0.15s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}.vditor-tooltipped__s::after,.vditor-tooltipped__se::after,.vditor-tooltipped__sw::after{top:100%;right:50%;margin-top:5px}.vditor-tooltipped__s::before,.vditor-tooltipped__se::before,.vditor-tooltipped__sw::before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,0.8)}.vditor-tooltipped__se::after{right:auto;left:50%;margin-left:-15px}.vditor-tooltipped__sw::after{margin-right:-15px}.vditor-tooltipped__n::after,.vditor-tooltipped__ne::after,.vditor-tooltipped__nw::after{right:50%;bottom:100%;margin-bottom:5px}.vditor-tooltipped__n::before,.vditor-tooltipped__ne::before,.vditor-tooltipped__nw::before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,0.8)}.vditor-tooltipped__ne::after{right:auto;left:50%;margin-left:-15px}.vditor-tooltipped__nw::after{margin-right:-15px}.vditor-tooltipped__s::after,.vditor-tooltipped__n::after{-webkit-transform:translateX(50%);transform:translateX(50%)}.vditor-tooltipped__w::after{right:100%;bottom:50%;margin-right:5px;-webkit-transform:translateY(50%);transform:translateY(50%)}.vditor-tooltipped__w::before{top:50%;bottom:50%;left:-5px;margin-top:-5px;border-left-color:rgba(0,0,0,0.8)}.vditor-tooltipped__e::after{bottom:50%;left:100%;margin-left:5px;-webkit-transform:translateY(50%);transform:translateY(50%)}.vditor-tooltipped__e::before{top:50%;right:-5px;bottom:50%;margin-top:-5px;border-right-color:rgba(0,0,0,0.8)}@-webkit-keyframes scale-in{0%{opacity:0;-webkit-transform:scale(0.5);transform:scale(0.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes scale-in{0%{opacity:0;-webkit-transform:scale(0.5);transform:scale(0.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.vditor-panel{background-color:#fff;position:absolute;box-shadow:0 1px 2px rgba(0,0,0,0.2);border-radius:3px;padding:5px;z-index:4;font-size:14px;display:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;max-width:320px;min-width:80px;-webkit-animation-duration:.15s;animation-duration:.15s;-webkit-animation-name:scale-in;animation-name:scale-in;-webkit-animation-timing-function:cubic-bezier(0.2, 0, 0.13, 1.5);animation-timing-function:cubic-bezier(0.2, 0, 0.13, 1.5)}.vditor-panel h1,.vditor-panel h2,.vditor-panel h3,.vditor-panel h4,.vditor-panel h5,.vditor-panel h6{margin:0;cursor:pointer;padding:3px 10px;border-radius:3px;line-height:normal}.vditor-panel h1:hover,.vditor-panel h2:hover,.vditor-panel h3:hover,.vditor-panel h4:hover,.vditor-panel h5:hover,.vditor-panel h6:hover{background-color:#4285f4;color:#fff}.vditor-toolbar{background-color:#f6f8fa;border-bottom:1px solid #d1d5da;padding:0 5px;border-radius:3px 3px 0 0}.vditor-toolbar>div{padding:10px 5px;float:left;line-height:14px;height:36px;box-sizing:border-box}.vditor-toolbar>div button{border:0;margin:0;padding:0;background-color:transparent}.vditor-toolbar>div button:focus{outline:none}.vditor-toolbar svg{fill:currentColor;display:inline-block;stroke-width:0;stroke:currentColor;width:14px;height:14px}.vditor-toolbar .vditor-tooltipped{color:#586069}.vditor-toolbar .vditor-tooltipped:hover{color:#4285f4}.vditor-toolbar label{overflow:hidden;position:relative;height:14px;width:15px;display:block;cursor:pointer}.vditor-toolbar label svg{position:absolute;top:0;left:0}.vditor-toolbar label input{position:absolute;width:15px;height:15px;top:0;left:0;opacity:.001;overflow:hidden}.vditor-menu--current svg{color:#4285f4}.vditor-menu__divider{width:10px}.vditor-menu__br{width:100%;padding:0 !important;height:0 !important}.vditor-menu--disabled svg{color:rgba(88,96,105,0.6);cursor:not-allowed}.vditor-emojis{display:inline-block;overflow:auto}.vditor-emojis::-webkit-scrollbar{display:none}.vditor-emojis__tip{-webkit-box-flex:1;flex:1;width:200px;margin-right:10px;color:#586069;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.vditor-emojis__tail{margin-top:5px;font-size:12px;color:#586069;display:-webkit-box;display:flex}.vditor-emojis__tail a{text-decoration:none;color:#586069}.vditor-emojis__tail a:hover{color:#4285f4}.vditor-emojis span{cursor:pointer;border-radius:3px;float:left;height:30px;width:30px;text-align:center;line-height:26px;padding:3px;box-sizing:border-box;font-size:16px;-webkit-transition:all 0.15s ease-in-out;transition:all 0.15s ease-in-out}.vditor-emojis span:hover{-webkit-transform:scale(1.2);transform:scale(1.2)}.vditor-emojis img{height:20px;width:20px;float:left;margin:3px 0 0 3px}@-webkit-keyframes slideInDown{from{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);visibility:visible}to{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes slideInDown{from{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);visibility:visible}to{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.vditor{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;border:1px solid #d1d5da;border-radius:3px;box-sizing:border-box;font-family:"Helvetica Neue","Luxi Sans","DejaVu Sans",Tahoma,"Hiragino Sans GB","Microsoft Yahei",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Segoe UI Symbol","Android Emoji","EmojiSymbols"}.vditor--fullscreen{position:fixed;top:0;width:100% !important;left:0;height:100vh !important;z-index:90;background-color:#fff}.vditor-content{display:-webkit-box;display:flex;min-height:60px;-webkit-box-flex:1;flex:1;position:relative}.vditor-textarea{font-family:"Helvetica Neue","Luxi Sans","DejaVu Sans",Tahoma,"Hiragino Sans GB","Microsoft Yahei",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Segoe UI Symbol","Android Emoji","EmojiSymbols";margin:0 1px 0 0;height:100%;overflow:auto;width:100%;-webkit-box-flex:1;flex:1;border:0;resize:none;padding:10px 9px 10px 10px;box-sizing:border-box;background-color:#fafbfc;outline:0 none;font-size:16px;line-height:22px;color:#24292e;border-radius:0 0 3px 3px;font-variant-ligatures:no-common-ligatures;white-space:pre-wrap;word-break:break-word;word-wrap:break-word}.vditor-textarea[contenteditable="false"]{opacity:0.3;cursor:not-allowed}.vditor-textarea:focus{background-color:#fff}.vditor-textarea:empty::before{content:attr(placeholder);color:rgba(36,41,46,0.68)}.vditor-preview{-webkit-box-flex:1;flex:1;background-color:#fff;overflow:auto;margin-left:-1px;padding:10px;box-shadow:inset 1px 0 #d1d5da;box-sizing:border-box;border-radius:0 0 3px 0}.vditor-preview>div::-webkit-scrollbar{display:none}.vditor-preview>.vditor-reset{margin:0 auto}.vditor-devtools{display:none;background-color:#fff;overflow:auto;-webkit-box-flex:1;flex:1;box-shadow:inset 1px 0 #d1d5da;box-sizing:border-box;border-radius:0 0 3px 0;padding:10px}.vditor-counter{padding:0 3px;position:absolute;bottom:10px;right:20px;color:#24292e;background-color:rgba(255,255,255,0.6);border-radius:3px;font-size:12px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}.vditor-counter--error{color:#d23f31;background-color:rgba(210,63,49,0.1)}.vditor-resize{padding:3px 0;cursor:row-resize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;width:100%;z-index:2}.vditor-resize--top{top:-3px}.vditor-resize--bottom{bottom:-3px}.vditor-resize>div{height:3px;background-color:#f6f8fa;-webkit-transition:all 0.15s ease-in-out;transition:all 0.15s ease-in-out}.vditor-resize:hover>div,.vditor-resize--selected>div{background-color:#4285f4}.vditor-resize:hover svg,.vditor-resize--selected svg{color:#fff}.vditor-resize svg{fill:currentColor;stroke-width:0;stroke:currentColor;width:13px;height:3px;display:block;margin:0 auto;color:#586069}.vditor-upload{position:absolute;height:3px;left:0;top:-2px;-webkit-transition:all 0.15s ease-in-out;transition:all 0.15s ease-in-out;background-color:rgba(66,133,244,0.8)}.vditor-tip{position:absolute;font-size:12px;top:10px;color:#fff;-webkit-animation-duration:.15s;animation-duration:.15s;-webkit-animation-fill-mode:both;animation-fill-mode:both;width:100%;text-align:center}.vditor-tip--show{display:block;-webkit-animation-name:slideInDown;animation-name:slideInDown}.vditor-tip__content{text-align:left;display:inline-block;line-height:16px;padding:3px 10px;border-radius:3px;background:rgba(66,133,244,0.8);position:relative}.vditor-tip__content ul{margin:2px 0;padding:0 0 0 18px}.vditor-tip__close{position:absolute;color:#586069;top:-7px;right:-15px;font-weight:bold;cursor:pointer}.vditor-tip__close:hover{color:#4285f4}.vditor-popover{background-color:#fff;position:absolute;box-shadow:0 1px 2px rgba(0,0,0,0.2);border-radius:3px;padding:5px 0;z-index:3;line-height:20px;list-style:none;color:#24292e;font-size:12px;margin:0;max-width:250px;min-width:80px;display:none}.vditor-hint{background-color:#fff;position:absolute;box-shadow:0 1px 2px rgba(0,0,0,0.2);border-radius:3px;padding:5px 0;z-index:3;line-height:20px;list-style:none;color:#24292e;font-size:12px;margin:0;max-width:250px;min-width:80px;display:none}.vditor-hint button{display:block;padding:3px 10px;border:0;border-bottom:1px solid #d1d5da;line-height:20px;width:100%;box-sizing:border-box;text-align:left;margin:0;background-color:transparent}.vditor-hint button:last-child{border-bottom:0}.vditor-hint--current,.vditor-hint button:hover{background-color:#4285f4 !important;color:#fff}.vditor-hint__emoji{font-size:16px;float:left;margin-right:3px}.vditor-hint img{height:20px;width:20px;float:left;margin-right:3px}.vditor-reset{font-variant-ligatures:no-common-ligatures;font-family:"Helvetica Neue","Luxi Sans","DejaVu Sans",Tahoma,"Hiragino Sans GB","Microsoft Yahei",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Segoe UI Symbol","Android Emoji","EmojiSymbols";word-wrap:break-word;overflow:auto;line-height:1.5;font-size:16px;word-break:break-word}.vditor-reset--anchor{padding-left:20px}.vditor-reset ul ul ul{list-style-type:square}.vditor-reset ul ul{list-style-type:circle}.vditor-reset ul{list-style-type:disc}.vditor-reset ul,.vditor-reset ol{padding-left:2em;margin-top:0;margin-bottom:16px}.vditor-reset li+li{margin-top:0.25em}.vditor-reset audio{max-width:100%}.vditor-reset audio:focus{outline:none}.vditor-reset video{max-height:90vh;max-width:100%}.vditor-reset img{max-width:100%}.vditor-reset img.emoji{cursor:auto;max-width:20px;vertical-align:sub}.vditor-reset h1,.vditor-reset h2,.vditor-reset h3,.vditor-reset h4,.vditor-reset h5,.vditor-reset h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.vditor-reset h1:hover .vditor-anchor svg,.vditor-reset h2:hover .vditor-anchor svg,.vditor-reset h3:hover .vditor-anchor svg,.vditor-reset h4:hover .vditor-anchor svg,.vditor-reset h5:hover .vditor-anchor svg,.vditor-reset h6:hover .vditor-anchor svg{visibility:visible}.vditor-reset h1{padding-bottom:0.3em;font-size:1.7em;border-bottom:1px solid #eee}.vditor-reset h2{padding-bottom:0.3em;font-size:1.5em;border-bottom:1px solid #eee}.vditor-reset h3{font-size:1.25em}.vditor-reset h4{font-size:1em}.vditor-reset h5{font-size:0.875em}.vditor-reset h6{font-size:0.85em}.vditor-reset hr{height:2px;padding:0;margin:24px 0;background-color:#e7e7e7;border:0}.vditor-reset p{margin-top:0;margin-bottom:16px}.vditor-reset blockquote{padding:0 1em;color:#777;border-left:0.25em solid #ddd;margin:0 0 16px 0}.vditor-reset blockquote p{margin:0}.vditor-reset ins>iframe{border:0}.vditor-reset iframe{border:1px solid #d1d5da;max-width:100%;box-sizing:border-box}.vditor-reset iframe.iframe__video{min-width:80%;min-height:36vh}.vditor-reset table{width:100%;border-collapse:collapse;empty-cells:show;margin-bottom:16px;display:block;overflow:auto;border-spacing:0}.vditor-reset table tr{background-color:#fff;border-top:1px solid #c6cbd1}.vditor-reset table td,.vditor-reset table th{padding:6px 13px;border:1px solid #dfe2e5;word-break:normal}.vditor-reset table th{font-weight:600}.vditor-reset table tbody tr:nth-child(2n){background-color:#f6f8fa}.vditor-reset code:not(.hljs):not(.highlight-chroma){padding:0.2em 0.4em;margin:0;font-size:85%;border-radius:3px;font-family:mononoki,Consolas,"Liberation Mono",Menlo,Courier,monospace;word-break:break-word;background-size:20px 20px;white-space:pre-wrap;background-color:rgba(27,31,35,0.05)}.vditor-reset pre>code{margin:0;font-size:85%;padding:0.5em;border-radius:5px;display:block;overflow:auto;white-space:pre;font-family:mononoki,Consolas,"Liberation Mono",Menlo,Courier,monospace;background-size:20px 20px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8AgMAAABHkjHhAAAACVBMVEWAgIBaWlo+Pj7rTFvWAAAAA3RSTlMHCAw+VhR4AAAA+klEQVQoz4WSMW7EQAhFPxKWNh2FCx+HkaZI6RRb5DYbyVfIJXLKDCFoMbaTKSw/8ZnPAPjaH2xgZcUNUDADD7D9LtDBCLZ45fbkvo/30K8yeI64pPwl6znd/3n/Oe93P3ho9qeh72btTFzqkz0rsJle8Zr81OLEwZ1dv/713uWqvu2pl+k0fy7MWtj9r/tN5q/02z89qa/L4Dc2LvM93kezPfXlME/O86EbY/V9GB9ePX8G1/6W+/9h1dq/HGfTfzT3j/xNo7522Bfnqe5jO/fvhVthlfk434v3iO9zG/UOphyPeinPl1J8Gtaa7xPTa/Dk+RIs4deMvwGvcGsmsCvJ0AAAAABJRU5ErkJggg==);word-break:initial;word-wrap:normal}.vditor-reset pre:hover div.vditor-copy{display:block}.vditor-reset kbd{display:inline-block;padding:3px 5px;font:11px Consolas, "Liberation Mono", Menlo, Courier, monospace;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:solid 1px #d1d5da;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.vditor-reset summary{cursor:pointer}.vditor-reset summary:focus{outline:none}.vditor-reset svg{height:auto;width:auto}.vditor-reset p:last-child,.vditor-reset blockquote:last-child,.vditor-reset pre:last-child,.vditor-reset ul:last-child,.vditor-reset ol:last-child,.vditor-reset hr:last-child{margin-bottom:0}.vditor-reset .language-echarts{overflow:hidden;height:420px}.vditor-task{list-style:none}.vditor-task input{margin:0 .2em .25em -1.6em;vertical-align:middle}.vditor-copy{position:relative;display:none;z-index:1}.vditor-copy textarea{position:absolute;left:-100000px;height:10px}.vditor-copy span{cursor:pointer;position:absolute;right:0.5em;top:0.5em;height:14px;width:14px;display:block;background-color:#f6f8fa;border-radius:3px;padding:3px}.vditor-copy svg{color:#586069;height:14px;width:14px !important;display:block;fill:currentColor}.vditor-linenumber{padding-left:4em !important;position:relative}.vditor-linenumber__rows{position:absolute;pointer-events:none;top:0.5em;left:0;width:3em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;counter-reset:linenumber}.vditor-linenumber__rows>span{pointer-events:none;display:block}.vditor-linenumber__rows>span::before{counter-increment:linenumber;content:counter(linenumber);color:rgba(158,150,150,0.38);display:block;padding-right:1em;text-align:right}.vditor-speech{position:absolute;display:none;background-color:#f6f8fa;border:1px solid #d1d5da;border-radius:3px;padding:3px;cursor:pointer;color:#586069}.vditor-speech:hover,.vditor-speech--current{color:#4285f4}.vditor-speech svg{height:14px;width:14px;fill:currentColor;display:block;stroke-width:0;stroke:currentColor}.vditor-anchor{float:left;padding-right:4px;margin-left:-20px}.vditor-anchor svg{visibility:hidden}.vditor-anchor:hover svg{visibility:visible}.vditor-anchor:focus{outline:none}.vditor--error{color:#d23f31;font-size:12px;display:block;line-height:16px}.vditor-wysiwyg{background-color:#fafbfc;box-sizing:border-box;-webkit-box-flex:1;flex:1;margin:0;white-space:pre-wrap}.vditor-wysiwyg[contenteditable="false"]{opacity:0.3;cursor:not-allowed}.vditor-wysiwyg:focus{outline:none;background-color:#fff}.user__site{float:left;margin-left:10px}.user__site svg{height:20px;width:20px;fill:currentColor}html{height:100%;max-height:100%;font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{height:100%;max-height:100%;font-family:"Merriweather", "Microsoft Yahei", 'Helvetica';letter-spacing:0.01rem;font-size:1.8rem;line-height:1.75em;color:#3A4145;-webkit-font-feature-settings:'kern' 1;-moz-font-feature-settings:'kern' 1;-o-font-feature-settings:'kern' 1;text-rendering:geometricPrecision;margin:0}::-moz-selection{background:#D6EDFF}::selection{background:#D6EDFF}a{color:#4A4A4A;-webkit-transition:color 0.3s ease;transition:color 0.3s ease}a:hover{color:#111}h1,h2,h3,h4,h5,h6{-webkit-font-feature-settings:'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1;-moz-font-feature-settings:'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1;-o-font-feature-settings:'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1;color:#2E2E2E;line-height:1.15em;font-family:"Open Sans", "Microsoft Yahei", 'Helvetica';text-rendering:geometricPrecision}h1{font-size:5rem}h2{font-size:3.6rem}h3{font-size:3rem}h4{font-size:2.5rem}h5{font-size:2rem}h6{font-size:2rem}img{max-width:100%;height:auto}p,ul,ol,dl{-webkit-font-feature-settings:'liga' 1, 'onum' 1, 'kern' 1;-moz-font-feature-settings:'liga' 1, 'onum' 1, 'kern' 1;-o-font-feature-settings:'liga' 1, 'onum' 1, 'kern' 1;margin:0 0 1.75em 0;text-rendering:geometricPrecision}ol,ul{padding-left:3rem}ol ol,ul ul,ul ol,ol ul{padding-left:2em;margin-bottom:0}dl dt{float:left;width:180px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap;font-weight:700;margin-bottom:1em}dl dd{margin-left:200px;margin-bottom:1em}li li{margin:0}hr{display:block;height:1px;border:0;border-top:#EFEFEF 1px solid;margin:3.2em 0;padding:0}blockquote{box-sizing:border-box;margin:1.75em 0 1.75em 0;padding:0 0 0 1.75em;border-left:#4A4A4A 0.4em solid}blockquote p{margin:0.8em 0;font-style:italic}blockquote small{display:inline-block;margin:0.8em 0 0.8em 1.5em;font-size:0.9em;color:#CCC}blockquote small:before{content:"\2014 \00A0"}blockquote cite{font-weight:700}blockquote cite a{font-weight:normal}mark{background-color:#fdffb6}code,tt{padding:1px 3px;font-family:Inconsolata, monospace, "Microsoft Yahei", 'Helvetica';font-size:0.85em;white-space:pre-wrap;border:#E3EDF3 1px solid;background:#F7FAFB;border-radius:2px}pre code,pre tt{font-size:inherit;white-space:pre-wrap;background:transparent;border:none;padding:0}.fn-clear:before,.fn-clear:after{display:table;content:""}.fn-clear:after{clear:both}.fn-left{float:left}.fn-right{float:right}.fn-none{display:none}.fn-vertical{display:table-cell;vertical-align:middle}.fn-wrap{width:80%;max-width:768px;margin:0 auto}@-webkit-keyframes fade-in-down{0%{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fade-in-down{0%{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes bounce{0%,10%,25%,40%,50%{-webkit-transform:translateY(0);transform:translateY(0)}20%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}30%{-webkit-transform:translateY(-5px);transform:translateY(-5px)}}@keyframes bounce{0%,20%,50%,80%,100%{-webkit-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}60%{-webkit-transform:translateY(-5px);transform:translateY(-5px)}}@-webkit-keyframes upbounce{0%,10%,25%,40%,50%{-webkit-transform:translateY(0);transform:translateY(0)}20%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}30%{-webkit-transform:translateY(-5px);transform:translateY(-5px)}}@keyframes upbounce{0%,20%,50%,80%,100%{-webkit-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}60%{-webkit-transform:translateY(-5px);transform:translateY(-5px)}}@font-face{font-family:'icomoon';src:url("fonts/icomoon.eot?hvf32e");src:url("fonts/icomoon.eot?hvf32e#iefix") format("embedded-opentype"),url("fonts/icomoon.ttf?hvf32e") format("truetype"),url("fonts/icomoon.woff?hvf32e") format("woff"),url("fonts/icomoon.svg?hvf32e#icomoon") format("svg");font-weight:normal;font-style:normal}[class^="icon-"],[class*=" icon-"]{font-size:2rem;font-family:'icomoon' !important;speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-qqz:before{content:"\e902"}.icon-register:before{content:"\e600"}.icon-logout:before{content:"\e601"}.icon-setting:before{content:"\e602"}.icon-gotop:before{content:"\e60a"}.icon-twitter:before{content:"\e60b"}.icon-login:before{content:"\e611"}.icon-arrow-left:before{content:"\f605"}.icon-menu:before{line-height:38px;content:"\f609";font-size:20px}.icon-wechat:before{content:"\e903"}.icon-sitemap:before{content:"\e900"}.icon-list:before{content:"\e901"}.avatar{border-radius:100%;float:left;height:24px;margin-right:9px;width:24px}.avatar-warp{width:10%;padding-right:10px;box-sizing:border-box}.avatar-48{box-shadow:0 0 2px #ddd;height:auto;width:48px;margin-right:10px;border-radius:24px}.form{width:100%;margin-top:50px}.form input,.form textarea,.form button{border:1px solid #CCCCCC;background-color:#FAFAFA;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,0.075) inset;padding:7px 8px;width:100%;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;font-family:"Microsoft Yahei", 'Helvetica';outline:none}.form button{width:auto;vertical-align:bottom}.form input:focus,.form textarea:focus{background-color:#FFF;box-shadow:0 1px 2px rgba(0,0,0,0.075) inset,0 0 5px rgba(81,167,232,0.5);border:1px solid #51A7E8}.error-msg{font-size:1.5rem;color:#9EABB3}.cmtFromSym{font-size:1rem;color:#9EABB3}.main-header{position:relative;display:table;width:100%;height:100vh;margin-bottom:5rem;text-align:center;background:#222 no-repeat center center;background-size:cover;overflow:hidden;background-image:url("../images/header-bg.jpg");min-height:50vh}.site-wrapper{position:relative;z-index:10;min-height:100%;background:#fff;-webkit-transition:-webkit-transform 0.5s ease;transition:-webkit-transform 0.5s ease;transition:transform 0.5s ease;transition:transform 0.5s ease, -webkit-transform 0.5s ease}.nav-opened .site-wrapper{overflow-x:hidden;margin-right:240px;-webkit-transition:margin 0.3s ease;transition:margin 0.3s ease}.page-title a{-webkit-animation:fade-in-down 0.6s;animation:fade-in-down 0.6s;-webkit-animation-delay:0.2s;animation-delay:0.2s;margin:10px 0 10px 0;font-size:5rem;letter-spacing:-1px;font-weight:700;font-family:"Open Sans", "Microsoft Yahei", 'Helvetica';color:#fff;text-shadow:0px 0px 3px rgba(0,0,0,0.9);text-decoration:none}.page-description,.page-description a{-webkit-animation:fade-in-down 0.9s;animation:fade-in-down 0.9s;-webkit-animation-delay:0.1s;animation-delay:0.1s;margin:0;font-size:2rem;line-height:1.5em;font-weight:400;letter-spacing:0.01rem;color:rgba(255,255,255,0.8)}.scroll-down{display:block;position:absolute;z-index:100;bottom:45px;left:50%;margin-left:-16px;width:34px;height:34px;font-size:34px;text-align:center;text-decoration:none;color:rgba(255,255,255,0.7);-webkit-animation:bounce 4s 2s infinite;animation:bounce 4s 2s infinite}.scroll-down:hover{color:#fff;-webkit-animation:none;animation:none}.menu-button{position:fixed;box-sizing:border-box;display:inline-block;float:right;height:38px;padding:0 15px;opacity:1;font-size:12px;text-transform:uppercase;line-height:46px;border-radius:3px;-webkit-transition:all 0.5s ease;transition:all 0.5s ease;right:20px;top:40px;text-decoration:none;font-family:'Open Sans', "Microsoft Yahei", 'Helvetica';z-index:30;overflow:hidden;background-color:#111;border:1px solid #111;color:#fff;cursor:pointer}.menu-button:hover{background:#fff}.menu-button:focus{outline:0}.nav-closed .menu-button:hover{color:#222}.nav-opened .menu-button{padding:0 12px;background:#111;border-color:#111;color:#fff;-webkit-transform:translate3D(50px, 0, 0);transform:translate3D(50px, 0, 0);-webkit-transition:all 0.3s ease;transition:all 0.3s ease;right:287px;z-index:10;width:46px;border-radius:3px 0 0 3px}.menu-button .word{float:right;margin:-4px 0 0 10px}.nav{position:fixed;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;top:0;right:0;bottom:0;z-index:5;width:220px;padding:10px 10px 0 10px;opacity:0;background:#111;margin-bottom:0;text-align:left;overflow-y:auto;color:#FFF;-webkit-transition:-webkit-transform 0.5s ease, opacity 0.3s ease 0.7s;-webkit-transition:opacity 0.3s ease 0.7s, -webkit-transform 0.5s ease;transition:opacity 0.3s ease 0.7s, -webkit-transform 0.5s ease;transition:transform 0.5s ease, opacity 0.3s ease 0.7s;transition:transform 0.5s ease, opacity 0.3s ease 0.7s, -webkit-transform 0.5s ease;overflow-x:hidden}.nav::-webkit-scrollbar{display:none}.nav ul{-webkit-box-flex:1;flex:1;margin:0;padding:0px 0 5%;list-style:none;counter-reset:item}.nav li{height:30px;line-height:1.4rem}.nav li:before{display:block;float:right;padding-right:4%;padding-left:5px;text-align:right;font-size:1.2rem;vertical-align:bottom;color:#B8B8B8;content:counter(item, lower-roman);counter-increment:item;line-height:2.5rem}.nav a{color:#989898;text-decoration:none;line-height:1.4;font-size:1.4rem}.nav a:hover,.nav a.current{color:#FFF}.nav li a{display:block;padding:0.6rem 4%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.nav li a:after{display:inline-block;content:" .......................................................";color:rgba(255,255,255,0.2);margin-left:5px}.nav .count{font-size:1rem;word-wrap:normal;word-break:break-all;white-space:nowrap}.nav .page-icon{float:left;height:14px;width:14px;margin:3px 4px 0 0}body.nav-closed .nav{-webkit-transform:translate3D(240px, 0, 0);transform:translate3D(240px, 0, 0)}body.nav-opened .nav{opacity:1;-webkit-transition:-webkit-transform 0.3s ease, opacity 0s ease 0s;-webkit-transition:opacity 0s ease 0s, -webkit-transform 0.3s ease;transition:opacity 0s ease 0s, -webkit-transform 0.3s ease;transition:transform 0.3s ease, opacity 0s ease 0s;transition:transform 0.3s ease, opacity 0s ease 0s, -webkit-transform 0.3s ease;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}article.post{position:relative;margin:4rem auto;padding-bottom:4rem;border-bottom:#EBF2F6 1px solid;word-wrap:break-word;width:80%}article.post .share{position:relative}article.post .share canvas{position:absolute;left:0;top:36px}.post-content--article{padding-bottom:10px}.post-content--article::-webkit-scrollbar{display:none}article.post:after{display:block;content:"";width:7px;height:7px;border:#E7EEF2 1px solid;position:absolute;bottom:-5px;left:50%;margin-left:-5px;background:#FFF;border-radius:100%;box-shadow:#FFF 0 0 0 5px}.post-title a{text-decoration:none}.post-tip{display:inline-block;text-transform:uppercase;font-size:1.3rem;white-space:nowrap;color:#9EABB3;cursor:text}.post-tip:hover{color:#9EABB3}.post-tip:visited{color:#fff}.post-excerpt p{margin:0;font-size:0.9em;line-height:1.7em}.post-meta{color:#9eabb3;font-family:"Open Sans", "Microsoft Yahei", 'Helvetica';font-size:1.5rem;line-height:2.2rem;margin:1.75rem 0 0 0}.post-meta a{color:#9EABB3;text-decoration:none}.post-meta a:hover{text-decoration:underline}.post-meta time{border-left:1px solid #d5dbde;display:inline-block;font-size:1.3rem;margin-left:8px;padding-left:12px;text-transform:uppercase;white-space:nowrap}.post-author{box-sizing:border-box;display:block;position:absolute;bottom:-57px;left:50%;margin-left:-40px;width:80px;height:80px;border-radius:100%;overflow:hidden;padding:6px;background:#fff;z-index:2;box-shadow:#E7EEF2 0 0 0 1px}.post-author a{background-size:cover;background-position:center center;width:68px;height:68px;display:block;border-radius:35px}.share .icon{cursor:pointer;-webkit-transition:all 0.2s ease-out 0s;transition:all 0.2s ease-out 0s;display:inline-block;font-size:16px;margin-top:15px}.share .icon:hover{-webkit-transform:rotate(360deg);transform:rotate(360deg);color:#9EABB3}.icon-weibo:before{content:"\e605"}.icon-twitter:before{content:"\e60b"}.icon-tencent:before{content:"\e60d"}.icon-google:before{content:"\e603"}.icon-gotop:before{content:"\E60A";font-weight:bold}.icon-gotop{cursor:pointer;position:fixed;bottom:30px;right:30px;-webkit-animation:upbounce 4s 2s infinite;animation:upbounce 4s 2s infinite;text-decoration:none;z-index:12}.icon-gotop:hover{color:#B8B8B8;-webkit-animation:none;animation:none}.pagination{font-family:"Open Sans", "Microsoft Yahei", 'Helvetica';font-size:1.3rem;color:#9eabb3;text-align:center}.pagination a{color:#9EABB3;-webkit-transition:all 0.2s ease;transition:all 0.2s ease;padding:0 15px;border:#bfc8cd 1px solid;text-decoration:none;display:inline-block;border-radius:4px}.pagination a:hover{border-color:#98a0a4;color:#889093}ul.comments{padding:0;list-style:none;margin-top:100px;position:relative}.comments li{padding:10px;white-space:normal;word-wrap:break-word;position:relative;border-bottom:#EBF2F6 1px solid}.comments li:hover{background-color:#F7F7F7}.comments li img{vertical-align:sub}.comments .comment-content{margin:8px 0 0}.comments li.comment-body-ref{position:absolute;z-index:10;background-color:#EBF2F6;border:#d5dbde 1px solid;width:86%;left:69px}.comments .post-meta{margin-top:0}#captcha,#captchaReply{height:27px;display:inline-block;vertical-align:inherit}.read-next{display:-webkit-box;display:flex;-webkit-box-align:stretch;align-items:stretch;margin-top:10rem}.read-next-story{display:-webkit-box;display:flex;-webkit-box-flex:1;flex-grow:1;min-width:50%;text-decoration:none;position:relative;text-align:center;color:#fff;background:#222 no-repeat center center;background-size:cover;overflow:hidden}.read-next-story a{color:#BBB}.read-next-story a:hover{color:#FFF}.read-next-story:hover:before{background:rgba(0,0,0,0.8);-webkit-transition:all 0.2s ease;transition:all 0.2s ease}.read-next-story:hover .post:before{color:#222;background:#fff;-webkit-transition:all 0.2s ease;transition:all 0.2s ease}.read-next-story:before{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,0.7);-webkit-transition:all 0.5s ease;transition:all 0.5s ease}.read-next-story .post{padding-top:6rem;padding-bottom:6rem;width:80%;position:relative;margin:0 auto}.read-next-story .post:before{content:"Read This Next";padding:4px 10px 5px;text-transform:uppercase;font-size:1.1rem;font-family:"Open Sans", "Microsoft Yahei", 'Helvetica';color:rgba(255,255,255,0.8);border:1px solid rgba(255,255,255,0.5);border-radius:4px;-webkit-transition:all 0.5s ease;transition:all 0.5s ease}.read-next-story.prev .post:before{content:"Read This Before"}.read-next-story h2{margin-top:1rem;color:#fff}.read-next-story p{margin:0;color:rgba(255,255,255,0.8)}.read-next+.site-footer{position:absolute;bottom:0;left:0;right:0;margin:0}#tags{padding:0}#tags li{list-style:none;float:left}#tags li a{border:1px solid #4A4A4A;display:inline-block;padding:10px;margin:1rem;border-radius:5px;text-decoration:none}#tags li a:hover{border:1px solid #FFF;color:#FFF;background-color:#4A4A4A}.dynamic .read-next-story>div{position:relative;width:60%;margin:50px auto;text-align:left}.dynamic a{text-decoration:none;margin:0;color:rgba(255,255,255,0.8)}.dynamic a:hover{color:rgba(255,255,255,0.5)}.site-footer{position:relative;margin:8rem 0 0 0;padding:1rem 15px;font-family:"Open Sans", "Microsoft Yahei", 'Helvetica';font-size:1rem;line-height:1.75em;color:#BBC7CC}.site-footer a{color:#BBC7CC;font-weight:bold;text-decoration:none}.site-footer a:hover{text-decoration:underline}@media only screen and (max-width: 900px){blockquote{margin-left:0}.main-header{box-sizing:border-box;height:auto;min-height:240px;height:60vh;padding:15% 0}.scroll-down{display:none}.page-title,.page-title a{font-size:4rem;letter-spacing:-1px}.page-description,.page-description a{font-size:1.8rem;line-height:1.5em}.post{font-size:0.95em}hr{margin:2.4em 0}ol,ul{padding-left:2em}h1{font-size:4.5rem}h2{font-size:3.6rem}h3{font-size:3.1rem}h4{font-size:2.5rem}h5{font-size:2.2rem}h6{font-size:1.8rem}.read-next{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;margin-top:4rem}}@media only screen and (max-width: 500px){.main-header{margin-bottom:15px;height:40vh}.pagination{width:auto;margin:2rem auto}.post{width:auto;margin-top:2rem;margin-bottom:2rem;margin-left:16px;margin-right:16px;padding-bottom:2rem;line-height:1.65em}hr{margin:1.75em 0}p,ul,ol,dl{font-size:0.95em;margin:0 0 2.5rem 0}.page-title,.page-title a{font-size:3rem}.post-excerpt p{font-size:0.85em}.page-description,.page-description a{font-size:1.6rem}h1,h2,h3,h4,h5,h6{margin:0 0 0.3em 0}h1{font-size:2.8rem;letter-spacing:-1px}h2{font-size:2.4rem;letter-spacing:0}h3{font-size:2.1rem}h4{font-size:1.9rem}h5{font-size:1.8rem}h6{font-size:1.8rem}.post-content img{padding:0;width:calc(100% + 32px);min-width:0;max-width:112%}.post-meta{font-size:1.3rem;margin-top:1rem}.site-footer{margin-top:3rem}.read-next{margin-top:2rem;margin-bottom:-37px}.read-next .post{width:100%}.menu-button{border:0;top:0;right:0}.nav-opened .site-wrapper{margin-right:0}.nav{z-index:11}.nav-closed .menu-button:hover{color:#FFF;background-color:transparent}.post-author{width:40px;height:40px;bottom:-37px;padding:3px;margin-left:-20px}.post-author a{width:34px;height:34px;display:block;border-radius:17px}.nav .count{line-height:1.5rem}#tags li a{padding:0 5px}}
.article__toc{overflow:auto}.article__toc::-webkit-scrollbar{display:none}.article__toc li{list-style-type:none}.article__toc li a{padding-left:10px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.article__toc li a:hover{text-decoration:none}.article__toc li.toc__h3 a{padding-left:20px}.article__toc li.toc__h4 a{padding-left:30px}.article__toc li.toc__h5 a{padding-left:40px}.user__site:hover{text-decoration:none}@-webkit-keyframes tooltip-appear{from{opacity:0}to{opacity:1}}@keyframes tooltip-appear{from{opacity:0}to{opacity:1}}.vditor-tooltipped{position:relative;cursor:pointer}.vditor-tooltipped::after{position:absolute;z-index:1000000;display:none;padding:5px 8px;font-size:11px;font-weight:normal;-webkit-font-smoothing:subpixel-antialiased;color:#fff;text-align:center;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:rgba(0,0,0,0.8);border-radius:3px;line-height:16px;opacity:0}.vditor-tooltipped::before{position:absolute;z-index:1000001;display:none;width:0;height:0;color:rgba(0,0,0,0.8);pointer-events:none;content:"";border:5px solid transparent;opacity:0}.vditor-tooltipped--hover::before,.vditor-tooltipped--hover::after,.vditor-tooltipped:hover::before,.vditor-tooltipped:hover::after,.vditor-tooltipped:active::before,.vditor-tooltipped:active::after,.vditor-tooltipped:focus::before,.vditor-tooltipped:focus::after{display:inline-block;text-decoration:none;-webkit-animation-name:tooltip-appear;animation-name:tooltip-appear;-webkit-animation-duration:0.15s;animation-duration:0.15s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}.vditor-tooltipped__s::after,.vditor-tooltipped__se::after,.vditor-tooltipped__sw::after{top:100%;right:50%;margin-top:5px}.vditor-tooltipped__s::before,.vditor-tooltipped__se::before,.vditor-tooltipped__sw::before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,0.8)}.vditor-tooltipped__se::after{right:auto;left:50%;margin-left:-15px}.vditor-tooltipped__sw::after{margin-right:-15px}.vditor-tooltipped__n::after,.vditor-tooltipped__ne::after,.vditor-tooltipped__nw::after{right:50%;bottom:100%;margin-bottom:5px}.vditor-tooltipped__n::before,.vditor-tooltipped__ne::before,.vditor-tooltipped__nw::before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,0.8)}.vditor-tooltipped__ne::after{right:auto;left:50%;margin-left:-15px}.vditor-tooltipped__nw::after{margin-right:-15px}.vditor-tooltipped__s::after,.vditor-tooltipped__n::after{-webkit-transform:translateX(50%);transform:translateX(50%)}.vditor-tooltipped__w::after{right:100%;bottom:50%;margin-right:5px;-webkit-transform:translateY(50%);transform:translateY(50%)}.vditor-tooltipped__w::before{top:50%;bottom:50%;left:-5px;margin-top:-5px;border-left-color:rgba(0,0,0,0.8)}.vditor-tooltipped__e::after{bottom:50%;left:100%;margin-left:5px;-webkit-transform:translateY(50%);transform:translateY(50%)}.vditor-tooltipped__e::before{top:50%;right:-5px;bottom:50%;margin-top:-5px;border-right-color:rgba(0,0,0,0.8)}@-webkit-keyframes scale-in{0%{opacity:0;-webkit-transform:scale(0.5);transform:scale(0.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes scale-in{0%{opacity:0;-webkit-transform:scale(0.5);transform:scale(0.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.vditor-panel{background-color:#fff;position:absolute;box-shadow:0 1px 2px rgba(0,0,0,0.2);border-radius:3px;padding:5px;z-index:4;font-size:14px;display:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;max-width:320px;min-width:80px;-webkit-animation-duration:.15s;animation-duration:.15s;-webkit-animation-name:scale-in;animation-name:scale-in;-webkit-animation-timing-function:cubic-bezier(0.2, 0, 0.13, 1.5);animation-timing-function:cubic-bezier(0.2, 0, 0.13, 1.5)}.vditor-panel h1,.vditor-panel h2,.vditor-panel h3,.vditor-panel h4,.vditor-panel h5,.vditor-panel h6{margin:0;cursor:pointer;padding:3px 10px;border-radius:3px;line-height:normal}.vditor-panel h1:hover,.vditor-panel h2:hover,.vditor-panel h3:hover,.vditor-panel h4:hover,.vditor-panel h5:hover,.vditor-panel h6:hover{background-color:#4285f4;color:#fff}.vditor-toolbar{background-color:#f6f8fa;border-bottom:1px solid #d1d5da;padding:0 5px;border-radius:3px 3px 0 0}.vditor-toolbar>div{padding:10px 5px;float:left;line-height:14px;height:36px;box-sizing:border-box}.vditor-toolbar>div button{border:0;margin:0;padding:0;background-color:transparent}.vditor-toolbar>div button:focus{outline:none}.vditor-toolbar svg{fill:currentColor;display:inline-block;stroke-width:0;stroke:currentColor;width:14px;height:14px}.vditor-toolbar .vditor-tooltipped{color:#586069}.vditor-toolbar .vditor-tooltipped:hover{color:#4285f4}.vditor-toolbar label{overflow:hidden;position:relative;height:14px;width:15px;display:block;cursor:pointer}.vditor-toolbar label svg{position:absolute;top:0;left:0}.vditor-toolbar label input{position:absolute;width:15px;height:15px;top:0;left:0;opacity:.001;overflow:hidden}.vditor-menu--current svg{color:#4285f4}.vditor-menu__divider{width:10px}.vditor-menu__br{width:100%;padding:0 !important;height:0 !important}.vditor-menu--disabled svg{color:rgba(88,96,105,0.6);cursor:not-allowed}.vditor-emojis{display:inline-block;overflow:auto}.vditor-emojis::-webkit-scrollbar{display:none}.vditor-emojis__tip{-webkit-box-flex:1;flex:1;width:200px;margin-right:10px;color:#586069;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.vditor-emojis__tail{margin-top:5px;font-size:12px;color:#586069;display:-webkit-box;display:flex}.vditor-emojis__tail a{text-decoration:none;color:#586069}.vditor-emojis__tail a:hover{color:#4285f4}.vditor-emojis span{cursor:pointer;border-radius:3px;float:left;height:30px;width:30px;text-align:center;line-height:26px;padding:3px;box-sizing:border-box;font-size:16px;-webkit-transition:all 0.15s ease-in-out;transition:all 0.15s ease-in-out}.vditor-emojis span:hover{-webkit-transform:scale(1.2);transform:scale(1.2)}.vditor-emojis img{height:20px;width:20px;float:left;margin:3px 0 0 3px}@-webkit-keyframes slideInDown{from{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);visibility:visible}to{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes slideInDown{from{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);visibility:visible}to{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.vditor{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;border:1px solid #d1d5da;border-radius:3px;box-sizing:border-box;font-family:"Helvetica Neue","Luxi Sans","DejaVu Sans",Tahoma,"Hiragino Sans GB","Microsoft Yahei",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Segoe UI Symbol","Android Emoji","EmojiSymbols"}.vditor--fullscreen{position:fixed;top:0;width:100% !important;left:0;height:100vh !important;z-index:90;background-color:#fff}.vditor-content{display:-webkit-box;display:flex;min-height:60px;-webkit-box-flex:1;flex:1;position:relative}.vditor-textarea{font-family:"Helvetica Neue","Luxi Sans","DejaVu Sans",Tahoma,"Hiragino Sans GB","Microsoft Yahei",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Segoe UI Symbol","Android Emoji","EmojiSymbols";margin:0 1px 0 0;height:100%;overflow:auto;width:100%;-webkit-box-flex:1;flex:1;border:0;resize:none;padding:10px 9px 10px 10px;box-sizing:border-box;background-color:#fafbfc;outline:0 none;font-size:16px;line-height:22px;color:#24292e;border-radius:0 0 3px 3px;font-variant-ligatures:no-common-ligatures;white-space:pre-wrap;word-break:break-word;word-wrap:break-word}.vditor-textarea[contenteditable="false"]{opacity:0.3;cursor:not-allowed}.vditor-textarea:focus{background-color:#fff}.vditor-textarea:empty::before{content:attr(placeholder);color:rgba(36,41,46,0.68)}.vditor-preview{-webkit-box-flex:1;flex:1;background-color:#fff;overflow:auto;margin-left:-1px;padding:10px;box-shadow:inset 1px 0 #d1d5da;box-sizing:border-box;border-radius:0 0 3px 0}.vditor-preview>div::-webkit-scrollbar{display:none}.vditor-preview>.vditor-reset{margin:0 auto}.vditor-devtools{display:none;background-color:#fff;overflow:auto;-webkit-box-flex:1;flex:1;box-shadow:inset 1px 0 #d1d5da;box-sizing:border-box;border-radius:0 0 3px 0;padding:10px}.vditor-counter{padding:0 3px;position:absolute;bottom:10px;right:20px;color:#24292e;background-color:rgba(255,255,255,0.6);border-radius:3px;font-size:12px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}.vditor-counter--error{color:#d23f31;background-color:rgba(210,63,49,0.1)}.vditor-resize{padding:3px 0;cursor:row-resize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;width:100%;z-index:2}.vditor-resize--top{top:-3px}.vditor-resize--bottom{bottom:-3px}.vditor-resize>div{height:3px;background-color:#f6f8fa;-webkit-transition:all 0.15s ease-in-out;transition:all 0.15s ease-in-out}.vditor-resize:hover>div,.vditor-resize--selected>div{background-color:#4285f4}.vditor-resize:hover svg,.vditor-resize--selected svg{color:#fff}.vditor-resize svg{fill:currentColor;stroke-width:0;stroke:currentColor;width:13px;height:3px;display:block;margin:0 auto;color:#586069}.vditor-upload{position:absolute;height:3px;left:0;top:-2px;-webkit-transition:all 0.15s ease-in-out;transition:all 0.15s ease-in-out;background-color:rgba(66,133,244,0.8)}.vditor-tip{position:absolute;font-size:12px;top:10px;color:#fff;-webkit-animation-duration:.15s;animation-duration:.15s;-webkit-animation-fill-mode:both;animation-fill-mode:both;width:100%;text-align:center}.vditor-tip--show{display:block;-webkit-animation-name:slideInDown;animation-name:slideInDown}.vditor-tip__content{text-align:left;display:inline-block;line-height:16px;padding:3px 10px;border-radius:3px;background:rgba(66,133,244,0.8);position:relative}.vditor-tip__content ul{margin:2px 0;padding:0 0 0 18px}.vditor-tip__close{position:absolute;color:#586069;top:-7px;right:-15px;font-weight:bold;cursor:pointer}.vditor-tip__close:hover{color:#4285f4}.vditor-popover{background-color:#fff;position:absolute;box-shadow:0 1px 2px rgba(0,0,0,0.2);border-radius:3px;padding:5px 0;z-index:3;line-height:20px;list-style:none;color:#24292e;font-size:12px;margin:0;max-width:250px;min-width:80px;display:none}.vditor-hint{background-color:#fff;position:absolute;box-shadow:0 1px 2px rgba(0,0,0,0.2);border-radius:3px;padding:5px 0;z-index:3;line-height:20px;list-style:none;color:#24292e;font-size:12px;margin:0;max-width:250px;min-width:80px;display:none}.vditor-hint button{display:block;padding:3px 10px;border:0;border-bottom:1px solid #d1d5da;line-height:20px;width:100%;box-sizing:border-box;text-align:left;margin:0;background-color:transparent}.vditor-hint button:last-child{border-bottom:0}.vditor-hint--current,.vditor-hint button:hover{background-color:#4285f4 !important;color:#fff}.vditor-hint__emoji{font-size:16px;float:left;margin-right:3px}.vditor-hint img{height:20px;width:20px;float:left;margin-right:3px}.vditor-reset{font-variant-ligatures:no-common-ligatures;font-family:"Helvetica Neue","Luxi Sans","DejaVu Sans",Tahoma,"Hiragino Sans GB","Microsoft Yahei",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Segoe UI Symbol","Android Emoji","EmojiSymbols";word-wrap:break-word;overflow:auto;line-height:1.5;font-size:16px;word-break:break-word}.vditor-reset--anchor{padding-left:20px}.vditor-reset ul ul ul{list-style-type:square}.vditor-reset ul ul{list-style-type:circle}.vditor-reset ul{list-style-type:disc}.vditor-reset ul,.vditor-reset ol{padding-left:2em;margin-top:0;margin-bottom:16px}.vditor-reset li+li{margin-top:0.25em}.vditor-reset audio{max-width:100%}.vditor-reset audio:focus{outline:none}.vditor-reset video{max-height:90vh;max-width:100%}.vditor-reset img{max-width:100%}.vditor-reset img.emoji{cursor:auto;max-width:20px;vertical-align:sub}.vditor-reset h1,.vditor-reset h2,.vditor-reset h3,.vditor-reset h4,.vditor-reset h5,.vditor-reset h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.vditor-reset h1:hover .vditor-anchor svg,.vditor-reset h2:hover .vditor-anchor svg,.vditor-reset h3:hover .vditor-anchor svg,.vditor-reset h4:hover .vditor-anchor svg,.vditor-reset h5:hover .vditor-anchor svg,.vditor-reset h6:hover .vditor-anchor svg{visibility:visible}.vditor-reset h1{padding-bottom:0.3em;font-size:1.7em;border-bottom:1px solid #eee}.vditor-reset h2{padding-bottom:0.3em;font-size:1.5em;border-bottom:1px solid #eee}.vditor-reset h3{font-size:1.25em}.vditor-reset h4{font-size:1em}.vditor-reset h5{font-size:0.875em}.vditor-reset h6{font-size:0.85em}.vditor-reset hr{height:2px;padding:0;margin:24px 0;background-color:#e7e7e7;border:0}.vditor-reset p{margin-top:0;margin-bottom:16px}.vditor-reset blockquote{padding:0 1em;color:#777;border-left:0.25em solid #ddd;margin:0 0 16px 0}.vditor-reset blockquote p{margin:0}.vditor-reset ins>iframe{border:0}.vditor-reset iframe{border:1px solid #d1d5da;max-width:100%;box-sizing:border-box}.vditor-reset iframe.iframe__video{min-width:80%;min-height:36vh}.vditor-reset table{width:100%;border-collapse:collapse;empty-cells:show;margin-bottom:16px;display:block;overflow:auto;border-spacing:0}.vditor-reset table tr{background-color:#fff;border-top:1px solid #c6cbd1}.vditor-reset table td,.vditor-reset table th{padding:6px 13px;border:1px solid #dfe2e5;word-break:normal}.vditor-reset table th{font-weight:600}.vditor-reset table tbody tr:nth-child(2n){background-color:#f6f8fa}.vditor-reset code:not(.hljs):not(.highlight-chroma){padding:0.2em 0.4em;margin:0;font-size:85%;border-radius:3px;font-family:mononoki,Consolas,"Liberation Mono",Menlo,Courier,monospace;word-break:break-word;background-size:20px 20px;white-space:pre-wrap;background-color:rgba(27,31,35,0.05)}.vditor-reset pre>code{margin:0;font-size:85%;padding:0.5em;border-radius:5px;display:block;overflow:auto;white-space:pre;font-family:mononoki,Consolas,"Liberation Mono",Menlo,Courier,monospace;background-size:20px 20px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8AgMAAABHkjHhAAAACVBMVEWAgIBaWlo+Pj7rTFvWAAAAA3RSTlMHCAw+VhR4AAAA+klEQVQoz4WSMW7EQAhFPxKWNh2FCx+HkaZI6RRb5DYbyVfIJXLKDCFoMbaTKSw/8ZnPAPjaH2xgZcUNUDADD7D9LtDBCLZ45fbkvo/30K8yeI64pPwl6znd/3n/Oe93P3ho9qeh72btTFzqkz0rsJle8Zr81OLEwZ1dv/713uWqvu2pl+k0fy7MWtj9r/tN5q/02z89qa/L4Dc2LvM93kezPfXlME/O86EbY/V9GB9ePX8G1/6W+/9h1dq/HGfTfzT3j/xNo7522Bfnqe5jO/fvhVthlfk434v3iO9zG/UOphyPeinPl1J8Gtaa7xPTa/Dk+RIs4deMvwGvcGsmsCvJ0AAAAABJRU5ErkJggg==);word-break:initial;word-wrap:normal}.vditor-reset pre:hover div.vditor-copy{display:block}.vditor-reset kbd{display:inline-block;padding:3px 5px;font:11px Consolas, "Liberation Mono", Menlo, Courier, monospace;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:solid 1px #d1d5da;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.vditor-reset summary{cursor:pointer}.vditor-reset summary:focus{outline:none}.vditor-reset svg{height:auto;width:auto}.vditor-reset p:last-child,.vditor-reset blockquote:last-child,.vditor-reset pre:last-child,.vditor-reset ul:last-child,.vditor-reset ol:last-child,.vditor-reset hr:last-child{margin-bottom:0}.vditor-reset .language-echarts{overflow:hidden;height:420px}.vditor-task{list-style:none}.vditor-task input{margin:0 .2em .25em -1.6em;vertical-align:middle}.vditor-copy{position:relative;display:none;z-index:1}.vditor-copy textarea{position:absolute;left:-100000px;height:10px}.vditor-copy span{cursor:pointer;position:absolute;right:0.5em;top:0.5em;height:14px;width:14px;display:block;background-color:#f6f8fa;border-radius:3px;padding:3px}.vditor-copy svg{color:#586069;height:14px;width:14px !important;display:block;fill:currentColor}.vditor-linenumber{padding-left:4em !important;position:relative}.vditor-linenumber__rows{position:absolute;pointer-events:none;top:0.5em;left:0;width:3em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;counter-reset:linenumber}.vditor-linenumber__rows>span{pointer-events:none;display:block}.vditor-linenumber__rows>span::before{counter-increment:linenumber;content:counter(linenumber);color:rgba(158,150,150,0.38);display:block;padding-right:1em;text-align:right}.vditor-speech{position:absolute;display:none;background-color:#f6f8fa;border:1px solid #d1d5da;border-radius:3px;padding:3px;cursor:pointer;color:#586069}.vditor-speech:hover,.vditor-speech--current{color:#4285f4}.vditor-speech svg{height:14px;width:14px;fill:currentColor;display:block;stroke-width:0;stroke:currentColor}.vditor-anchor{float:left;padding-right:4px;margin-left:-20px}.vditor-anchor svg{visibility:hidden}.vditor-anchor:hover svg{visibility:visible}.vditor-anchor:focus{outline:none}.vditor--error{color:#d23f31;font-size:12px;display:block;line-height:16px}.vditor-wysiwyg{background-color:#fafbfc;box-sizing:border-box;-webkit-box-flex:1;flex:1;margin:0;white-space:pre-wrap}.vditor-wysiwyg[contenteditable="false"]{opacity:0.3;cursor:not-allowed}.vditor-wysiwyg:focus{outline:none;background-color:#fff}.user__site{float:left;margin-left:10px}.user__site svg{height:20px;width:20px;fill:currentColor}html{height:100%;max-height:100%;font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{height:100%;max-height:100%;font-family:"Merriweather", "Microsoft Yahei", 'Helvetica';letter-spacing:0.01rem;font-size:1.8rem;line-height:1.75em;color:#3A4145;-webkit-font-feature-settings:'kern' 1;-moz-font-feature-settings:'kern' 1;-o-font-feature-settings:'kern' 1;text-rendering:geometricPrecision;margin:0}::-moz-selection{background:#D6EDFF}::selection{background:#D6EDFF}a{color:#4A4A4A;-webkit-transition:color 0.3s ease;transition:color 0.3s ease}a:hover{color:#111}h1,h2,h3,h4,h5,h6{-webkit-font-feature-settings:'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1;-moz-font-feature-settings:'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1;-o-font-feature-settings:'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1;color:#2E2E2E;line-height:1.15em;font-family:"Open Sans", "Microsoft Yahei", 'Helvetica';text-rendering:geometricPrecision}h1{font-size:5rem}h2{font-size:3.6rem}h3{font-size:3rem}h4{font-size:2.5rem}h5{font-size:2rem}h6{font-size:2rem}img{max-width:100%;height:auto}p,ul,ol,dl{-webkit-font-feature-settings:'liga' 1, 'onum' 1, 'kern' 1;-moz-font-feature-settings:'liga' 1, 'onum' 1, 'kern' 1;-o-font-feature-settings:'liga' 1, 'onum' 1, 'kern' 1;margin:0 0 1.75em 0;text-rendering:geometricPrecision}ol,ul{padding-left:3rem}ol ol,ul ul,ul ol,ol ul{padding-left:2em;margin-bottom:0}dl dt{float:left;width:180px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap;font-weight:700;margin-bottom:1em}dl dd{margin-left:200px;margin-bottom:1em}li li{margin:0}hr{display:block;height:1px;border:0;border-top:#EFEFEF 1px solid;margin:3.2em 0;padding:0}blockquote{box-sizing:border-box;margin:1.75em 0 1.75em 0;padding:0 0 0 1.75em;border-left:#4A4A4A 0.4em solid}blockquote p{margin:0.8em 0;font-style:italic}blockquote small{display:inline-block;margin:0.8em 0 0.8em 1.5em;font-size:0.9em;color:#CCC}blockquote small:before{content:"\2014 \00A0"}blockquote cite{font-weight:700}blockquote cite a{font-weight:normal}mark{background-color:#fdffb6}code,tt{padding:1px 3px;font-family:Inconsolata, monospace, "Microsoft Yahei", 'Helvetica';font-size:0.85em;white-space:pre-wrap;border:#E3EDF3 1px solid;background:#F7FAFB;border-radius:2px}pre code,pre tt{font-size:inherit;white-space:pre-wrap;background:transparent;border:none;padding:0}.fn-clear:before,.fn-clear:after{display:table;content:""}.fn-clear:after{clear:both}.fn-left{float:left}.fn-right{float:right}.fn-none{display:none}.fn-vertical{display:table-cell;vertical-align:middle}.fn-wrap{width:80%;max-width:768px;margin:0 auto}@-webkit-keyframes fade-in-down{0%{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fade-in-down{0%{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes bounce{0%,10%,25%,40%,50%{-webkit-transform:translateY(0);transform:translateY(0)}20%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}30%{-webkit-transform:translateY(-5px);transform:translateY(-5px)}}@keyframes bounce{0%,20%,50%,80%,100%{-webkit-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}60%{-webkit-transform:translateY(-5px);transform:translateY(-5px)}}@-webkit-keyframes upbounce{0%,10%,25%,40%,50%{-webkit-transform:translateY(0);transform:translateY(0)}20%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}30%{-webkit-transform:translateY(-5px);transform:translateY(-5px)}}@keyframes upbounce{0%,20%,50%,80%,100%{-webkit-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}60%{-webkit-transform:translateY(-5px);transform:translateY(-5px)}}@font-face{font-family:'icomoon';src:url("fonts/icomoon.eot?hvf32e");src:url("fonts/icomoon.eot?hvf32e#iefix") format("embedded-opentype"),url("fonts/icomoon.ttf?hvf32e") format("truetype"),url("fonts/icomoon.woff?hvf32e") format("woff"),url("fonts/icomoon.svg?hvf32e#icomoon") format("svg");font-weight:normal;font-style:normal}[class^="icon-"],[class*=" icon-"]{font-size:2rem;font-family:'icomoon' !important;speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-qqz:before{content:"\e902"}.icon-register:before{content:"\e600"}.icon-logout:before{content:"\e601"}.icon-setting:before{content:"\e602"}.icon-gotop:before{content:"\e60a"}.icon-twitter:before{content:"\e60b"}.icon-login:before{content:"\e611"}.icon-arrow-left:before{content:"\f605"}.icon-menu:before{line-height:38px;content:"\f609";font-size:20px}.icon-wechat:before{content:"\e903"}.icon-sitemap:before{content:"\e900"}.icon-list:before{content:"\e901"}.avatar{border-radius:100%;float:left;height:24px;margin-right:9px;width:24px}.avatar-warp{width:10%;padding-right:10px;box-sizing:border-box}.avatar-48{box-shadow:0 0 2px #ddd;height:auto;width:48px;margin-right:10px;border-radius:24px}.form{width:100%;margin-top:50px}.form input,.form textarea,.form button{border:1px solid #CCCCCC;background-color:#FAFAFA;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,0.075) inset;padding:7px 8px;width:100%;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;font-family:"Microsoft Yahei", 'Helvetica';outline:none}.form button{width:auto;vertical-align:bottom}.form input:focus,.form textarea:focus{background-color:#FFF;box-shadow:0 1px 2px rgba(0,0,0,0.075) inset,0 0 5px rgba(81,167,232,0.5);border:1px solid #51A7E8}.error-msg{font-size:1.5rem;color:#9EABB3}.cmtFromSym{font-size:1rem;color:#9EABB3}.main-header{position:relative;display:table;width:100%;height:100vh;margin-bottom:5rem;text-align:center;background:#222 no-repeat center center;background-size:cover;overflow:hidden;background-image:url("../images/header-bg.jpg");min-height:50vh}.site-wrapper{position:relative;z-index:10;min-height:100%;background:#fff;-webkit-transition:-webkit-transform 0.5s ease;transition:-webkit-transform 0.5s ease;transition:transform 0.5s ease;transition:transform 0.5s ease, -webkit-transform 0.5s ease}.nav-opened .site-wrapper{overflow-x:hidden;margin-right:240px;-webkit-transition:margin 0.3s ease;transition:margin 0.3s ease}.page-title a{-webkit-animation:fade-in-down 0.6s;animation:fade-in-down 0.6s;-webkit-animation-delay:0.2s;animation-delay:0.2s;margin:10px 0 10px 0;font-size:5rem;letter-spacing:-1px;font-weight:700;font-family:"Open Sans", "Microsoft Yahei", 'Helvetica';color:#fff;text-shadow:0px 0px 3px rgba(0,0,0,0.9);text-decoration:none}.page-description,.page-description a{-webkit-animation:fade-in-down 0.9s;animation:fade-in-down 0.9s;-webkit-animation-delay:0.1s;animation-delay:0.1s;margin:0;font-size:2rem;line-height:1.5em;font-weight:400;letter-spacing:0.01rem;color:rgba(255,255,255,0.8)}.scroll-down{display:block;position:absolute;z-index:100;bottom:45px;left:50%;margin-left:-16px;width:34px;height:34px;font-size:34px;text-align:center;text-decoration:none;color:rgba(255,255,255,0.7);-webkit-animation:bounce 4s 2s infinite;animation:bounce 4s 2s infinite}.scroll-down:hover{color:#fff;-webkit-animation:none;animation:none}.menu-button{position:fixed;box-sizing:border-box;display:inline-block;float:right;height:38px;padding:0 15px;opacity:1;font-size:12px;text-transform:uppercase;line-height:46px;border-radius:3px;-webkit-transition:all 0.5s ease;transition:all 0.5s ease;right:20px;top:40px;text-decoration:none;font-family:'Open Sans', "Microsoft Yahei", 'Helvetica';z-index:30;overflow:hidden;background-color:#111;border:1px solid #111;color:#fff;cursor:pointer}.menu-button:hover{background:#fff}.menu-button:focus{outline:0}.nav-closed .menu-button:hover{color:#222}.nav-opened .menu-button{padding:0 12px;background:#111;border-color:#111;color:#fff;-webkit-transform:translate3D(50px, 0, 0);transform:translate3D(50px, 0, 0);-webkit-transition:all 0.3s ease;transition:all 0.3s ease;right:287px;z-index:10;width:46px;border-radius:3px 0 0 3px}.menu-button .word{float:right;margin:-4px 0 0 10px}.nav{position:fixed;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;top:0;right:0;bottom:0;z-index:5;width:220px;padding:10px 10px 0 10px;opacity:0;background:#111;margin-bottom:0;text-align:left;overflow-y:auto;color:#FFF;-webkit-transition:-webkit-transform 0.5s ease, opacity 0.3s ease 0.7s;-webkit-transition:opacity 0.3s ease 0.7s, -webkit-transform 0.5s ease;transition:opacity 0.3s ease 0.7s, -webkit-transform 0.5s ease;transition:transform 0.5s ease, opacity 0.3s ease 0.7s;transition:transform 0.5s ease, opacity 0.3s ease 0.7s, -webkit-transform 0.5s ease;overflow-x:hidden}.nav::-webkit-scrollbar{display:none}.nav ul{-webkit-box-flex:1;flex:1;margin:0;padding:0px 0 5%;list-style:none;counter-reset:item}.nav li{height:30px;line-height:1.4rem}.nav li:before{display:block;float:right;padding-right:4%;padding-left:5px;text-align:right;font-size:1.2rem;vertical-align:bottom;color:#B8B8B8;content:counter(item, lower-roman);counter-increment:item;line-height:2.5rem}.nav a{color:#989898;text-decoration:none;line-height:1.4;font-size:1.4rem}.nav a:hover,.nav a.current{color:#FFF}.nav li a{display:block;padding:0.6rem 4%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.nav li a:after{display:inline-block;content:" .......................................................";color:rgba(255,255,255,0.2);margin-left:5px}.nav .count{font-size:1rem;word-wrap:normal;word-break:break-all;white-space:nowrap}.nav .page-icon{float:left;height:14px;width:14px;margin:3px 4px 0 0}body.nav-closed .nav{-webkit-transform:translate3D(240px, 0, 0);transform:translate3D(240px, 0, 0)}body.nav-opened .nav{opacity:1;-webkit-transition:-webkit-transform 0.3s ease, opacity 0s ease 0s;-webkit-transition:opacity 0s ease 0s, -webkit-transform 0.3s ease;transition:opacity 0s ease 0s, -webkit-transform 0.3s ease;transition:transform 0.3s ease, opacity 0s ease 0s;transition:transform 0.3s ease, opacity 0s ease 0s, -webkit-transform 0.3s ease;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}article.post{position:relative;margin:4rem auto;padding-bottom:4rem;border-bottom:#EBF2F6 1px solid;word-wrap:break-word;width:80%}article.post .share{position:relative}article.post .share canvas{position:absolute;left:0;top:36px}.post-content--article{padding-bottom:10px}.post-content--article::-webkit-scrollbar{display:none}article.post:after{display:block;content:"";width:7px;height:7px;border:#E7EEF2 1px solid;position:absolute;bottom:-5px;left:50%;margin-left:-5px;background:#FFF;border-radius:100%;box-shadow:#FFF 0 0 0 5px}.post-title a{text-decoration:none}.post-tip{display:inline-block;text-transform:uppercase;font-size:1.3rem;white-space:nowrap;color:#9EABB3;cursor:text}.post-tip:hover{color:#9EABB3}.post-tip:visited{color:#fff}.post-excerpt p{margin:0;font-size:0.9em;line-height:1.7em}.post-meta{color:#9eabb3;font-family:"Open Sans", "Microsoft Yahei", 'Helvetica';font-size:1.5rem;line-height:2.2rem;margin:1.75rem 0 0 0}.post-meta a{color:#9EABB3;text-decoration:none}.post-meta a:hover{text-decoration:underline}.post-meta time{border-left:1px solid #d5dbde;display:inline-block;font-size:1.3rem;margin-left:8px;padding-left:12px;text-transform:uppercase;white-space:nowrap}.post-author{box-sizing:border-box;display:block;position:absolute;bottom:-57px;left:50%;margin-left:-40px;width:80px;height:80px;border-radius:100%;overflow:hidden;padding:6px;background:#fff;z-index:2;box-shadow:#E7EEF2 0 0 0 1px}.post-author a{background-size:cover;background-position:center center;width:68px;height:68px;display:block;border-radius:35px}.share .icon{cursor:pointer;-webkit-transition:all 0.2s ease-out 0s;transition:all 0.2s ease-out 0s;display:inline-block;font-size:16px;margin-top:15px}.share .icon:hover{-webkit-transform:rotate(360deg);transform:rotate(360deg);color:#9EABB3}.icon-weibo:before{content:"\e605"}.icon-twitter:before{content:"\e60b"}.icon-tencent:before{content:"\e60d"}.icon-google:before{content:"\e603"}.icon-gotop:before{content:"\E60A";font-weight:bold}.icon-gotop{cursor:pointer;position:fixed;bottom:30px;right:30px;-webkit-animation:upbounce 4s 2s infinite;animation:upbounce 4s 2s infinite;text-decoration:none;z-index:12}.icon-gotop:hover{color:#B8B8B8;-webkit-animation:none;animation:none}.pagination{font-family:"Open Sans", "Microsoft Yahei", 'Helvetica';font-size:1.3rem;color:#9eabb3;text-align:center}.pagination a{color:#9EABB3;-webkit-transition:all 0.2s ease;transition:all 0.2s ease;padding:0 15px;border:#bfc8cd 1px solid;text-decoration:none;display:inline-block;border-radius:4px}.pagination a:hover{border-color:#98a0a4;color:#889093}ul.comments{padding:0;list-style:none;margin-top:100px;position:relative}.comments li{padding:10px;white-space:normal;word-wrap:break-word;position:relative;border-bottom:#EBF2F6 1px solid}.comments li:hover{background-color:#F7F7F7}.comments li img{vertical-align:sub}.comments .comment-content{margin:8px 0 0}.comments li.comment-body-ref{position:absolute;z-index:10;background-color:#EBF2F6;border:#d5dbde 1px solid;width:86%;left:69px}.comments .post-meta{margin-top:0}#captcha,#captchaReply{height:27px;display:inline-block;vertical-align:inherit}.read-next{display:-webkit-box;display:flex;-webkit-box-align:stretch;align-items:stretch;margin-top:10rem}.read-next-story{display:-webkit-box;display:flex;-webkit-box-flex:1;flex-grow:1;min-width:50%;text-decoration:none;position:relative;text-align:center;color:#fff;background:#222 no-repeat center center;background-size:cover;overflow:hidden}.read-next-story a{color:#BBB}.read-next-story a:hover{color:#FFF}.read-next-story:hover:before{background:rgba(0,0,0,0.8);-webkit-transition:all 0.2s ease;transition:all 0.2s ease}.read-next-story:hover .post:before{color:#222;background:#fff;-webkit-transition:all 0.2s ease;transition:all 0.2s ease}.read-next-story:before{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,0.7);-webkit-transition:all 0.5s ease;transition:all 0.5s ease}.read-next-story .post{padding-top:6rem;padding-bottom:6rem;width:80%;position:relative;margin:0 auto}.read-next-story .post:before{content:"Read This Next";padding:4px 10px 5px;text-transform:uppercase;font-size:1.1rem;font-family:"Open Sans", "Microsoft Yahei", 'Helvetica';color:rgba(255,255,255,0.8);border:1px solid rgba(255,255,255,0.5);border-radius:4px;-webkit-transition:all 0.5s ease;transition:all 0.5s ease}.read-next-story.prev .post:before{content:"Read This Before"}.read-next-story h2{margin-top:1rem;color:#fff}.read-next-story p{margin:0;color:rgba(255,255,255,0.8)}.read-next+.site-footer{position:absolute;bottom:0;left:0;right:0;margin:0}#tags{padding:0}#tags li{list-style:none;float:left}#tags li a{border:1px solid #4A4A4A;display:inline-block;padding:10px;margin:1rem;border-radius:5px;text-decoration:none}#tags li a:hover{border:1px solid #FFF;color:#FFF;background-color:#4A4A4A}.dynamic .read-next-story>div{position:relative;width:60%;margin:50px auto;text-align:left}.dynamic a{text-decoration:none;margin:0;color:rgba(255,255,255,0.8)}.dynamic a:hover{color:rgba(255,255,255,0.5)}.site-footer{position:relative;margin:8rem 0 0 0;padding:1rem 15px;font-family:"Open Sans", "Microsoft Yahei", 'Helvetica';font-size:1rem;line-height:1.75em;color:#BBC7CC}.site-footer a{color:#BBC7CC;font-weight:bold;text-decoration:none}.site-footer a:hover{text-decoration:underline}@media only screen and (max-width: 900px){blockquote{margin-left:0}.main-header{box-sizing:border-box;height:auto;min-height:240px;height:60vh;padding:15% 0}.scroll-down{display:none}.page-title,.page-title a{font-size:4rem;letter-spacing:-1px}.page-description,.page-description a{font-size:1.8rem;line-height:1.5em}.post{font-size:0.95em}hr{margin:2.4em 0}ol,ul{padding-left:2em}h1{font-size:4.5rem}h2{font-size:3.6rem}h3{font-size:3.1rem}h4{font-size:2.5rem}h5{font-size:2.2rem}h6{font-size:1.8rem}.read-next{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;margin-top:4rem}}@media only screen and (max-width: 500px){.main-header{margin-bottom:15px;height:40vh}.pagination{width:auto;margin:2rem auto}.post{width:auto;margin-top:2rem;margin-bottom:2rem;margin-left:16px;margin-right:16px;padding-bottom:2rem;line-height:1.65em}hr{margin:1.75em 0}p,ul,ol,dl{font-size:0.95em;margin:0 0 2.5rem 0}.page-title,.page-title a{font-size:3rem}.post-excerpt p{font-size:0.85em}.page-description,.page-description a{font-size:1.6rem}h1,h2,h3,h4,h5,h6{margin:0 0 0.3em 0}h1{font-size:2.8rem;letter-spacing:-1px}h2{font-size:2.4rem;letter-spacing:0}h3{font-size:2.1rem}h4{font-size:1.9rem}h5{font-size:1.8rem}h6{font-size:1.8rem}.post-content img{padding:0;width:calc(100% + 32px);min-width:0;max-width:112%}.post-meta{font-size:1.3rem;margin-top:1rem}.site-footer{margin-top:3rem}.read-next{margin-top:2rem;margin-bottom:-37px}.read-next .post{width:100%}.menu-button{border:0;top:0;right:0}.nav-opened .site-wrapper{margin-right:0}.nav{z-index:11}.nav-closed .menu-button:hover{color:#FFF;background-color:transparent}.post-author{width:40px;height:40px;bottom:-37px;padding:3px;margin-left:-20px}.post-author a{width:34px;height:34px;display:block;border-radius:17px}.nav .count{line-height:1.5rem}#tags li a{padding:0 5px}}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment