博客园主题更新记录

本博客主题采用了 esofarcnblogs-theme-silence主题,使用感觉非常棒,给作者点个赞👍 本博客使用 Markdown 语法书写,同是使用 Mweb 客户端进行博客的发布,期间出现了很多问题,但是都一一解决了😄,过程记录于文章 使用Mweb发布博客到博客园平台 需要的小伙伴可以进行参考

介绍

一款专注阅读的博客园主题,主要面向于经常混迹 博客园 的朋友。其追求大道至简的终极真理,界面追求简洁、运行追求高效、部署追求简单。

特性

  • 💙 简洁优雅、精致漂亮的 UI 设计。
  • 💜 提供多种风格主题以便适应各类用户的偏好。
  • ❤️ 响应式设计,兼容手机端浏览器。
  • 💚 提供事无巨细的部署文档。
  • 💛 源码结构清晰并且注释完整,方便扩展。

开发

请先确保您正在使用的机器已经安装 Node.jsGit 客户端。

git clone https://github.com/esofar/cnblogs-theme-silence.git   # 克隆源码
cd cnblogs-theme-silence                                        # 进入项目
npm install                                                     # 安装依赖
npm run build                                                   # 重新构建

自定义功能

如果您想要新增一些个性化的交互功能模块,那么您应该先修改项目./src/silence.js脚本文件。您需要在该文件中为将要新增的功能模块添加一些新的方法,然后在入口方法init()中的适当位置去调用它们。该文件代码结构清晰、注释完整,若您具备一定的 Javascript 开发经验,应该可以很容易看明白,这里就不再过多赘述。

如果您想要自定义某些元素的样式或者是新增交互功能模块需要添加新的样式,那么您应该修改项目./src/themes/*.less样式文件,*.less取决于您选择应用的主题风格,您需要在该文件中编写自定义的样式。在修改之前,建议您先了解 Less 的基础用法。

若您想要将自定义的样式应用到所有主题风格,建议您直接修改项目./src/silence.less公共样式文件,不过在编写样式代码的时候需要考虑各个主题风格的兼容性。

完成您想做的一切后,在终端中执行npm run build命令重新构建项目,该命令会编译、压缩所有风格的样式文件./src/themes/*.less和脚本文件./src/silence.js,并将结果输出至项目./dist发布目录。

最后,参考「部署文档」重新安装主题即可。

新增主题风格

如果您不满意官方提供主题风格,那么您可以参考本节内容新增一个自己的主题风格。

首先进入项目./src/themes目录,新建一个新的主题风格样式文件,例如:example.less,然后在该文件中编写样式代码即可。其代码结构、编写规则请参考 goddess.less 文件。

样式代码编写完成后,需要在项目工程中配置该文件的编译命令,具体做法如下。

打开项目package.json文件,找到scripts节点,新增一个命令theme-example,用来编译样式文件example.less

"theme-example": "lessc ./src/themes/example.less ./dist/themes/example.min.css -clean-css",

然后,在build构建命令中追加上述样式文件编译命令theme-example

... & npm run theme-example

最后,在终端中执行npm run build命令重新构建项目,新增的主题风格example便会被输出至项目./dist发布目录。

风格

简约 · 蓝

暗黑 · 绿

女神 · 粉

源文件

CSS 文件

*{margin:0;padding:0}html{height:100%}body{background:#fff;height:100%;color:#314659;font-family:Lato,"PingFang SC","Microsoft YaHei",sans-serif;font-size:14px;font-weight:300}table{border-collapse:collapse;border-spacing:0}td{padding:5px}fieldset,img{border:0}ul{word-break:break-all}li{list-style:none}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}a{color:#314659;text-decoration:none;transition:all .3s ease}a:hover{color:#2D8CF0}::selection{background:#2D8CF0;color:#fff}#ad_c1,#ad_c2,#ad_t2,#author_profile,#green_channel,#under_post_kb,#under_post_news,.blogStats,.c_ad_block,.dayTitle{display:none}.clear{clear:both}#home{width:100%;min-width:930px;height:100%;margin:0 auto}#header{width:960px;position:fixed;top:0;right:0;left:0;margin:0 auto;border-top:0;background:#fff;opacity:.95;border-bottom:1px #eef2f8 solid;padding-bottom:0;display:block;height:60px;z-index:999}#blogTitle h1{font-size:25px;font-weight:600;font-family:Georgia;float:left;margin-top:15px}#blogTitle h2{display:none}#navigator{height:inherit;position:absolute;right:0;top:0}#navList{height:inherit;float:left}#navList>li{position:relative;float:left;height:inherit}#navList>li:hover i{width:100%;left:0}#navList>li>a:active,#navList>li>a:link,#navList>li>a:visited{float:left;font-size:17px;border-right:0;font-weight:300;text-align:center;width:auto;padding:19px 16px}#navList>li>i{width:0;height:4px;background-color:#2D8CF0;content:"";position:absolute;left:50%;bottom:0;transition:.7s}#navList .open{transform:rotate(180deg) scaleX(-1);transition:.3s}#navList .esa-sub-navs{position:absolute;width:130px;top:60px;left:calc(50% - 65px);display:none}#navList .esa-sub-navs .caret{border-top:0 solid transparent;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid #fff;width:0;position:relative;left:calc(50% - 8px)}#navList .esa-sub-navs ul{background-color:#fff;border-radius:3px;box-shadow:0 1px 15px rgba(27,31,35,.15);padding:10px;text-align:center}#navList .esa-sub-navs ul li{float:none}#navList .esa-sub-navs ul li a{font-size:15px;border-right:0;color:#314659;display:block;width:100%;padding:10px 0;height:inherit;border-bottom:1px solid transparent}#navList .esa-sub-navs ul li a:hover{color:#2D8CF0;border-color:#2D8CF0}#main{width:960px;margin:0 auto;min-height:calc(100% - 135px);padding:75px 10px 0 10px;animation-name:fadeIn;animation-duration:1s;animation-iteration-count:1;-webkit-animation-name:fadeIn;-webkit-animation-duration:1s;-webkit-animation-iteration-count:1}#mainContent{float:right;margin-left:-25em;width:100%}#mainContent .forFlow{margin:0 auto;margin-left:0;max-width:960px}#sideBar{width:230px;border-right:1px solid #eef2f8;font-weight:300;display:none;min-height:750px;padding:0 15px 0 0}#sideBar #profile_block{font-size:15px;line-height:1.6}#sideBar #profile_block #p_b_follow{margin:15px 0 10px 0;text-align:center}#sideBar #profile_block #p_b_follow a{border:1px solid #eef2f8;font-size:13px;padding:7px 89px;border-radius:4px}#sideBar #profile_block #p_b_follow a:hover{border-color:#2D8CF0}.newsItem{margin-bottom:10px}.newsItem .catListTitle{display:none}#blog-calendar{border:1px solid #eef2f8;border-radius:4px}#blog-calendar .CalDayHeader{font-weight:300}#blog-calendar .CalTodayDay{color:#2D8CF0;font-weight:400}#sideBarMain ul{line-height:1.6}.catListTitle{text-align:left;margin:20px 0;font-size:20px;font-weight:300;border-left:4px solid #eef2f8;padding-left:7px}#sidebar_search #widget_my_zzk .input_my_zzk{color:#314659;border:solid 1px #eef2f8;width:150px;height:32px;padding:0 7px;font-size:16px;border-radius:4px}#sidebar_search #widget_my_zzk .input_my_zzk:focus{outline:0}#sidebar_search #widget_my_zzk .btn_my_zzk{height:34px;font-size:14px;background-color:transparent;color:#314659;cursor:pointer;width:59px;outline:0;border:1px solid #eef2f8;border-radius:4px;transition:all .5s ease}#sidebar_search #widget_my_zzk .btn_my_zzk:hover{color:#2D8CF0;border:1px solid #2D8CF0}#sidebar_search #widget_my_google{display:none}#sidebar_toptags li{font-size:14px;height:19px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:5px 8px;border:1px solid #eef2f8;margin:0 6px 6px 0;display:inline-grid;transition:all .3s;border-radius:4px}#sidebar_toptags li a{color:#314659}#sidebar_toptags li:active,#sidebar_toptags li:link,#sidebar_toptags li:visited{border-color:#eef2f8}#sidebar_toptags li:hover{border-color:#2D8CF0}#sidebar_categories li,#sidebar_scorerank li,#sidebar_shortcut li{font-size:15px;height:40px;padding-left:3px;line-height:30px;white-space:nowrap;overflow:hidden;transition:all .5s;text-overflow:ellipsis;list-style:inside}#sidebar_categories li:hover,#sidebar_scorerank li:hover,#sidebar_shortcut li:hover{margin-left:7px}#sidebar_recentposts li,#sidebar_topcommentedposts li,#sidebar_topdiggedposts li,#sidebar_topviewedposts li{font-size:15px;padding:10px 0;transition:all .3s;text-align:justify;border-bottom:1px solid #eef2f8}#sidebar_recentposts li:nth-child(1),#sidebar_topcommentedposts li:nth-child(1),#sidebar_topdiggedposts li:nth-child(1),#sidebar_topviewedposts li:nth-child(1){border-top:1px solid #eef2f8}#sidebar_recentposts li,#sidebar_topcommentedposts li,#sidebar_topdiggedposts li,#sidebar_topviewedposts li{font-size:15px;padding:10px 0;transition:all .3s;text-align:justify;border-bottom:1px solid #eef2f8}#sidebar_recentcomments li{text-align:justify}#sidebar_recentcomments .recent_comment_title:nth-child(n+2){padding-top:10px}#sidebar_recentcomments .recent_comment_title:nth-child(1){border-top:1px solid #eef2f8;padding-top:10px}#sidebar_recentcomments .recent_comment_author{margin-right:0;text-align:right;padding-bottom:10px;border-bottom:1px solid #eef2f8}#taglist_title,.PostListTitle,.entrylistTitle,.myposts_title,.thumbTitle{font-size:20px;font-weight:300;margin-top:10px;text-align:left}.entrylistDescription{margin:10px auto;border-left:4px solid #eef2f8;text-align:justify;padding-left:7px}#myposts{margin-left:0}#myposts .PostList{font-size:14px;border-bottom:1px solid #eef2f8;padding:5px 0 9px 0;margin-right:0}#myposts .postTitl2{float:left}#myposts .postDesc2{font-size:13px;float:right}#myposts .postText2{clear:both;padding-top:10px}.postSeparator{margin-top:15px;margin-bottom:25px;border-top:1px solid #eef2f8;margin:0;border:none}.entrylist .postSeparator{margin:0;border:none}.day,.entrylistItem{border-bottom:1px solid #eef2f8;text-align:justify;padding:10px 0;margin-bottom:10px}.day .postTitle,.entrylist .entrylistPosttitle{font-size:20px}.day .postCon,.entrylist .entrylistPostSummary{font-size:16px;padding:15px 0}.day .postCon img,.entrylist .entrylistPostSummary img{height:100px;margin-left:10px}.day .postCon a,.entrylist .entrylistPostSummary a{border:1px solid #314659;border-radius:3px;padding:2px 9px;font-size:13px;margin-top:10px;display:table}.day .postCon a:after,.entrylist .entrylistPostSummary a:after{content:" \00bb"}.day .postCon a:hover,.entrylist .entrylistPostSummary a:hover{border:1px solid #2D8CF0}.day .postDesc,.entrylist .entrylistItemPostDesc{text-align:right}#topics .postTitle{font-size:21px;font-weight:300}#topics .postBody{font-size:16px;line-height:1.75;border-bottom:1px solid #eef2f8}#topics .postBody a{transition:all .3s ease}#topics .postBody a:hover{text-decoration:underline}#topics .postBody a:active,#topics .postBody a:link,#topics .postBody a:visited{color:#2D8CF0;text-decoration:none}#topics .postBody h1{font-size:21px;color:#314659}#topics .postBody h1 a:not([class=esa-anchor]){color:inherit;text-decoration:underline}#topics .postBody h2{font-size:20px;color:#314659}#topics .postBody h2 a:not([class=esa-anchor]){color:inherit;text-decoration:underline}#topics .postBody h3{font-size:19px;color:#314659}#topics .postBody h3 a:not([class=esa-anchor]){color:inherit;text-decoration:underline}#topics .postBody h4{font-size:18px;color:#314659}#topics .postBody h4 a:not([class=esa-anchor]){color:inherit;text-decoration:underline}#topics .postBody h5{font-size:17px;color:#314659}#topics .postBody h5 a:not([class=esa-anchor]){color:inherit;text-decoration:underline}#topics .postBody h6{font-size:16px;color:#314659}#topics .postBody h6 a:not([class=esa-anchor]){color:inherit;text-decoration:underline}#topics .postBody p{margin:13px auto}#topics .postBody hr{border-top:none;border-bottom:1px solid #eef2f8}#topics .postBody blockquote{border:none;color:#314659;margin:15px 0;padding:0 0 0 10px;border-left:4px solid #dde5f1}#topics .postBody em{padding-right:3px}#topics .postBody strong{margin:0 3px;font-weight:500}#topics .postBody img{max-width:960px!important;display:block;margin:15px 0 30px 0;border-radius:3px;box-shadow:0 1px 15px rgba(27,31,35,.15),0 0 1px rgba(106,115,125,.35)}#topics .postBody .cnblogs-markdown pre{white-space:pre;position:relative}#topics .postBody ol li,#topics .postBody ul li{margin:3px 0;font-size:16px;color:#314659}#topics .postBody ol li p,#topics .postBody ul li p{margin:0!important}#topics .postBody table{font-size:13px;border-collapse:collapse;border-spacing:0;empty-cells:show;border:1px solid #eef2f8;width:100%;margin:13px 0}#topics .postBody table th{font-family:inherit;font-size:inherit;background:#f7f7f7!important;white-space:nowrap;font-weight:600;border:1px solid #eef2f8!important;padding:8px 16px!important}#topics .postBody table td{border:1px solid #eef2f8!important;padding:8px 16px!important}#topics .postBody h1 code,#topics .postBody h2 code,#topics .postBody h3 code,#topics .postBody h4 code,#topics .postBody h5 code,#topics .postBody h6 code,#topics .postBody li code,#topics .postBody p code,#topics .postBody table code{color:#314659;line-height:1;font-family:consolas!important;vertical-align:middle;margin:0 3px;background:#f2f4f5!important;font-size:14px!important;padding:.2em .3em!important;border-radius:3px!important;border:1px solid #eee!important}#topics .postBody #BlogPostCategory{font-size:14px;margin-bottom:0}#topics .postBody #BlogPostCategory a{margin-left:5px}#topics .postBody #EntryTag{font-size:14px;margin-top:20px;color:grey;color:#314659}#topics .postBody #EntryTag a{color:#2D8CF0}#topics .postBody #post_next_prev{font-size:13px}#topics .postDesc{margin-top:5px;text-align:right}.cnblogs_code{background-color:#f2f4f5;padding-left:1em;padding-right:1em;border:none!important;border-radius:3px!important;font-family:Lucida Console,Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace!important}.cnblogs_code div{background-color:transparent;color:#656c73}.cnblogs_code img{margin:0!important}.cnblogs_code pre{color:#656c73;font-family:inherit!important}.cnblogs_code pre span{font-family:inherit!important;color:inherit!important}.cnblogs_code textarea{font-family:inherit!important;padding:5px;border:1px solid #3e4c42;color:#c5d4ef;background-color:#282c34}.cnblogs_code textarea:focus{outline:0}.cnblogs_code .code_img_closed,.cnblogs_code .code_img_opened{display:none!important}.cnblogs_code .cnblogs_code_toolbar{width:20px}.cnblogs_code .cnblogs_code_toolbar span{padding-right:0}.cnblogs_code .cnblogs_code_toolbar a:link img{background-color:transparent!important}.cnblogs_code .cnblogs_code_collapse{color:#656c73;border:1px solid #989fa6;border-radius:2px;background-color:transparent;display:inline-block;cursor:pointer;padding:5px 5px 2px 5px}#footer{border-top:1px solid #eef2f8;font-size:13px;text-align:center;padding:15px 0}.github-corner svg{fill:#2D8CF0}.louzhu{color:#2D8CF0;font-weight:500}.feedbackListSubtitle .sendMsg2This{background:0 0;padding-left:0;font-size:15px}.feedbackListSubtitle .sendMsg2This::before{content:"✉️"}.feedbackManage{float:right}.feedbackItem .feedbackCon{margin-bottom:10px;padding:10px 0;border-bottom:1px solid #eef2f8}.feedbackItem .feedbackCon .esa-comment-avatar{float:left}.feedbackItem .feedbackCon .esa-comment-avatar img{height:43px;width:43px;border-radius:4px;transition:all .5s ease-out;-webkit-transition:all .6s ease-out}.feedbackItem .feedbackCon .esa-comment-avatar img:hover{border-radius:50%}.feedbackItem .feedbackCon .comment_vote{margin-top:12px}.blog_comment_body{width:auto;border-radius:4px;padding:12px;margin-left:50px;background-color:#eef2f8;min-height:19px}.blog_comment_body img{border-radius:3px}#taglist_main{margin-top:0}#taglist_main table{width:100%}#taglist_main table tr td{padding:5px 20px 5px 0}#taglist_main table tr td .small{display:none}#taglist_main table tr td a{display:block;padding:5px;font-weight:300;height:19px;line-height:20px;text-align:center;border:1px solid #eef2f8;border-radius:4px;color:#314659}#taglist_main table tr td a:hover{border:1px solid #2D8CF0}.topicListFooter{text-align:right;margin-top:10px;margin-right:0}#nav_next_page,.pager{text-align:right;margin-right:0!important;color:#314659}#nav_next_page a,.pager a{padding:5px 10px;border:1px solid #eef2f8;border-radius:4px;margin:0 0 0 5px;color:initial}#nav_next_page a:hover,.pager a:hover{color:#2D8CF0;border:1px solid #2D8CF0}.pager span.current{padding:3px 7px;border:1px solid #2D8CF0;background-color:#2D8CF0;border-radius:4px;margin:0 0 0 5px}.esa-clipboard-button{font-size:12px;cursor:pointer;position:absolute;right:13px;top:10px;box-shadow:0 0 15px 0 rgba(0,0,0,.1);color:#314659;padding:0 6px;border-radius:5px}.esa-toolbar{position:fixed;display:grid;z-index:999;bottom:30px;right:30px}.esa-toolbar .esa-toolbar-contents,.esa-toolbar .esa-toolbar-follow,.esa-toolbar .esa-toolbar-gotop{height:45px;width:45px;font-weight:400;position:relative;outline:0;cursor:pointer;border:1px solid transparent;transition:color .2s linear,background-color .2s linear,border .2s linear,box-shadow .2s linear;margin-top:5px;border-color:#eef2f8;background-color:#fff;background-position:center;background-repeat:no-repeat}.esa-toolbar .esa-toolbar-contents:hover,.esa-toolbar .esa-toolbar-follow:hover,.esa-toolbar .esa-toolbar-gotop:hover{color:#2D8CF0;border-color:#2D8CF0}.esa-toolbar .esa-toolbar-gotop{display:none;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAACL0lEQVRIS+3TwWvTUBwH8O/vJSLrFBURFPSkoIiCVz3IilObFA/aNR0yEEk6EXfxH1D0L5DdyroMHaJL1a1Ikw3H6kVBHHjyIKKgMEQmbOqsTpv8JOkmna4mvQyRvVv4/fL78L7vPcIKLFoBA6tIUyn/e3H1F+xjYB4B8EyGp53RTkxF2VLkneQLTieYBwmQ/cEMfgsJh41U8k0YFAnJW3YPAb2Afxv5CZj2gdAK8BQgjuia8uJvUCiSt+wrBFxaGOJ8WYeTsQr2kscTAG1k5g+eJLV1dySeN4IaIsxMpuXkQMjW4kFh55aW0/F4vOp/D9wZ2+N67gQB25h5RmJx/Gyn8nQ5aFmk17bXtn7mGyDSAoBh6ppiEBHXDzFvje3wpADaxcAcGAkjoz76HfoDyVkPNsj44QA4GDQzrukZ9WKjKK7fG99crX4vA9gP8FePhJpNKw/r+5cgfXft7cLFOIDdCxFdNjT1atjt6S8W12NeHgXoEAPzgEgZWqK0+N8vZMAqHfAAB6CtzOwBlDUyqhkGLNYt63HLJ8zaBLQxUCWQpmvKsF8PEHNotN0jt0igGBjfIHBKT6t+ZE0t/yxjc3yfQEcBdplEl5FWblOfZWcE+CZAEgMfSXC73pGcbGp6XXMuN7lG3vR+GKBkcGeIz1N+qDRIRF1RH1YUvFwuy6+nKyM1iGepluVMtytJ1rlU4l2UIVF6fOjVdOUCs3gZ+uKjDAzrWUXCElpS/3/i+gn3gM6tu0xSdwAAAABJRU5ErkJggg==)}.esa-toolbar .esa-toolbar-contents{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAuUlEQVRIS2NkoANgpIMdDPSxZO6qbQeQffOf+X98SrD3w0WLdnL/5vi7lRo+ZZy7att/ZIMYGRi0k8K8rs1ctZufheH3B6pYMnv1dgdkg/5x/DmV7uv7bdWqVcwfGXltqWIJNQwhZAZ9Ip6QK6ghP4x8Mnfl1gaUJMzIODUpzOv1pG3b2Lk//6+kSnDRJZ/QxSfUCA5CZgyj1EXIq9SQp09w0aUUpk8+oUelRY2IJWQGfSKekCuoIQ8At39XNxqN1mQAAAAASUVORK5CYII=)}.esa-toolbar .esa-toolbar-follow{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAsUlEQVRIS2NkIAHMXbU98D/D/zn/GRlTU0M91xGrlZFYhSB1c1Zu62RkZChj+M/QmxzuVUKs3lFLRoOLcFoZTV30ySdzV29zY2BgtGT494+ghf8ZGF0YGRmskXP8pG3b2Lm/MqQx/PsvjBGrTEz/Gf8xHmWcs3LrC0ZGRnHC0Y6kAqlYmbNyqx0jI+NBnPr/M/xgpKlPwDYzPiUYRMguHE3Co8E1WtQTzvPDJ5+Q2+4CADezs7EkSK8aAAAAAElFTkSuQmCC)}.esa-profile-avatar{margin-top:15px;border-radius:3px;width:100%}.esa-follow-button{z-index:999;display:none;position:fixed;bottom:30px;right:30px;height:45px;width:45px;font-weight:400;outline:0;cursor:pointer;border:1px solid transparent;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:12px;border-radius:50px;color:#515a6e;background-color:#fff;border-color:#dcdee2}.esa-follow-button:hover{color:#2D8CF0;border-color:#2D8CF0;background-color:#fff}.esa-mobile-menu{display:none;position:fixed;top:7px;right:15px;z-index:941113;font-size:1.5em;cursor:pointer;color:#7f7f7f}.esa-mobile-menu:after{content:"\2630";font-size:1.5em;font-family:fontello}.esa-catalog{position:fixed;top:120px;right:1px;width:auto;height:auto;z-index:1000}.esa-catalog-title{cursor:move;padding-left:12px;width:100%;height:35px;line-height:36px;border-bottom:1px solid #eef2f8;font-size:12px;font-weight:600;color:#314659}.esa-catalog-title:before{content:"\2632";margin-right:5px}.esa-catalog-close{position:absolute;right:15px;top:10px;cursor:pointer}.esa-catalog-contents{overflow:hidden;display:none;color:#314659;border:1px solid #eef2f8;min-width:150px;opacity:1;font-size:13px;background-color:#fff;z-index:19941112}.esa-catalog-contents ul{padding:10px 15px;max-height:350px;overflow-y:auto}.esa-catalog-contents ul li{margin-top:5px;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;color:#314659}.esa-catalog-contents ul li code{font-family:inherit}.esa-catalog-contents ul li a:hover{color:#2D8CF0;text-decoration:none}.esa-catalog-contents ul li .level1{margin-left:0}.esa-catalog-contents ul li .level2{margin-left:10px}.esa-catalog-contents ul li .level3{margin-left:26px}.esa-anchor{opacity:0;-webkit-transition:opacity .3s ease;transition:opacity .3s ease;margin-left:8px}.esa-post-signature{padding:12px 24px 12px 30px;margin-top:15px;margin-left:5px;border-left-width:4px;font-size:15px;line-height:2;border-left-style:solid;background-color:#f8f8f8;position:relative;border-bottom-right-radius:2px;border-top-right-radius:2px;border-left-color:#2D8CF0;z-index:1}.esa-post-signature:before{content:"!";background-color:#2D8CF0;position:absolute;top:25px;left:-12px;color:#fff;width:20px;height:20px;border-radius:100%;text-align:center;line-height:20px;font-weight:700;font-size:14px}.esa-post-signature p{margin:0!important}.esa-post-signature a{color:#314659!important}.esa-layer{position:fixed;top:70px;text-align:center;line-height:25px;font-size:15px;font-family:inherit;width:100%;display:none;z-index:9999999}.esa-layer-content{position:relative;background:rgba(0,0,0,.7);max-width:250px;padding:5px 10px;font-size:14px;border-radius:5px;color:#e0e0e0;display:inline-block}#div_digg{position:static;float:none;margin:35px auto 85px auto;z-index:-1;width:200px}#div_digg .buryit,#div_digg .diggit{background:#fff;margin:0;display:inline-block;width:auto;height:32px;border-width:0;cursor:pointer;color:#fff;user-select:none;padding:0 10px;border-radius:5px;transition:color .2s linear,background-color .2s linear,border .2s linear,box-shadow .2s linear}#div_digg .diggit{background-color:#18b566;border-color:#18b566}#div_digg .diggit:hover{background-color:#47cb89;border-color:#47cb89}#div_digg .buryit{background-color:#ed4014;border-color:#ed4014}#div_digg .buryit:hover{background-color:#f16643;border-color:#f16643}#div_digg .buryit .burynum,#div_digg .diggit .diggnum{color:snow;display:inline-block;font-size:15px;position:relative;top:5px;width:65px}#div_digg .diggit .diggnum:before{content:"\63a8\8350";font-size:15px;margin-right:5px}#div_digg .buryit .burynum:before{content:"\53cd\5bf9";font-size:15px;margin-right:5px}.feedback_area_title{font-size:20px;border-bottom:1px solid #eef2f8;margin-bottom:15px;padding-bottom:5px}.commentform #commentform_title{background-image:none;padding-left:0;font-size:20px}.commentform #tip_comment{color:#2D8CF0!important;margin:15px 0;display:block}.commentform .comment_textarea{width:100%;border:1px solid #eef2f8;background-color:transparent;padding:0}.commentform .comment_textarea:focus{outline:0}.commentform .comment_textarea:hover{border-color:#2D8CF0}.commentform .commentbox_title{border-bottom:1px solid #eef2f8}.commentform .commentbox_title .commentbox_title_left .commentbox_tab{margin:0;padding:0 15px}.commentform .commentbox_title .commentbox_title_left .active{border-bottom:2px solid #2D8CF0;color:#2D8CF0}.commentform .commentbox_title .commentbox_title_right{margin:0 10px 0 0}.commentform .commentbox_title .commentbox_title_right .comment_svg:hover,.commentform .commentbox_title .commentbox_title_right .comment_svg_stroke:hover{fill:#2D8CF0;stroke:#2D8CF0}.commentform #tbCommentBody,.commentform #tbCommentBodyPreview{padding:10px 15px}.commentform #btn_comment_submit{width:auto;height:auto;border-width:0;cursor:pointer;color:#fff;background-color:#2D8CF0;border-color:#2D8CF0;font-weight:300;user-select:none;padding:5px 17px;font-size:13px;border-radius:4px;outline:0;transition:all .3s}.commentform #btn_comment_submit:hover{opacity:.7}.commentform .comment_my_posted>img{display:none}.commentform .bq_post_comment{margin-top:5px;font-size:13px;display:block;color:#314659;background-color:#eef2f8;border:none;border-radius:4px;padding:1px 15px}.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}::-webkit-scrollbar{width:3px;height:3px}::-webkit-scrollbar-thumb{border-radius:1px;box-shadow:inset 0 0 5px #314659;background:#314659}::-webkit-scrollbar-track{background:0 0;border-radius:1px}::-moz-selection,::selection{color:#2D8CF0}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}[data-tips]{overflow:hidden}[data-tips]:hover{overflow:visible}[data-tips]::after,[data-tips]::before{position:absolute;transition:all .3s;transform:translate3d(-50%,0,0);opacity:0;left:37px;z-index:10}[data-tips]::before{content:attr(data-tips);border-radius:6px;background-color:rgba(100,100,100,.8);color:#fff;height:24px;line-height:24px;padding:0 6px;font-size:12px;white-space:nowrap;top:-24px;left:50%}[data-tips]::after{content:"";border:5px solid #333;border-color:rgba(100,100,100,.8) transparent transparent transparent;top:0;left:50%}[data-tips]:hover::after,[data-tips]:hover::before{opacity:1}[data-tips]:hover::after,[data-tips]:hover::before{transform:translate3d(-50%,-7px,0)}.esa-sponsor{position:relative;width:100%;margin-top:70px;height:160px}.esa-sponsor .posa{position:absolute}.esa-sponsor .tr3{transition:all .3s}.esa-sponsor .blur{-webkit-filter:blur(3px);filter:blur(3px)}.esa-sponsor .text{position:absolute;left:calc(50% - 120px);top:calc(50% - 60px);font-size:12px;width:70px;height:70px;line-height:70px;color:#fff;background:#ffd886 url(https://images.cnblogs.com/cnblogs_com/esofar/1504962/o_like.png) no-repeat center 10px;background-size:20px;border-radius:35px;text-align:center;z-index:-1;transform:rotatez(-15deg)}.esa-sponsor .github{position:absolute;left:calc(50% + 135px);top:calc(50% - 30px);width:24px;height:24px;background:no-repeat center center url(https://images.cnblogs.com/cnblogs_com/esofar/1504962/o_github.png);background-size:contain;opacity:.3;transform:rotatez(15deg)}.esa-sponsor .box{left:calc(50% - 150px);top:calc(50% - 15px);background-color:#fff;border:1px solid #ddd;border-radius:6px;width:299px;height:28px;float:left;z-index:1;margin-left:0}.esa-sponsor .box li{width:99px;float:left;margin:0!important;text-align:center;border-left:1px solid #ddd;background:no-repeat center center;background-color:rgba(204,217,220,.1);background-size:45px;transition:all .3s;cursor:pointer;overflow:hidden;line-height:600px;height:28px;-webkit-filter:grayscale(1);filter:grayscale(1);opacity:.5;list-style:none;list-style-type:none;margin:0;padding:0}.esa-sponsor .box li:hover{background-color:rgba(204,217,220,.3);-webkit-filter:grayscale(0);filter:grayscale(0);opacity:1}.esa-sponsor .box li:first-child{border-width:0}.esa-sponsor .box li a{display:block}.esa-sponsor .box .paypal{background-image:url(https://images.cnblogs.com/cnblogs_com/esofar/1504962/o_paypal.png)}.esa-sponsor .box .alipay{background-image:url(https://images.cnblogs.com/cnblogs_com/esofar/1504962/o_alipay.png)}.esa-sponsor .box .wechat{background-image:url(https://images.cnblogs.com/cnblogs_com/esofar/1504962/o_wechat.png)}.esa-sponsor #QRBox{top:0;left:0;z-index:1;display:none;perspective:400px;width:100%;height:100%}.esa-sponsor #QRBox #MainBox{cursor:pointer;position:absolute;text-align:center;width:200px;height:200px;left:calc(50% - 100px);top:calc(50% - 100px);background:#fff no-repeat center center;background-size:190px;border-radius:6px;box-shadow:0 2px 7px rgba(0,0,0,.3);opacity:0;transition:all 1s ease-in-out;transform-style:preserve-3d;transform-origin:center center;overflow:hidden}.esa-sponsor #MainBox.showQR{opacity:1;animation-name:showQR;animation-duration:3s;animation-timing-function:ease-in-out;animation-iteration-count:1;animation-fill-mode:forwards;-webkit-animation:showQR 3s ease-in-out 0s 1 normal forwards}@keyframes showQR{from{transform:rotateX(90deg)}8%{opacity:1;transform:rotateX(-60deg)}18%{opacity:1;transform:rotateX(40deg)}34%{opacity:1;transform:rotateX(-28deg)}44%{opacity:1;transform:rotateX(18deg)}58%{opacity:1;transform:rotateX(-12deg)}72%{opacity:1;transform:rotateX(9deg)}88%{opacity:1;transform:rotateX(-5deg)}96%{opacity:1;transform:rotateX(2deg)}to{opacity:1}}.esa-sponsor #MainBox.hideQR{opacity:1;animation-name:hideQR;animation-duration:.5s;animation-timing-function:ease-in-out;animation-iteration-count:1;animation-fill-mode:forwards;-webkit-animation:hideQR .5s ease-in-out 0s 1 normal forwards}@keyframes hideQR{20%,50%{transform:scale(1.08,1.08);opacity:1}to{opacity:0;transform:rotateZ(40deg) scale(.6,.6)}}::-moz-selection,::selection{background-color:#2D8CF0;color:#e1e1e1}.cnblogs-markdown .hljs{display:block;color:#333;overflow-x:auto;background:#F2F4F5!important;border:none!important;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace!important;padding:1em!important;font-size:14px!important}.hljs-comment,.hljs-meta{color:#969896}.hljs-emphasis,.hljs-quote,.hljs-string,.hljs-strong,.hljs-template-variable,.hljs-variable{color:#df5000}.hljs-keyword,.hljs-selector-tag,.hljs-type{color:#a71d5d}.hljs-attribute,.hljs-bullet,.hljs-literal,.hljs-symbol{color:#0086b3}.hljs-name,.hljs-section{color:#63a35c}.hljs-tag{color:#333}.hljs-attr,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-selector-pseudo,.hljs-title{color:#795da3}.hljs-addition{color:#55a532;background-color:#eaffea}.hljs-deletion{color:#bd2c00;background-color:#ffecec}.hljs-link{text-decoration:underline}

js 文件

"use strict";var _createClass=function(){function s(t,a){for(var e=0;e<a.length;e++){var s=a[e];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(t,a,e){return a&&s(t.prototype,a),e&&s(t,e),t}}();function _classCallCheck(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}!function(h){h.extend({silence:function(t){var a=new s;a.init(t)}});var a={css:"https://unpkg.com/lightbox2@2.11.1/dist/css/lightbox.min.css",js:"https://unpkg.com/lightbox2@2.11.1/dist/js/lightbox.min.js"},e={js:"https://unpkg.com/clipboard@2.0.0/dist/clipboard.min.js"},s=(_createClass(t,[{key:"init",value:function(t){t&&h.extend(!0,this.defaluts,t),this.buildCustomNavigation(),this.buildGithubCorner(),this.buildCopyright(),this.buildBloggerProfile(),this.isPostPage?(this.buildPostCatalog(),this.buildPostCodeCopyBtns(),this.buildPostLightbox(),this.buildPostSignature(),this.buildPostSponsor(),this.buildToolbar(),this.buildPostCommentAvatars()):this.showSideBar()}},{key:"showMessage",value:function(t){h("body").prepend('<div class="esa-layer"><span class="esa-layer-content">'+t+"</span></div>");var a=h(".esa-layer");a.fadeIn(200),setTimeout(function(){a.remove()},2e3)}},{key:"showSideBar",value:function(){h(this.cnblogs.forFlow).css({marginLeft:"260px"}),h(this.cnblogs.sideBar).show()}},{key:"buildCustomNavigation",value:function(){var t=this,s=h(this.cnblogs.navList),o=h("body").css("color"),a=this.defaluts.navigation;a&&a.length&&(h.each(a.reverse(),function(t,a){var e;a.chilren&&a.chilren.length?(e=a.chilren.map(function(t){return'<li><a class="menu" href="'+t.url+'">'+t.title+"</a></li>"}),s.find("li").eq(1).after('\n                            <li class="esa-has-subnavs">\n                                <a class="menu" href="javascript:void(0);">'+a.title+'\n                                    <svg class="arrow" width="9px" height="9px" viewBox="0 0 13 7" xml:space="preserve" fill="none" stroke="'+o+'"><path d="M1,1l6.2,6L13,1"></path></svg>\n                                </a>\n                                <div class="esa-sub-navs"><div class="caret"></div><ul>'+e.join("")+"</ul></div>\n                            </li>")):s.find("li").eq(1).after('<li><a class="menu" href="'+a.url+'">'+a.title+"</a></li>")}),h("li.esa-has-subnavs").hover(function(){h(this).find("svg").addClass("open"),h(this).find(".esa-sub-navs").fadeIn("fast")},function(){h(this).find("svg").removeClass("open"),h(this).find(".esa-sub-navs").hide()})),h.each(s.children("li"),function(t,a){h(a).append("<i></i>")}),h("body").prepend('<div class="esa-mobile-menu"></div>'),h(".esa-mobile-menu").on("click",function(){h(t.cnblogs.navigator).fadeToggle(200)})}},{key:"buildCopyright",value:function(){var t='<span class="esa-copyright">& Theme <a href="https://github.com/esofar/cnblogs-theme-silence" target="_blank">Silence v'+this.version+"</a></span>";h(this.cnblogs.footer).append(t)}},{key:"buildPostSignature",value:function(){var t,a,e=this.defaluts.signature;e.enable&&(t=h(this.cnblogs.postTitle).attr("href"),a='<div class="esa-post-signature"> \n                        <p>作者:'+(e.author||h(this.cnblogs.publicProfile).find("a:eq(0)").html())+'</p> \n                        <p>出处:<a href="'+t+'">'+t+'</a></p> \n                        <p>版权:本文采用「<a href="'+e.link+'"  target="_blank">'+e.license+"</a>」知识共享许可协议进行许可。</p> \n                        <p>"+(e.remark||"")+"</p> \n                    </div>",h(this.cnblogs.postSignature).html(a).show())}},{key:"buildPostCommentAvatars",value:function(){function t(){h(n.cnblogs.postCommentBody).before("<div class='esa-comment-avatar'><a target='_blank'><img /></a></div>");for(var t=h(n.cnblogs.feedbackContent),a=0;a<t.length;a++){var e="https://pic.cnblogs.com/face/sample_face.gif",s=h(t[a]).find("span:last")[0];s&&(e=h(s).html().replace("http://","//")),h(t[a]).find(".esa-comment-avatar img").attr("src",e);var o=h(t[a]).parent().find(".comment_date").next().attr("href");h(t[a]).find(".esa-comment-avatar a").attr("href",o)}}var a,e,n=this;h(this.cnblogs.postCommentBody).length?t():(a=1,e=setInterval(function(){h(n.cnblogs.postCommentBody).length&&(clearInterval(e),t()),10==a&&clearInterval(e),a++},500))}},{key:"buildPostSponsor",value:function(){var a,e,s,o=this.defaluts.sponsor,t=this.defaluts.github,n=this;function i(t){t&&s.css("background-image","url("+t+")"),a.find(".text, .box, .github").addClass("blur"),e.fadeIn(300,function(){s.addClass("showQR")})}o.enable&&(h("#blog_post_info").prepend('\n                <div class="esa-sponsor">\n                    <a class="github" href="'+(t.enable?t.link:"https://github.com/Kaiyuan/donate-page")+'" target="_blank" class="posa tr3" title="Github"></a>\n                    <div class="text tr3">'+(o.text||"Sponsor")+'</div>\n                    <ul class="box posa tr3">\n                        <li class="paypal">PayPal</li>\n                        <li class="alipay">AliPay</li>\n                        <li class="wechat">WeChat</li>\n                    </ul>\n                    <div id="QRBox" class="posa left-100">\n                        <div id="MainBox"></div>\n                    </div>\n                </div>'),a=h(".esa-sponsor"),e=h("#QRBox"),s=h("#MainBox"),a.find(".box>li").click(function(){var t=h(this).attr("class");if("paypal"===t){if(!o.paypal)return n.showMessage("博主忘记设置 PayPal 收款地址");window.open(o.paypal,"_blank")}else if("alipay"===t){if(!o.alipay)return n.showMessage("博主忘记设置支付宝收款二维码");i(o.alipay)}else if("wechat"===t){if(!o.wechat)return n.showMessage("博主忘记设置微信收款二维码");i(o.wechat)}}),s.click(function(){s.removeClass("showQR").addClass("hideQR"),setTimeout(function(t){e.fadeOut(300,function(){s.removeClass("hideQR")}),a.find(".text, .box, .github").removeClass("blur")},600)}))}},{key:"buildPostCatalog",value:function(){var l=this.defaluts.catalog;if(l.enable){var t=[l.level1,l.level2,l.level3],a=h(this.cnblogs.postBody).find(t.join(","));if(!a.length)return!1;var e=h('<div class="esa-catalog">\n                        <div class="esa-catalog-contents">\n                            <div class="esa-catalog-title">CONTENTS</div>\n                            <a class="esa-catalog-close">✕</a>\n                        </div>\n                    </div>'),r=0,c=0,d=0,u="<ul>",p=(window.crypto||window.msCrypto).getRandomValues(new Uint32Array(a.length));h.each(a,function(t,a){var e=h(a)[0].tagName.toLowerCase(),s=h(a).text(),o="",n=s;if(l.index)e===l.level1?(d=c=0,o='<span class="level1">'+ ++r+". </span>"):e===l.level2?(d=0,o='<span class="level2">'+r+"."+ ++c+". </span>"):e===l.level3&&(o='<span class="level3">'+r+"."+c+"."+ ++d+". </span>");else switch(e){case l.level1:n='<span class="level1">'+n+"</span>";break;case l.level2:n='<span class="level2">'+n+"</span>";break;case l.level3:n='<span class="level3">'+n+"</span>"}var i=p[t];u+='<li class="li_'+e+'" title="'+s+'">\n                            <i class="'+i+'" ></i><a class="esa-anchor-link">'+(o+n)+"</a>\n                        </li>",h(a).attr("id",""+i).append('<a href="#'+i+'" class="esa-anchor">#</a>').hover(function(){h(a).find(".esa-anchor").css("opacity",1)},function(){h(a).find(".esa-anchor").css("opacity",0)})}),u+="</ul>",e.find(".esa-catalog-contents").append(u),e.appendTo("body");var i,s=h(".esa-catalog-contents");s.fadeIn(),h(".esa-anchor-link").on("click",function(){var t=h("#"+h(this).prev("i").attr("class")).offset().top;h("html, body").animate({scrollTop:t-70},300)}),h(".esa-catalog-close").on("click",function(){s.hide()}),l.move&&(i={start:!1,pois:[0,0]},h(".esa-catalog-title").on("mousedown",function(t){t.preventDefault(),i.start=!0;var a=h(".esa-catalog").position(),e=t.clientX-parseFloat(a.left),s=t.clientY-parseFloat(a.top);i.pois=[e,s]}),h(document).on("mousemove",function(t){var a,e,s,o,n;i.start&&(a=t.clientX-i.pois[0],e=t.clientY-i.pois[1],s="fixed"===h(".esa-catalog").css("position"),t.preventDefault(),i.stX=s?0:h(window).scrollLeft(),i.stY=s?0:h(window).scrollTop(),o=h(window).width()-h(".esa-catalog").outerWidth()+i.stX,n=h(window).height()-h(".esa-catalog").outerHeight()+i.stY,a<i.stX&&(a=i.stX),o<a&&(a=o),e<i.stY&&(e=i.stY),n<e&&(e=n),h(".esa-catalog").css({left:a,top:e,right:"auto"}))}).on("mouseup",function(t){i.start&&(i.start=!1)}))}}},{key:"buildGithubCorner",value:function(){var t,a=this.defaluts.github;a.enable&&(t=a.fill?"fill:"+a.fill+";":"",h("body").append('<a href="'+a.link+'" class="github-corner" title="Fork me on GitHub" target="'+a.target+'">\n                        <svg width="60" height="60" viewBox="0 0 250 250" style="'+t+" color:"+a.color+'; z-index: 999; position: fixed; top: 0; border: 0; left: 0; transform: scale(-1, 1);" aria-hidden="true">\n                            <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>\n                            <path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>\n                            <path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path>\n                        </svg>\n                    </a>'))}},{key:"buildPostCodeCopyBtns",value:function(){var a=this,t=h(".postBody .cnblogs-markdown").find("pre");if(!t.length)return!1;h.each(t,function(t,a){h(a).find("code").attr("id","copy_target_"+t),h(a).prepend('<div data-tips="复制代码" class="esa-clipboard-button" data-clipboard-target="#copy_target_'+t+'">Copy</div>')}),h.getScript(e.js,function(){var t=new ClipboardJS(".esa-clipboard-button");t.on("success",function(t){a.showMessage("代码已复制"),t.clearSelection()}),t.on("error",function(t){a.showMessage("代码复制失败")})})}},{key:"buildToolbar",value:function(){var e=this,t=this.defaluts.catalog;h("body").append('<div class="esa-toolbar">\n                <button class="esa-toolbar-gotop" data-tips="返回顶部"></button>\n                <button class="esa-toolbar-contents" data-tips="阅读目录"></button>\n                <button class="esa-toolbar-follow" data-tips="关注博主"></button>\n            </div>');var a=h(".esa-toolbar-gotop"),s=h(".esa-toolbar-contents"),o=h(".esa-toolbar-follow");t.enable?s.on("click",function(){var t=h(".esa-catalog-contents");"none"==t.css("display")?t.fadeIn():t.hide()}):s.remove(),a.on("click",function(){h(window).scrollTop(0)}),h(window).scroll(function(){200<this.scrollY?a.fadeIn():a.fadeOut()}),o.on("click",function(){loadLink(location.protocol+"//common.cnblogs.com/scripts/artDialog/ui-dialog.css",function(){loadScript(location.protocol+"//common.cnblogs.com/scripts/artDialog/dialog-min.js",function(){if(!isLogined)return login();if(c_has_follwed)return e.showMessage("您已经关注过该博主啦");var a=cb_blogUserGuid;h.ajax({url:getAjaxBaseUrl()+"Follow/FollowBlogger.aspx",data:'{"blogUserGuid":"'+a+'"}',dataType:"text",type:"post",contentType:"application/json; charset=utf-8",success:function(t){"未登录"==t?login():"关注成功,请选择分组"==t&&followByGroup(a,!0),e.showMessage(t)}})})})})}},{key:"buildBloggerProfile",value:function(){var t=this.defaluts.avatar,a=this.defaluts.favicon;!this.isPostPage&&t&&h(this.cnblogs.sideBarMain).prepend('<img class="esa-profile-avatar" src="'+t+'" />'),a&&h("head").append('<link rel="shortcut icon" href="'+a+'" type="image/x-icon" />')}},{key:"buildPostLightbox",value:function(){var t=this;h("head").append('<link rel="stylesheet" href="'+a.css+'"/>'),h.getScript(a.js,function(){h(t.cnblogs.postBody).find("img").wrap(function(){return'<a href="'+h(this).attr("src")+'" data-title="'+(h(this).attr("title")||"")+'" data-alt="'+(h(this).attr("alt")||"")+'" data-lightbox="roadtrip"></a>'}),h(".code_img_closed, .code_img_opened, .cnblogs_code_copy img").unwrap()})}},{key:"cnblogs",get:function(){return{header:"#header",blogTitle:"#blogTitle",publicProfile:"#profile_block",navigator:"#navigator",navList:"#navList",sideBar:"#sideBar",sideBarMain:"#sideBarMain",forFlow:".forFlow",postTitle:"#cb_post_title_url",postDetail:"#post_detail",postBody:"#cnblogs_post_body",postDigg:"#div_digg",postCommentBody:".blog_comment_body",feedbackContent:".feedbackItem > .feedbackCon",postSignature:"#MySignature",footer:"#footer"}}},{key:"isPostPage",get:function(){return 0<h(this.cnblogs.postDetail).length}}]),t);function t(){_classCallCheck(this,t),this.defaluts={avatar:null,favicon:null,navigation:[],catalog:{enable:!1,move:!0,index:!0,level1:"h2",level2:"h3",level3:"h4"},signature:{enable:!0,author:null,license:"署名-非商业性使用-相同方式共享 4.0 国际",link:"https://creativecommons.org/licenses/by-nc-sa/4.0/",remark:null},sponsor:{enable:!1,text:null,paypal:null,wechat:null,alipay:null},github:{enable:!1,color:"#fff",fill:null,link:null,target:"_self"}},this.version="2.0.3"}}(jQuery);
posted @ 2020-07-01 22:14  王永杰的网络日志  阅读(606)  评论(0编辑  收藏  举报