Commit 1f1710b2 authored by Liang Ding's avatar Liang Ding

🚧 #12256

parent 1493c52b
...@@ -335,9 +335,7 @@ public class CategoryConsole { ...@@ -335,9 +335,7 @@ public class CategoryConsole {
if (StringUtils.isBlank(uri)) { if (StringUtils.isBlank(uri)) {
uri = title; uri = title;
} }
if (!StringUtils.startsWith(uri, "/")) {
uri = '/' + uri;
}
mayExist = categoryQueryService.getByURI(uri); mayExist = categoryQueryService.getByURI(uri);
if (null != mayExist && !mayExist.optString(Keys.OBJECT_ID).equals(categoryId)) { if (null != mayExist && !mayExist.optString(Keys.OBJECT_ID).equals(categoryId)) {
final JSONObject jsonObject = QueryResults.defaultResult(); final JSONObject jsonObject = QueryResults.defaultResult();
...@@ -459,9 +457,7 @@ public class CategoryConsole { ...@@ -459,9 +457,7 @@ public class CategoryConsole {
if (StringUtils.isBlank(uri)) { if (StringUtils.isBlank(uri)) {
uri = title; uri = title;
} }
if (!StringUtils.startsWith(uri, "/")) {
uri = '/' + uri;
}
mayExist = categoryQueryService.getByURI(uri); mayExist = categoryQueryService.getByURI(uri);
if (null != mayExist) { if (null != mayExist) {
final JSONObject jsonObject = QueryResults.defaultResult(); final JSONObject jsonObject = QueryResults.defaultResult();
......
body,input,textarea{font-family:"Helvetica Neue","Luxi Sans","DejaVu Sans",Tahoma,"Hiragino Sans GB","Microsoft Yahei",sans-serif}html,body{min-width:1024px;color:#767676;background:#f1f2f7;font-size:13px}a{color:#4183c4;text-decoration:none}a:visited{color:#7ba9d6}a:active{color:#2c5d8d}a:hover{text-decoration:underline}button.selected{background:url("../images/bowknot/completed.png") no-repeat scroll right bottom transparent!important;color:#d54121!important;border-color:#b0b5b9!important}@font-face{font-family:'icomoon';src:url('fonts/icomoon.eot?1450');src:url('fonts/icomoon.eot?#iefix') format('embedded-opentype'),url('fonts/icomoon.ttf?1450') format('truetype'),url('fonts/icomoon.woff?1450') format('woff'),url('fonts/icomoon.svg#icomoon') format('svg');font-weight:normal;font-style:normal}.content-reset{font-family:"Helvetica Neue","Luxi Sans","DejaVu Sans",Tahoma,"Hiragino Sans GB","Microsoft Yahei",sans-serif;word-wrap:break-word;overflow:hidden;line-height:1.5}.content-reset ul,.content-reset ol{padding-left:2em;margin-top:0;margin-bottom:16px}.content-reset h1,.content-reset h2,.content-reset h3,.content-reset h4,.content-reset h5,.content-reset h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.content-reset h1{padding-bottom:.3em;font-size:2em}.content-reset h2{padding-bottom:.3em;font-size:1.5em}.content-reset h3{font-size:1.25em}.content-reset h4{font-size:1em}.content-reset h5{font-size:.875em}.content-reset h6{font-size:.85em}.content-reset p{margin-top:0;margin-bottom:16px}.content-reset blockquote{padding:0 1em;color:#777;border-left:.25em solid #ddd;margin-bottom:16px}.content-reset blockquote p{margin:0}.content-reset iframe{border:1px solid #ccc}.content-reset table{width:100%;border:1px solid #dedede;margin:15px auto;border-collapse:collapse;empty-cells:show}.content-reset thead{text-align:center}.content-reset td,.content-reset th{height:35px;border:1px solid #dedede;padding:0 10px}.content-reset th{font-weight:bold;text-align:center!important;background:rgba(158,188,226,0.2)}.content-reset tbody tr:nth-child(2n){background:rgba(158,188,226,0.12)}.content-reset tr:hover{background:#efefef}.content-reset code{padding:.2em .4em;margin:0;font-size:85%;background-color:rgba(252,41,41,0.12);border-radius:3px;color:#d23f31;font-family:mononoki,Consolas,"Liberation Mono",Menlo,Courier,monospace}.content-reset pre>code{padding:.5em;border-radius:0;color:#333;background-color:rgba(0,0,0,0.04);background-image:url(../images/code-bg.png);background-size:20px 20px;border-radius:5px}.content-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 #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}[class^="icon-"],[class*=" icon-"]{font-family:'icomoon';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}a[class^="icon-"],a[class*=" icon-"]{color:#333}a[class^="icon-"]:hover,a[class*=" icon-"]:hover{text-decoration:none;color:#4183c4}.icon-upload:before{content:"\f0ee"}.icon-copy:before{content:"\e908"}.icon-time:before{content:"\e906"}.icon-sortasc:before{content:"\e905"}.icon-locked:before{content:"\e61e"}.icon-close:before{content:"\e909"}.icon-points:before{content:"\e900"}.icon-goods:before{content:"\e904"}.icon-bold:before{content:"\e000"}.icon-italic:before{content:"\e001"}.icon-quote:before{content:"\e003"}.icon-unordered-list:before{content:"\e004"}.icon-ordered-list:before{content:"\e005"}.icon-link:before{content:"\e006"}.icon-image:before{content:"\e007"}.icon-play:before{content:"\e008"}.icon-music:before{content:"\e009"}.icon-contract:before{content:"\e00a"}.icon-fullscreen:before{content:"\e00b"}.icon-question:before{content:"\e00c"}.icon-info:before{content:"\e00d"}.icon-undo:before{content:"\e00e"}.icon-redo:before{content:"\e00f"}.icon-code:before{content:"\e011"}.icon-preview:before{content:"\e002"}.icon-navigation:before{content:"\e903"}.icon-thumbs-down:before{content:"\e901"}.icon-thumbs-up:before{content:"\e902"}.icon-video:before{content:"\f057"}.icon-feed:before{content:"\e61f"}.icon-article:before{content:"\e61d"}.icon-star:before{content:"\e600"}.icon-register:before{content:"\e602"}.icon-logout:before{content:"\e603"}.icon-setting:before{content:"\e604"}.icon-google:before{content:"\e605"}.icon-search:before{content:"\e606"}.icon-weibo:before{content:"\e607"}.icon-date:before{content:"\e608"}.icon-view:before{content:"\e609"}.icon-cmts:before{content:"\e60a"}.icon-refresh:before{content:"\e60b"}.icon-up:before{content:"\e60c"}.icon-twitter:before{content:"\e60d"}.icon-edit:before{content:"\e60e"}.icon-tencent:before{content:"\e60f"}.icon-tag:before{content:"\e610"}.icon-tags:before{content:"\e611"}.icon-addfile:before{content:"\e612"}.icon-login:before{content:"\e613"}.icon-articles:before{content:"\e614"}.icon-userrole:before{content:"\e615"}.icon-email:before{content:"\e616"}.icon-flag:before{content:"\e617"}.icon-chevron-down:before{content:"\e618";margin-right:10px}.icon-chevron-up:before{content:"\e619";margin-right:10px}.icon-reply:before{content:"\e61a"}.icon-clock:before{content:"\e61b"}.icon-compass:before{content:"\e61c"}.icon-heart:before{content:"\e9da"}.icon-wechat:before{content:"\e907"}.aboutIcon{background-position:-16px -48px}#allPanel{height:auto;min-height:100%;position:relative}#tabsPanel{margin:50px 0 0 240px;padding:15px}#tabsPanel>div{padding-bottom:36px}#tabsPanel_article-list,#tabsPanel_draft-list,#tabsPanel_comment-list,#tabsPanel_plugin-list,#tabsPanel_page-list>div:first-child,#tabsPanel_user-list>div:first-child,#tabsPanel_link-list>div:first-child{background-color:#FFF;border-radius:4px;margin-bottom:40px;overflow:hidden}.tip{font-weight:bold;margin:0 auto;overflow:hidden;padding:2px 0;position:fixed;text-align:center;top:3px;left:255px;z-index:1001}#tipMsg,#loadMsg{color:#31708f;background-color:#d9edf7;border-radius:4px;line-height:40px;display:inline-block}.footer{bottom:12px;position:absolute;text-align:center;width:100%;padding-left:240px;box-sizing:border-box}#top{height:50px;position:fixed;box-shadow:1px 0 3px rgba(0,0,0,.15);width:100%;top:0;background-color:#fff;z-index:80}#top>a{background:#1fb5ad;float:left;width:240px;height:50px;position:relative;color:#f7f7f7;text-align:center;text-decoration:none;font-size:20px;line-height:50px}#top>.right a{color:#555;line-height:50px;margin:0 10px;border:1px solid #f6f6f6;background-color:#f6f6f6;border-radius:100px;padding:10px;text-decoration:none}#top>.right a:hover{color:#333}#tabs{height:100%;min-height:468px;width:240px;margin-top:50px;position:fixed;top:0;background-color:#32323a;overflow:auto}#tabs ul{list-style:none}#tabs li{margin-left:0;border-bottom:1px solid rgba(255,255,255,0.05)}#tabs li>div>a,#tabs #tabToolsTitle,#tabs #tabArticleTitle{color:#aeb2b7;display:block;text-decoration:none;letter-spacing:1px;padding:18px 0 18px 25px;line-height:18px;height:18px;transition:all .3s ease}#tabs a:hover,#tabs a.tab-current,#tabs #tabToolsTitle.tab-current,#tabs #tabArticleTitle.tab-current,#tabs #tabToolsTitle:hover,#tabs #tabArticleTitle:hover{background-color:#28282e;color:#1fb5ad}#tabs li li{border-bottom:0}#tabs li li>div>a{padding:13px 0 13px 46px;line-height:15px;height:15px;background-color:#28282e}#tabs li li>div>a:hover,#tabs li li>div>a.tab-current{background-color:#202025}#tabs .commentIcon,#tabs .postIcon,#tabs .preferenceIcon,#tabs .usersIcon,#tabs .aboutIcon{display:none}.sub-tabs{background-color:#e0e1e7;border-radius:4px 4px 0 0;overflow:hidden}.sub-tabs ul{float:left;list-style:none outside none;margin-right:24px}.sub-tabs li{float:left;margin:0}.sub-tabs li a{border-right:1px solid #e0e1e7;color:#898989;display:block;line-height:18px;padding:20px 15px;text-decoration:none}.sub-tabs .tab-current,.sub-tabs .tab-current:hover,.sub-tabs a:hover{background-color:#fff;color:#1fb5ad}.sub-tabs-main{background-color:#fff;padding:15px;border-radius:0 0 4px 4px}.form>div{margin:15px 0}.form label{margin-bottom:10px;display:inline-block}.form input[type='text'],.form input[type='password'],.form textarea{font-size:14px;outline:medium none;width:100%;padding:6px 12px;height:34px;box-sizing:border-box;border:1px solid #e2e2e4;color:#333;border-radius:4px;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form textarea{height:auto}.form input[type='text']:focus,.form input[type='password']:focus,.form textarea:focus{box-shadow:none;border-color:#1fb5ad}.form button,.completed-ck span{padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;text-align:center;white-space:nowrap;vertical-align:baseline;cursor:pointer;user-select:none;background-image:none;border:1px solid #1fb5ad;border-radius:4px;background-color:#1fb5ad;color:#fff;height:auto;outline:0;line-height:18px}.form button:hover{background-color:#1ca59e;border-color:#1ca59e}.module-panel{border-radius:4px;background-color:#fff;margin-bottom:20px;min-height:160px}.module-header{background:#fafafa;padding:15px;border-bottom:1px solid #eff2f7;border-top-left-radius:3px;border-top-right-radius:3px}.module-header h2{font-size:13px;font-weight:400}.module-header a{color:#767676;text-decoration:none}.module-header a:hover{color:#1fb5ad}.module-panel .module-body{padding:15px}.module-panel .module-body li{padding:10px;line-height:18px;border-bottom:1px solid #ddd}.module-panel .module-body li:hover{background-color:#f5f5f5}.module-panel .module-body li a:hover{text-decoration:none}.comment-title{background-color:#ececec;border-bottom:1px solid #dfdfdf;border-top:1px solid #f9f9f9;padding:3px 6px 3px 12px}#comments{height:462px;overflow:auto}#articleUpload input{width:170px}button#submitArticle,#unSubmitArticle{background-color:#fa8564;border-color:#fa8564}button#submitArticle:hover,#unSubmitArticle:hover{background-color:#ec6459;border-color:#ec6459}.CodeMirror{border-radius:0 0 3px 3px;box-shadow:0 1px 2px rgba(0,0,0,0.075) inset;border:1px solid #ccc;margin-bottom:20px;border-top-width:0;height:470px}.comment-content .CodeMirror{height:170px}#pagePagePanel{margin-top:0}#skinsPanel{min-width:328px;width:99%}.skinPreview{cursor:pointer;height:160px;margin:6px;width:280px}.skinItem{background-color:#fafafa;border-radius:3px;box-shadow:1px 1px 3px #333;line-height:16px;margin:24px 12px;padding:5px;text-align:center}#skinMain .skinItem.selected{background-color:#1fb5ad}.skinItem:hover{background-color:#EEE}.f-blue,.error-msg{color:#36c}.signs button{margin:0 12px}#keyOfSolo{width:200px}.small-head{float:left;height:35px;margin:3px 9px 0 3px;width:35px}#commentTable .table-main td{vertical-align:top}.about-logo{float:left;margin:62px 36px 62px 24px}.about-margin{font-size:20px;margin:20px 0}.ico-alipay-me{background-image:url("../images/alipay-me.png");font-size:20px;height:24px;margin:20px 0;width:126px}.completed-input{margin:2px 12px 0 0}.completed-panel{background-color:#fff;border:1px solid #ddd;color:#00c;display:none;overflow:auto;padding:2px;position:absolute;z-index:10;width:50%;border-top:0}.completed-panel a{display:block;text-decoration:none;line-height:26px;padding:0 5px}.completed-panel a.selected{background-color:#f5f5f5;color:#fa8564}.completed-ck{margin-top:9px}.completed-ck span,.signs button{margin:5px 10px 5px 0;display:inline-block;background-color:#c7cbd6;border-color:#c7cbd6}.completed-ck span:hover,.signs button:hover{background-color:#b0b5b9;border-color:#b0b5b9}.completed-ck span.selected{color:#d54121;background:url(../images/bowknot/completed.png) no-repeat right bottom}.dialog-background{background-color:#000;display:none;filter:alpha(opacity=30);height:100%;left:0;opacity:.3;position:absolute;top:0;width:100%;z-index:90}.dialog-panel{display:none;position:absolute;z-index:100}.dialog-title{color:#fff;float:left;font-size:12px;line-height:27px;margin-left:3px}.dialog-header-bg{background:url("../images/icon.png") repeat scroll center bottom #f1f1f1;border-color:#c0c0c0 #D9D9D9 #d9d9d9;border-radius:6px 6px 0 0;border-style:solid;border-width:1px 1px 0;cursor:move;height:34px}.dialog-close-icon{background:url("../images/bowknot/dialog-close.png") no-repeat scroll 0 0 transparent;cursor:pointer;float:right;height:18px;margin-top:6px;padding:3px;width:22px}.dialog-close-icon:hover{background-image:url("../images/bowknot/dialog-close-hover.png")}.dialog-main{background-color:#fff;border:2px solid #666;border-color:#c0c0c0 #D9D9D9 #d9d9d9;border-top-width:0;padding:12px}.paginate-paginate div.button.paginate-page,.paginate-paginate a,.paginate-pageCount,.pagination-pages{border:1px solid #eff2f7;padding:6px 12px;cursor:pointer;float:left;line-height:18px;background:#eee;height:18px;margin-left:1px;border-radius:0;text-decoration:none;color:#333}.pagination-current-page,.paginate-pageCount{cursor:auto}.paginate-pageCount{margin-left:10px}.pagination-current-page,.paginate-paginate a:hover,.paginate-paginate div.button.paginate-page:hover,.pagination-pages:hover{border-color:#2eb4ad;background-color:#2eb4ad;color:#FFF}.paginate-paginate div.button{padding:0;float:left;border:0;background:0}.paginate-inputPage{height:26px;width:24px;margin:0 5px}.table-main{margin:0;padding:0;position:relative}.table-main table{word-break:break-all;word-wrap:break-word}.table-header{border-bottom:1px solid #ddd;background-color:#fafafa;padding:15px 0}.table-header th{line-height:18px;text-align:left;text-indent:6px;font-weight:normal}.table-main td{border-bottom:1px solid #ddd;color:#767676;padding:10px 0}.table-lineHover .table-hasExpend td{border-bottom:0}.table-heiglight td,.table-lineHover td{background-color:#f5f5f5;border-right-color:#f5f5f5}.table-expendRow td{padding:0 0 5px 36px}.table-expendRow td span{margin-left:60px}.table-expendRow td a{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px;text-decoration:none;color:#FFF;background-color:#c7cbd6;border-color:#c7cbd6}.table-expendRow td a:hover{background-color:#b0b5b9;border-color:#b0b5b9}.table-center{margin:0 auto}.table-upIcon,.table-downIcon{background-image:url("../images/icon.png");cursor:pointer;float:left;height:16px;width:16px;background-position:-81px -32px}.table-upIcon{background-position:-64px -32px;margin-right:6px}.table-tag{color:#d54121;font-size:12px;font-style:italic;margin-left:10px}.tip-panel{background-color:#FFF;box-shadow:0 3px 10px #8b8b8b;display:none;max-height:500px;max-width:500px;overflow:hidden;padding:3px;position:absolute;z-index:1} /**
\ No newline at end of file * Copyright (c) 2010-2017, b3log.org & hacpai.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
body,input,textarea{font-family:"Helvetica Neue","Luxi Sans","DejaVu Sans",Tahoma,"Hiragino Sans GB","Microsoft Yahei",sans-serif}html,body{min-width:1024px;color:#767676;background:#f1f2f7;font-size:13px}a{color:#4183c4;text-decoration:none}a:visited{color:#7ba9d6}a:active{color:#2c5d8d}a:hover{text-decoration:underline}button.selected{background:url("../images/bowknot/completed.png") no-repeat scroll right bottom transparent!important;color:#d54121!important;border-color:#b0b5b9!important}@font-face{font-family:'icomoon';src:url('fonts/icomoon.eot?1450');src:url('fonts/icomoon.eot?#iefix') format('embedded-opentype'),url('fonts/icomoon.ttf?1450') format('truetype'),url('fonts/icomoon.woff?1450') format('woff'),url('fonts/icomoon.svg#icomoon') format('svg');font-weight:normal;font-style:normal}.content-reset{font-family:"Helvetica Neue","Luxi Sans","DejaVu Sans",Tahoma,"Hiragino Sans GB","Microsoft Yahei",sans-serif;word-wrap:break-word;overflow:hidden;line-height:1.5}.content-reset ul,.content-reset ol{padding-left:2em;margin-top:0;margin-bottom:16px}.content-reset h1,.content-reset h2,.content-reset h3,.content-reset h4,.content-reset h5,.content-reset h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.content-reset h1{padding-bottom:.3em;font-size:2em}.content-reset h2{padding-bottom:.3em;font-size:1.5em}.content-reset h3{font-size:1.25em}.content-reset h4{font-size:1em}.content-reset h5{font-size:.875em}.content-reset h6{font-size:.85em}.content-reset p{margin-top:0;margin-bottom:16px}.content-reset blockquote{padding:0 1em;color:#777;border-left:.25em solid #ddd;margin-bottom:16px}.content-reset blockquote p{margin:0}.content-reset iframe{border:1px solid #ccc}.content-reset table{width:100%;border:1px solid #dedede;margin:15px auto;border-collapse:collapse;empty-cells:show}.content-reset thead{text-align:center}.content-reset td,.content-reset th{height:35px;border:1px solid #dedede;padding:0 10px}.content-reset th{font-weight:bold;text-align:center!important;background:rgba(158,188,226,0.2)}.content-reset tbody tr:nth-child(2n){background:rgba(158,188,226,0.12)}.content-reset tr:hover{background:#efefef}.content-reset code{padding:.2em .4em;margin:0;font-size:85%;background-color:rgba(252,41,41,0.12);border-radius:3px;color:#d23f31;font-family:mononoki,Consolas,"Liberation Mono",Menlo,Courier,monospace}.content-reset pre>code{padding:.5em;border-radius:0;color:#333;background-color:rgba(0,0,0,0.04);background-image:url(../images/code-bg.png);background-size:20px 20px;border-radius:5px}.content-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 #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}[class^="icon-"],[class*=" icon-"]{font-family:'icomoon';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}a[class^="icon-"],a[class*=" icon-"]{color:#333}a[class^="icon-"]:hover,a[class*=" icon-"]:hover{text-decoration:none;color:#4183c4}.icon-upload:before{content:"\f0ee"}.icon-copy:before{content:"\e908"}.icon-time:before{content:"\e906"}.icon-sortasc:before{content:"\e905"}.icon-locked:before{content:"\e61e"}.icon-close:before{content:"\e909"}.icon-points:before{content:"\e900"}.icon-goods:before{content:"\e904"}.icon-bold:before{content:"\e000"}.icon-italic:before{content:"\e001"}.icon-quote:before{content:"\e003"}.icon-unordered-list:before{content:"\e004"}.icon-ordered-list:before{content:"\e005"}.icon-link:before{content:"\e006"}.icon-image:before{content:"\e007"}.icon-play:before{content:"\e008"}.icon-music:before{content:"\e009"}.icon-contract:before{content:"\e00a"}.icon-fullscreen:before{content:"\e00b"}.icon-question:before{content:"\e00c"}.icon-info:before{content:"\e00d"}.icon-undo:before{content:"\e00e"}.icon-redo:before{content:"\e00f"}.icon-code:before{content:"\e011"}.icon-preview:before{content:"\e002"}.icon-navigation:before{content:"\e903"}.icon-thumbs-down:before{content:"\e901"}.icon-thumbs-up:before{content:"\e902"}.icon-video:before{content:"\f057"}.icon-feed:before{content:"\e61f"}.icon-article:before{content:"\e61d"}.icon-star:before{content:"\e600"}.icon-register:before{content:"\e602"}.icon-logout:before{content:"\e603"}.icon-setting:before{content:"\e604"}.icon-google:before{content:"\e605"}.icon-search:before{content:"\e606"}.icon-weibo:before{content:"\e607"}.icon-date:before{content:"\e608"}.icon-view:before{content:"\e609"}.icon-cmts:before{content:"\e60a"}.icon-refresh:before{content:"\e60b"}.icon-up:before{content:"\e60c"}.icon-twitter:before{content:"\e60d"}.icon-edit:before{content:"\e60e"}.icon-tencent:before{content:"\e60f"}.icon-tag:before{content:"\e610"}.icon-tags:before{content:"\e611"}.icon-addfile:before{content:"\e612"}.icon-login:before{content:"\e613"}.icon-articles:before{content:"\e614"}.icon-userrole:before{content:"\e615"}.icon-email:before{content:"\e616"}.icon-flag:before{content:"\e617"}.icon-chevron-down:before{content:"\e618";margin-right:10px}.icon-chevron-up:before{content:"\e619";margin-right:10px}.icon-reply:before{content:"\e61a"}.icon-clock:before{content:"\e61b"}.icon-compass:before{content:"\e61c"}.icon-heart:before{content:"\e9da"}.icon-wechat:before{content:"\e907"}.aboutIcon{background-position:-16px -48px}#allPanel{height:auto;min-height:100%;position:relative}#tabsPanel{margin:50px 0 0 240px;padding:15px;min-height:100px}#tabsPanel>div{padding-bottom:36px}#tabsPanel_article-list,#tabsPanel_draft-list,#tabsPanel_comment-list,#tabsPanel_plugin-list,#tabsPanel_page-list>div:first-child,#tabsPanel_user-list>div:first-child,#tabsPanel_link-list>div:first-child{background-color:#FFF;border-radius:4px;margin-bottom:40px;overflow:hidden}.tip{font-weight:bold;margin:0 auto;overflow:hidden;padding:2px 0;position:fixed;text-align:center;top:3px;left:255px;z-index:1001}#tipMsg,#loadMsg{color:#31708f;background-color:#d9edf7;border-radius:4px;line-height:40px;display:inline-block}.footer{bottom:12px;position:absolute;text-align:center;width:100%;padding-left:240px;box-sizing:border-box}#top{height:50px;position:fixed;box-shadow:1px 0 3px rgba(0,0,0,.15);width:100%;top:0;background-color:#fff;z-index:80}#top>a{background:#1fb5ad;float:left;width:240px;height:50px;position:relative;color:#f7f7f7;text-align:center;text-decoration:none;font-size:20px;line-height:50px}#top>.right a{color:#555;line-height:50px;margin:0 10px;border:1px solid #f6f6f6;background-color:#f6f6f6;border-radius:100px;padding:10px;text-decoration:none}#top>.right a:hover{color:#333}#tabs{height:100%;min-height:468px;width:240px;margin-top:50px;position:fixed;top:0;background-color:#32323a;overflow:auto}#tabs ul{list-style:none}#tabs li{margin-left:0;border-bottom:1px solid rgba(255,255,255,0.05)}#tabs li>div>a,#tabs #tabToolsTitle,#tabs #tabArticleTitle{color:#aeb2b7;display:block;text-decoration:none;letter-spacing:1px;padding:18px 0 18px 25px;line-height:18px;height:18px;transition:all .3s ease}#tabs a:hover,#tabs a.tab-current,#tabs #tabToolsTitle.tab-current,#tabs #tabArticleTitle.tab-current,#tabs #tabToolsTitle:hover,#tabs #tabArticleTitle:hover{background-color:#28282e;color:#1fb5ad}#tabs li li{border-bottom:0}#tabs li li>div>a{padding:13px 0 13px 46px;line-height:15px;height:15px;background-color:#28282e}#tabs li li>div>a:hover,#tabs li li>div>a.tab-current{background-color:#202025}#tabs .commentIcon,#tabs .postIcon,#tabs .preferenceIcon,#tabs .usersIcon,#tabs .aboutIcon{display:none}.sub-tabs{background-color:#e0e1e7;border-radius:4px 4px 0 0;overflow:hidden}.sub-tabs ul{float:left;list-style:none outside none;margin-right:24px}.sub-tabs li{float:left;margin:0}.sub-tabs li a{border-right:1px solid #e0e1e7;color:#898989;display:block;line-height:18px;padding:20px 15px;text-decoration:none}.sub-tabs .tab-current,.sub-tabs .tab-current:hover,.sub-tabs a:hover{background-color:#fff;color:#1fb5ad}.sub-tabs-main{background-color:#fff;padding:15px;border-radius:0 0 4px 4px}.form>div{margin:15px 0}.form label{margin-bottom:10px;display:inline-block}.form input[type='text'],.form input[type='password'],.form textarea{font-size:14px;outline:medium none;width:100%;padding:6px 12px;height:34px;box-sizing:border-box;border:1px solid #e2e2e4;color:#333;border-radius:4px;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form textarea{height:auto}.form input[type='text']:focus,.form input[type='password']:focus,.form textarea:focus{box-shadow:none;border-color:#1fb5ad}.form button,.completed-ck span{padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;text-align:center;white-space:nowrap;vertical-align:baseline;cursor:pointer;user-select:none;background-image:none;border:1px solid #1fb5ad;border-radius:4px;background-color:#1fb5ad;color:#fff;height:auto;outline:0;line-height:18px}.form button:hover{background-color:#1ca59e;border-color:#1ca59e}.module-panel{border-radius:4px;background-color:#fff;margin-bottom:20px;min-height:160px}.module-header{background:#fafafa;padding:15px;border-bottom:1px solid #eff2f7;border-top-left-radius:3px;border-top-right-radius:3px}.module-header h2{font-size:13px;font-weight:400}.module-header a{color:#767676;text-decoration:none}.module-header a:hover{color:#1fb5ad}.module-panel .module-body{padding:15px}.module-panel .module-body li{padding:10px;line-height:18px;border-bottom:1px solid #ddd}.module-panel .module-body li:hover{background-color:#f5f5f5}.module-panel .module-body li a:hover{text-decoration:none}.comment-title{background-color:#ececec;border-bottom:1px solid #dfdfdf;border-top:1px solid #f9f9f9;padding:3px 6px 3px 12px}#comments{height:462px;overflow:auto}#articleUpload input{width:170px}button#submitArticle,#unSubmitArticle{background-color:#fa8564;border-color:#fa8564}button#submitArticle:hover,#unSubmitArticle:hover{background-color:#ec6459;border-color:#ec6459}.CodeMirror{border-radius:0 0 3px 3px;box-shadow:0 1px 2px rgba(0,0,0,0.075) inset;border:1px solid #ccc;margin-bottom:20px;border-top-width:0;height:470px}.comment-content .CodeMirror{height:170px}#pagePagePanel{margin-top:0}#skinsPanel{min-width:328px;width:99%}.skinPreview{cursor:pointer;height:160px;margin:6px;width:280px}.skinItem{background-color:#fafafa;border-radius:3px;box-shadow:1px 1px 3px #333;line-height:16px;margin:24px 12px;padding:5px;text-align:center}#skinMain .skinItem.selected{background-color:#1fb5ad}.skinItem:hover{background-color:#EEE}.f-blue,.error-msg{color:#36c}.signs button{margin:0 12px}#keyOfSolo{width:200px}.small-head{float:left;height:35px;margin:3px 9px 0 3px;width:35px}#commentTable .table-main td{vertical-align:top}.about-logo{float:left;margin:62px 36px 62px 24px}.about-margin{font-size:20px;margin:20px 0}.ico-alipay-me{background-image:url("../images/alipay-me.png");font-size:20px;height:24px;margin:20px 0;width:126px}.completed-input{margin:2px 12px 0 0}.completed-panel{background-color:#fff;border:1px solid #ddd;color:#00c;display:none;overflow:auto;padding:2px;position:absolute;z-index:10;width:50%;border-top:0}.completed-panel a{display:block;text-decoration:none;line-height:26px;padding:0 5px}.completed-panel a.selected{background-color:#f5f5f5;color:#fa8564}.completed-ck{margin-top:9px}.completed-ck span,.signs button{margin:5px 10px 5px 0;display:inline-block;background-color:#c7cbd6;border-color:#c7cbd6}.completed-ck span:hover,.signs button:hover{background-color:#b0b5b9;border-color:#b0b5b9}.completed-ck span.selected{color:#d54121;background:url(../images/bowknot/completed.png) no-repeat right bottom}.dialog-background{background-color:#000;display:none;filter:alpha(opacity=30);height:100%;left:0;opacity:.3;position:absolute;top:0;width:100%;z-index:90}.dialog-panel{display:none;position:absolute;z-index:100}.dialog-title{color:#fff;float:left;font-size:12px;line-height:27px;margin-left:3px}.dialog-header-bg{background:url("../images/icon.png") repeat scroll center bottom #f1f1f1;border-color:#c0c0c0 #D9D9D9 #d9d9d9;border-radius:6px 6px 0 0;border-style:solid;border-width:1px 1px 0;cursor:move;height:34px}.dialog-close-icon{background:url("../images/bowknot/dialog-close.png") no-repeat scroll 0 0 transparent;cursor:pointer;float:right;height:18px;margin-top:6px;padding:3px;width:22px}.dialog-close-icon:hover{background-image:url("../images/bowknot/dialog-close-hover.png")}.dialog-main{background-color:#fff;border:2px solid #666;border-color:#c0c0c0 #D9D9D9 #d9d9d9;border-top-width:0;padding:12px}.paginate-paginate div.button.paginate-page,.paginate-paginate a,.paginate-pageCount,.pagination-pages{border:1px solid #eff2f7;padding:6px 12px;cursor:pointer;float:left;line-height:18px;background:#eee;height:18px;margin-left:1px;border-radius:0;text-decoration:none;color:#333}.pagination-current-page,.paginate-pageCount{cursor:auto}.paginate-pageCount{margin-left:10px}.pagination-current-page,.paginate-paginate a:hover,.paginate-paginate div.button.paginate-page:hover,.pagination-pages:hover{border-color:#2eb4ad;background-color:#2eb4ad;color:#FFF}.paginate-paginate div.button{padding:0;float:left;border:0;background:0}.paginate-inputPage{height:26px;width:24px;margin:0 5px}.table-main{margin:0;padding:0;position:relative}.table-main table{word-break:break-all;word-wrap:break-word}.table-header{border-bottom:1px solid #ddd;background-color:#fafafa;padding:15px 0}.table-header th{line-height:18px;text-align:left;text-indent:6px;font-weight:normal}.table-main td{border-bottom:1px solid #ddd;color:#767676;padding:10px 0}.table-lineHover .table-hasExpend td{border-bottom:0}.table-heiglight td,.table-lineHover td{background-color:#f5f5f5;border-right-color:#f5f5f5}.table-expendRow td{padding:0 0 5px 36px}.table-expendRow td span{margin-left:60px}.table-expendRow td a{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px;text-decoration:none;color:#FFF;background-color:#c7cbd6;border-color:#c7cbd6}.table-expendRow td a:hover{background-color:#b0b5b9;border-color:#b0b5b9}.table-center{margin:0 auto}.table-upIcon,.table-downIcon{background-image:url("../images/icon.png");cursor:pointer;float:left;height:16px;width:16px;background-position:-81px -32px}.table-upIcon{background-position:-64px -32px;margin-right:6px}.table-tag{color:#d54121;font-size:12px;font-style:italic;margin-left:10px}.tip-panel{background-color:#FFF;box-shadow:0 3px 10px #8b8b8b;display:none;max-height:500px;max-width:500px;overflow:hidden;padding:3px;position:absolute;z-index:1}
\ No newline at end of file
/**
* Copyright (c) 2010-2017, b3log.org & hacpai.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
html,body,div,ul,li,h1,h2,h3,h4,h5,h6,p,dd,dl,ol{margin:0;padding:0}body{background-color:#FFF;color:#000;font-family:elvetica,Arial,'sans-serif','\5fae\8f6f\96c5\9ed1';font-size:small}img{border:medium none;margin:0;padding:0;vertical-align:middle}h1{font-size:160%}h2{font-size:140%}h3{font-size:120%}h4{font-size:110%}textarea{overflow:auto}li{margin-left:12px}button,.button{background:url(../images/icon.png) repeat center bottom;border:1px solid;border-color:#CCc #bbb #A0A0A0;border-radius:4px;height:28px;margin:0;padding:0 6px;vertical-align:top}button:hover,.button:hover{border-color:#BBB}.padding12{padding:12px}.paddingBottom12{padding-bottom:12px!important}.paddingTop12{padding-top:12px!important}.margin12{margin:12px}.marginTop12{margin-top:12px!important}.marginBottom12{margin-bottom:12px!important}.marginLeft12{margin-left:12px!important}.marginLeft6{margin-left:6px!important}.marginRight12{margin-right:12px!important}.f-bold{font-weight:bold!important}.nowrap{white-space:nowrap}.left{float:left}.right{float:right}.clear{background-color:transparent;border:0;clear:both;display:block;font-size:0;height:0;line-height:0;overflow:hidden}.fn-clear:before,.fn-clear:after{display:table;content:""}.fn-clear:after{clear:both}.none{display:none}.pointer{cursor:pointer}.no-underline{text-decoration:none!important}.red{color:red}.contentBody{margin-bottom:12px;padding:3px 12px}.form th{text-align:right;white-space:nowrap}.form input[type='text'],.form input[type='password'],.form textarea{border-color:#c0c0c0 #D9D9D9 #d9d9d9;border-right:1px solid #d9d9d9;border-style:solid;border-width:1px;font-family:Helvetica,Arial,sans-serif;font-size:12px;outline:medium none;width:99%;padding:0 3px}.form input{height:24px}.form input[type='checkbox']{border:0;vertical-align:middle}.form input.normalInput{width:auto}.form input[type='checkbox']:focus{border:0}.form input:focus,.form textarea:focus{box-shadow:0 1px 2px rgba(0,0,0,0.3) inset}.form textarea{padding:3px;overflow:auto;resize:vertical}.logo{padding:0 5px;text-decoration:none;text-shadow:0 0 1px #eee}.putTopIcon,.notPutTopIcon,.deleteIcon,.updateIcon,.commentIcon,.homeIcon,.adminIcon,.loginIcon,.logoutIcon,.calendarIcon,.browserIcon,.postIcon,.articlesIcon,.draftsIcon,.usersIcon,.linkIcon,.preferenceIcon,.pageIcon,.trueIcon,.falseIcon,.fileIcon,.othersIcon,.goTopIcon,.goBottomIcon,.cacheIcon,.aboutIcon{background-image:url("../images/icon.png");cursor:pointer;height:16px;width:16px}.adminIcon,.loginIcon,.logoutIcon,.homeIcon{margin-top:3px}.pageIcon{background-position:-144px 0}.postIcon{background-position:-16px 0}.linkIcon{background-position:-32px 0}.preferenceIcon{background-position:-48px 0}.articlesIcon{background-position:-64px 0}.trueIcon{background-position:-80px 0;cursor:auto}.falseIcon{background-position:-96px 0;cursor:auto}.fileIcon{background-position:-112px 0}.deleteIcon{background-position:0 -16px}.updateIcon{background-position:-16px -16px}.commentIcon{background-position:-32px -16px}.homeIcon{background-position:-64px -16px}.adminIcon{background-position:-80px -16px}.logoutIcon{background-position:-96px -16px}.loginIcon{background-position:-112px -16px}.browserIcon{background-position:-128px -16px}.calendarIcon{background-position:-144px -16px}.putTopIcon{background-position:-16px -32px;float:left}.notPutTopIcon{background-position:-32px -32px;float:left}.othersIcon{background-position:-48px -32px}.cacheIcon{background-position:-96px -32px}.draftsIcon{background-position:-96px -32px}.usersIcon{background-position:-112px -32px}.goTopIcon{background-position:-64px -32px;position:fixed;right:20px;top:45%}.goBottomIcon{background-position:-80px -32px;bottom:40%;position:fixed;right:20px}.article-body{overflow:hidden;line-height:145%;word-wrap:break-word}.article-body blockquote{border:1px dotted #98a47f;font-style:italic;margin:12px;padding:12px}.article-body h1{font-size:2em;margin:.67em 0}.article-body h2{font-size:1.5em;margin:.75em 0}.article-body h3{font-size:1.17em;margin:.83em 0}.article-body h4,.article-body p,.article-body blockquote,.article-body ul,.article-body fieldset,.article-body form,.article-body ol,.article-body dl,.article-body dir,.article-body menu{margin:1.12em 0}.article-body h5{font-size:.83em;margin:1.5em 0}.article-body h6{font-size:.75em;margin:1.67em 0}.article-body blockquote{margin-left:40px;margin-right:40px}.article-body ol,.article-body ul,.article-body dir,.article-body menu,.article-body dd{margin-left:40px}.em00,.em01,.em02,.em03,.em04,.em05,.em06,.em07,.em08,.em09,.em10,.em11,.em12,.em13,.em14{background-image:url("../images/emotions/classic/emotions-classic.png");float:left;height:24px;margin-right:5px;width:24px}#emotions span{cursor:pointer}.em01{background-position:-24px 0}.em02{background-position:-48px 0}.em03{background-position:-72px 0}.em04{background-position:-96px 0}.em05{background-position:0 -24px}.em06{background-position:-24px -24px}.em07{background-position:-48px -24px}.em08{background-position:-72px -24px}.em09{background-position:-96px -24px}.em10{background-position:0 -48px}.em11{background-position:-24px -48px}.em12{background-position:-48px -48px}.em13{background-position:-72px -48px}.em14{background-position:-96px -48px}#tags{list-style:none}#tags li{float:left;list-style:none;height:38px}#tags a:hover{text-shadow:0 0 2px #555}#tags a{border-radius:3px 3px 3px 3px;box-shadow:1px 1px 3px #555;float:left;margin:3px 6px;padding:3px 12px;text-decoration:none}#tags .tags1{font-size:12px;font-weight:normal}#tags .tags2{font-size:14px;font-weight:normal}#tags .tags3{font-size:16px;font-weight:normal}#tags .tags4{font-size:18px;font-weight:bold}#tags .tags5{font-size:20px;font-weight:bold}#captcha,#captchaReply{cursor:pointer} html,body,div,ul,li,h1,h2,h3,h4,h5,h6,p,dd,dl,ol{margin:0;padding:0}body{background-color:#FFF;color:#000;font-family:elvetica,Arial,'sans-serif','\5fae\8f6f\96c5\9ed1';font-size:small}img{border:medium none;margin:0;padding:0;vertical-align:middle}h1{font-size:160%}h2{font-size:140%}h3{font-size:120%}h4{font-size:110%}textarea{overflow:auto}li{margin-left:12px}button,.button{background:url(../images/icon.png) repeat center bottom;border:1px solid;border-color:#CCc #bbb #A0A0A0;border-radius:4px;height:28px;margin:0;padding:0 6px;vertical-align:top}button:hover,.button:hover{border-color:#BBB}.padding12{padding:12px}.paddingBottom12{padding-bottom:12px!important}.paddingTop12{padding-top:12px!important}.margin12{margin:12px}.marginTop12{margin-top:12px!important}.marginBottom12{margin-bottom:12px!important}.marginLeft12{margin-left:12px!important}.marginLeft6{margin-left:6px!important}.marginRight12{margin-right:12px!important}.f-bold{font-weight:bold!important}.nowrap{white-space:nowrap}.left{float:left}.right{float:right}.clear{background-color:transparent;border:0;clear:both;display:block;font-size:0;height:0;line-height:0;overflow:hidden}.fn-clear:before,.fn-clear:after{display:table;content:""}.fn-clear:after{clear:both}.none{display:none}.pointer{cursor:pointer}.no-underline{text-decoration:none!important}.red{color:red}.contentBody{margin-bottom:12px;padding:3px 12px}.form th{text-align:right;white-space:nowrap}.form input[type='text'],.form input[type='password'],.form textarea{border-color:#c0c0c0 #D9D9D9 #d9d9d9;border-right:1px solid #d9d9d9;border-style:solid;border-width:1px;font-family:Helvetica,Arial,sans-serif;font-size:12px;outline:medium none;width:99%;padding:0 3px}.form input{height:24px}.form input[type='checkbox']{border:0;vertical-align:middle}.form input.normalInput{width:auto}.form input[type='checkbox']:focus{border:0}.form input:focus,.form textarea:focus{box-shadow:0 1px 2px rgba(0,0,0,0.3) inset}.form textarea{padding:3px;overflow:auto;resize:vertical}.logo{padding:0 5px;text-decoration:none;text-shadow:0 0 1px #eee}.putTopIcon,.notPutTopIcon,.deleteIcon,.updateIcon,.commentIcon,.homeIcon,.adminIcon,.loginIcon,.logoutIcon,.calendarIcon,.browserIcon,.postIcon,.articlesIcon,.draftsIcon,.usersIcon,.linkIcon,.preferenceIcon,.pageIcon,.trueIcon,.falseIcon,.fileIcon,.othersIcon,.goTopIcon,.goBottomIcon,.cacheIcon,.aboutIcon{background-image:url("../images/icon.png");cursor:pointer;height:16px;width:16px}.adminIcon,.loginIcon,.logoutIcon,.homeIcon{margin-top:3px}.pageIcon{background-position:-144px 0}.postIcon{background-position:-16px 0}.linkIcon{background-position:-32px 0}.preferenceIcon{background-position:-48px 0}.articlesIcon{background-position:-64px 0}.trueIcon{background-position:-80px 0;cursor:auto}.falseIcon{background-position:-96px 0;cursor:auto}.fileIcon{background-position:-112px 0}.deleteIcon{background-position:0 -16px}.updateIcon{background-position:-16px -16px}.commentIcon{background-position:-32px -16px}.homeIcon{background-position:-64px -16px}.adminIcon{background-position:-80px -16px}.logoutIcon{background-position:-96px -16px}.loginIcon{background-position:-112px -16px}.browserIcon{background-position:-128px -16px}.calendarIcon{background-position:-144px -16px}.putTopIcon{background-position:-16px -32px;float:left}.notPutTopIcon{background-position:-32px -32px;float:left}.othersIcon{background-position:-48px -32px}.cacheIcon{background-position:-96px -32px}.draftsIcon{background-position:-96px -32px}.usersIcon{background-position:-112px -32px}.goTopIcon{background-position:-64px -32px;position:fixed;right:20px;top:45%}.goBottomIcon{background-position:-80px -32px;bottom:40%;position:fixed;right:20px}.article-body{overflow:hidden;line-height:145%;word-wrap:break-word}.article-body blockquote{border:1px dotted #98a47f;font-style:italic;margin:12px;padding:12px}.article-body h1{font-size:2em;margin:.67em 0}.article-body h2{font-size:1.5em;margin:.75em 0}.article-body h3{font-size:1.17em;margin:.83em 0}.article-body h4,.article-body p,.article-body blockquote,.article-body ul,.article-body fieldset,.article-body form,.article-body ol,.article-body dl,.article-body dir,.article-body menu{margin:1.12em 0}.article-body h5{font-size:.83em;margin:1.5em 0}.article-body h6{font-size:.75em;margin:1.67em 0}.article-body blockquote{margin-left:40px;margin-right:40px}.article-body ol,.article-body ul,.article-body dir,.article-body menu,.article-body dd{margin-left:40px}.em00,.em01,.em02,.em03,.em04,.em05,.em06,.em07,.em08,.em09,.em10,.em11,.em12,.em13,.em14{background-image:url("../images/emotions/classic/emotions-classic.png");float:left;height:24px;margin-right:5px;width:24px}#emotions span{cursor:pointer}.em01{background-position:-24px 0}.em02{background-position:-48px 0}.em03{background-position:-72px 0}.em04{background-position:-96px 0}.em05{background-position:0 -24px}.em06{background-position:-24px -24px}.em07{background-position:-48px -24px}.em08{background-position:-72px -24px}.em09{background-position:-96px -24px}.em10{background-position:0 -48px}.em11{background-position:-24px -48px}.em12{background-position:-48px -48px}.em13{background-position:-72px -48px}.em14{background-position:-96px -48px}#tags{list-style:none}#tags li{float:left;list-style:none;height:38px}#tags a:hover{text-shadow:0 0 2px #555}#tags a{border-radius:3px 3px 3px 3px;box-shadow:1px 1px 3px #555;float:left;margin:3px 6px;padding:3px 12px;text-decoration:none}#tags .tags1{font-size:12px;font-weight:normal}#tags .tags2{font-size:14px;font-weight:normal}#tags .tags3{font-size:16px;font-weight:normal}#tags .tags4{font-size:18px;font-weight:bold}#tags .tags5{font-size:20px;font-weight:bold}#captcha,#captchaReply{cursor:pointer}
\ No newline at end of file
/**
* Copyright (c) 2010-2017, b3log.org & hacpai.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
html{height:100%;overflow:hidden}html,body{margin:0;padding:0}body{background-color:#f3f1e5;color:#333;font-family:\5fae\8f6f\96c5\9ed1;font-size:small;height:100%}h2{background-color:#ececec;background-image:linear-gradient(#f9f9f9,#ececec);background-repeat:repeat-x;border-radius:4px 4px 0 0;font-size:16px;margin:0;padding:10px 20px;text-shadow:0 -1px 0 rgba(255,255,255,0.5)}input{border:1px solid #ccc;border-radius:3px 3px 3px 3px;box-shadow:0 1px 2px rgba(0,0,0,0.075) inset;font-size:13px;margin:15px 0;padding:7px 8px;transition:all .15s ease-in 0s;vertical-align:middle;width:410px;font-family:\5fae\8f6f\96c5\9ed1;font-size:small}input:focus{box-shadow:0 1px 2px rgba(0,0,0,0.075) inset,0 0 5px rgbargba(200,200,200,0.9);border:1px solid #e6e5d9}.form{padding:20px}label{font-size:13px}button{position:relative;display:inline-block;font-size:13px;font-weight:700;color:#333;text-shadow:0 1px 0 rgba(255,255,255,0.9);white-space:nowrap;background-color:#eaeaea;background-image:linear-gradient(#fafafa,#eaeaea);background-repeat:repeat-x;border-radius:3px;border:1px solid #ddd;border-bottom-color:#c5c5c5;box-shadow:0 1px 3px rgba(0,0,0,0.075);vertical-align:baseline;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;outline:0;padding:7px 15px;margin-top:10px}button:hover,button:active{color:#fff;text-decoration:none;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#3072b3;background-image:linear-gradient(#599bcd,#3072b3);background-repeat:repeat-x}.clear{background-color:transparent;border:0;clear:both;display:block;font-size:0;height:0;line-height:0;overflow:hidden}.none{display:none}.main .icon{position:absolute;right:0;top:0;width:16px;height:16px}.solo{color:orangered;font-weight:bold}.logo{float:left;padding:162px 12px 0;width:217px;text-align:center}.wrapper{height:auto;min-height:100%;position:relative}.wrap{border-top:5px solid #e6e5d9;min-height:400px}.content{background:url("../images/zz.jpg") repeat-x scroll center bottom white;border-color:#e6e5d9;border-style:solid solid none;border-width:1px;margin:0 auto;padding:0 0 28px 0;position:relative;width:760px;top:60px}.main{border-left:1px solid #e6e5d9;float:right;font-size:15px;margin:24px 0;padding:12px 24px;width:470px;height:338px}.main a{text-decoration:none}.main li{margin:6px 0 6px 16px}.footerWrapper{background-color:#fff;border-top:1px solid #e6e5d9;bottom:0;padding:12px 0;position:absolute;text-align:center;width:100%}.footerWrapper a{text-decoration:none}.article-pwd>div,.article-pwd>form{margin:0 20px}.article-pwd>div{margin-bottom:10px;max-height:264px;overflow:auto;word-wrap:break-word}.img-403,.img-500{box-shadow:0 0 5px #e6e5d9;margin:20px 0 0 45px;padding:5px}.a-403,.a-500,.a-404{margin:20px 50px 0 0;text-align:right}.a-403{margin:10px 75px 0 0}.img-500{margin:20px 0 0 25px}.a-500{margin:25px 35px 0 0}.a-404{margin:42px 35px 0 0}.kill img{position:absolute;right:40px;top:200px}.kill ul{margin-bottom:50px}.kill p{margin:12px 20px}.kill span{margin-left:20px}#init{position:absolute;top:81px;width:470px}#init .form{padding:10px 20px}#init input,.register input{margin:5px 0;padding:5px 8px}.register{height:400px}#sys p{height:206px}#sys{padding:0 20px}#initButton{margin-right:10px}#tip{color:#21759b;font-weight:bold;margin-left:10px} html{height:100%;overflow:hidden}html,body{margin:0;padding:0}body{background-color:#f3f1e5;color:#333;font-family:\5fae\8f6f\96c5\9ed1;font-size:small;height:100%}h2{background-color:#ececec;background-image:linear-gradient(#f9f9f9,#ececec);background-repeat:repeat-x;border-radius:4px 4px 0 0;font-size:16px;margin:0;padding:10px 20px;text-shadow:0 -1px 0 rgba(255,255,255,0.5)}input{border:1px solid #ccc;border-radius:3px 3px 3px 3px;box-shadow:0 1px 2px rgba(0,0,0,0.075) inset;font-size:13px;margin:15px 0;padding:7px 8px;transition:all .15s ease-in 0s;vertical-align:middle;width:410px;font-family:\5fae\8f6f\96c5\9ed1;font-size:small}input:focus{box-shadow:0 1px 2px rgba(0,0,0,0.075) inset,0 0 5px rgbargba(200,200,200,0.9);border:1px solid #e6e5d9}.form{padding:20px}label{font-size:13px}button{position:relative;display:inline-block;font-size:13px;font-weight:700;color:#333;text-shadow:0 1px 0 rgba(255,255,255,0.9);white-space:nowrap;background-color:#eaeaea;background-image:linear-gradient(#fafafa,#eaeaea);background-repeat:repeat-x;border-radius:3px;border:1px solid #ddd;border-bottom-color:#c5c5c5;box-shadow:0 1px 3px rgba(0,0,0,0.075);vertical-align:baseline;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;outline:0;padding:7px 15px;margin-top:10px}button:hover,button:active{color:#fff;text-decoration:none;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#3072b3;background-image:linear-gradient(#599bcd,#3072b3);background-repeat:repeat-x}.clear{background-color:transparent;border:0;clear:both;display:block;font-size:0;height:0;line-height:0;overflow:hidden}.none{display:none}.main .icon{position:absolute;right:0;top:0;width:16px;height:16px}.solo{color:orangered;font-weight:bold}.logo{float:left;padding:162px 12px 0;width:217px;text-align:center}.wrapper{height:auto;min-height:100%;position:relative}.wrap{border-top:5px solid #e6e5d9;min-height:400px}.content{background:url("../images/zz.jpg") repeat-x scroll center bottom white;border-color:#e6e5d9;border-style:solid solid none;border-width:1px;margin:0 auto;padding:0 0 28px 0;position:relative;width:760px;top:60px}.main{border-left:1px solid #e6e5d9;float:right;font-size:15px;margin:24px 0;padding:12px 24px;width:470px;height:338px}.main a{text-decoration:none}.main li{margin:6px 0 6px 16px}.footerWrapper{background-color:#fff;border-top:1px solid #e6e5d9;bottom:0;padding:12px 0;position:absolute;text-align:center;width:100%}.footerWrapper a{text-decoration:none}.article-pwd>div,.article-pwd>form{margin:0 20px}.article-pwd>div{margin-bottom:10px;max-height:264px;overflow:auto;word-wrap:break-word}.img-403,.img-500{box-shadow:0 0 5px #e6e5d9;margin:20px 0 0 45px;padding:5px}.a-403,.a-500,.a-404{margin:20px 50px 0 0;text-align:right}.a-403{margin:10px 75px 0 0}.img-500{margin:20px 0 0 25px}.a-500{margin:25px 35px 0 0}.a-404{margin:42px 35px 0 0}.kill img{position:absolute;right:40px;top:200px}.kill ul{margin-bottom:50px}.kill p{margin:12px 20px}.kill span{margin-left:20px}#init{position:absolute;top:81px;width:470px}#init .form{padding:10px 20px}#init input,.register input{margin:5px 0;padding:5px 8px}.register{height:400px}#sys p{height:206px}#sys{padding:0 20px}#initButton{margin-right:10px}#tip{color:#21759b;font-weight:bold;margin-left:10px}
\ No newline at end of file
/*
* Copyright (c) 2010-2017, b3log.org & hacpai.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var Util={isLoggedIn:function(){if(($("#admin").length===1&&$("#admin").data("login"))||latkeConfig.isLoggedIn==="true"){return true}else{return false}},getUserName:function(){if($("#adminName").length===1){return $("#adminName").text()}else{return latkeConfig.userName}},error:function(){$("#tipMsg").text("Error: "+arguments[0]+" File: "+arguments[1]+"\nLine: "+arguments[2]+" please report this issue on https://github.com/b3log/solo/issues/new");$("#loadMsg").text("")},killIE:function(){var addKillPanel=function(){if(Cookie.readCookie("showKill")===""){var left=($(window).width()-701)/2,top=($(window).height()-420)/2;$("body").append("<div style='display: block; height: 100%; width: 100%; position: fixed; background-color: rgb(0, 0, 0); opacity: 0.6; top: 0px;z-index:11'></div><iframe style='left:"+left+"px;z-index:20;top: "+top+"px; position: fixed; border: 0px none; width: 701px; height: 420px;' src='"+latkeConfig.servePath+"/kill-browser'></iframe>")}};if($.browser.msie){if($.browser.version==="6.0"||$.browser.version==="7.0"){addKillPanel();return}if(window.external&&window.external.twGetRunPath){var path=external.twGetRunPath();if(path&&path.toLowerCase().indexOf("360se")>-1&&window.location.href.indexOf("admin-index")>-1){addKillPanel();return}}}},replaceEmString:function(str){var commentSplited=str.split("[em");if(commentSplited.length===1){return str}str=commentSplited[0];for(var j=1;j<commentSplited.length;j++){var key=commentSplited[j].substr(0,2);str+="<img src='"+latkeConfig.staticServePath+"/skins/"+Label.skinDirName+"/images/emotions/em"+key+".png' alt='"+Label["em"+key+"Label"]+"' title='"+Label["em"+key+"Label"]+"'/>"+commentSplited[j].substr(3)}return str},proessURL:function(url){if(!/^\w+:\/\//.test(url)){url="http://"+url}return url},switchMobile:function(skin){Cookie.createCookie("btouch_switch_toggle",skin,365);setTimeout(function(){location.reload()},1250)},setTopBar:function(){var $top=$("#top");if($top.length===1){var $showTop=$("#showTop");$showTop.click(function(){$top.slideDown();$showTop.hide()});$("#hideTop").click(function(){$top.slideUp();$showTop.show()})}},goTop:function(){$("html, body").animate({scrollTop:0},800)},goBottom:function(bottom){if(!bottom){bottom=0}var wHeight=$("body").height()>$(document).height()?$("body").height():$(document).height();window.scrollTo(0,wHeight-$(window).height()-bottom)},init:function(){Util.killIE();Util.setTopBar()},replaceSideEm:function(comments){for(var i=0;i<comments.length;i++){var $comment=$(comments[i]);$comment.html(Util.replaceEmString($comment.html()))}},buildTags:function(id){id=id||"tags";var classes=["tags1","tags2","tags3","tags4","tags5"],bList=$("#"+id+" b").get();var max=parseInt($("#"+id+" b").last().text());var distance=Math.ceil(max/classes.length);for(var i=0;i<bList.length;i++){var num=parseInt(bList[i].innerHTML);for(var j=0;j<classes.length;j++){if(num>j*distance&&num<=(j+1)*distance){bList[i].parentNode.className=classes[j];break}}}$("#"+id).html($("#"+id+" li").get().sort(function(a,b){var valA=$(a).find("span").text().toLowerCase();var valB=$(b).find("span").text().toLowerCase();return valA.localeCompare(valB)}))},toDate:function(time,format){var dateTime=new Date(time);var o={"M+":dateTime.getMonth()+1,"d+":dateTime.getDate(),"H+":dateTime.getHours(),"m+":dateTime.getMinutes(),"s+":dateTime.getSeconds(),"q+":Math.floor((dateTime.getMonth()+3)/3),S:dateTime.getMilliseconds()};if(/(y+)/.test(format)){format=format.replace(RegExp.$1,(dateTime.getFullYear()+"").substr(4-RegExp.$1.length))}for(var k in o){if(new RegExp("("+k+")").test(format)){format=format.replace(RegExp.$1,RegExp.$1.length==1?o[k]:("00"+o[k]).substr((""+o[k]).length))}}return format},getWinHeight:function(){if(window.innerHeight){return window.innerHeight}if(document.compatMode==="CSS1Compat"){return window.document.documentElement.clientHeight}return window.document.body.clientHeight}};if(!Cookie){var Cookie={readCookie:function(name){var nameEQ=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length)}if(c.indexOf(nameEQ)==0){return decodeURIComponent(c.substring(nameEQ.length,c.length))}}return""},eraseCookie:function(name){this.createCookie(name,"",-1)},createCookie:function(name,value,days){var expires="";if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires="; expires="+date.toGMTString()}document.cookie=name+"="+encodeURIComponent(value)+expires+"; path=/"}}}; var Util={isLoggedIn:function(){if(($("#admin").length===1&&$("#admin").data("login"))||latkeConfig.isLoggedIn==="true"){return true}else{return false}},getUserName:function(){if($("#adminName").length===1){return $("#adminName").text()}else{return latkeConfig.userName}},error:function(){$("#tipMsg").text("Error: "+arguments[0]+" File: "+arguments[1]+"\nLine: "+arguments[2]+" please report this issue on https://github.com/b3log/solo/issues/new");$("#loadMsg").text("")},killIE:function(){var addKillPanel=function(){if(Cookie.readCookie("showKill")===""){var left=($(window).width()-701)/2,top=($(window).height()-420)/2;$("body").append("<div style='display: block; height: 100%; width: 100%; position: fixed; background-color: rgb(0, 0, 0); opacity: 0.6; top: 0px;z-index:11'></div><iframe style='left:"+left+"px;z-index:20;top: "+top+"px; position: fixed; border: 0px none; width: 701px; height: 420px;' src='"+latkeConfig.servePath+"/kill-browser'></iframe>")}};if($.browser.msie){if($.browser.version==="6.0"||$.browser.version==="7.0"){addKillPanel();return}if(window.external&&window.external.twGetRunPath){var path=external.twGetRunPath();if(path&&path.toLowerCase().indexOf("360se")>-1&&window.location.href.indexOf("admin-index")>-1){addKillPanel();return}}}},replaceEmString:function(str){var commentSplited=str.split("[em");if(commentSplited.length===1){return str}str=commentSplited[0];for(var j=1;j<commentSplited.length;j++){var key=commentSplited[j].substr(0,2);str+="<img src='"+latkeConfig.staticServePath+"/skins/"+Label.skinDirName+"/images/emotions/em"+key+".png' alt='"+Label["em"+key+"Label"]+"' title='"+Label["em"+key+"Label"]+"'/>"+commentSplited[j].substr(3)}return str},proessURL:function(url){if(!/^\w+:\/\//.test(url)){url="http://"+url}return url},switchMobile:function(skin){Cookie.createCookie("btouch_switch_toggle",skin,365);setTimeout(function(){location.reload()},1250)},setTopBar:function(){var $top=$("#top");if($top.length===1){var $showTop=$("#showTop");$showTop.click(function(){$top.slideDown();$showTop.hide()});$("#hideTop").click(function(){$top.slideUp();$showTop.show()})}},goTop:function(){$("html, body").animate({scrollTop:0},800)},goBottom:function(bottom){if(!bottom){bottom=0}var wHeight=$("body").height()>$(document).height()?$("body").height():$(document).height();window.scrollTo(0,wHeight-$(window).height()-bottom)},init:function(){Util.killIE();Util.setTopBar()},replaceSideEm:function(comments){for(var i=0;i<comments.length;i++){var $comment=$(comments[i]);$comment.html(Util.replaceEmString($comment.html()))}},buildTags:function(id){id=id||"tags";var classes=["tags1","tags2","tags3","tags4","tags5"],bList=$("#"+id+" b").get();var max=parseInt($("#"+id+" b").last().text());var distance=Math.ceil(max/classes.length);for(var i=0;i<bList.length;i++){var num=parseInt(bList[i].innerHTML);for(var j=0;j<classes.length;j++){if(num>j*distance&&num<=(j+1)*distance){bList[i].parentNode.className=classes[j];break}}}$("#"+id).html($("#"+id+" li").get().sort(function(a,b){var valA=$(a).find("span").text().toLowerCase();var valB=$(b).find("span").text().toLowerCase();return valA.localeCompare(valB)}))},toDate:function(time,format){var dateTime=new Date(time);var o={"M+":dateTime.getMonth()+1,"d+":dateTime.getDate(),"H+":dateTime.getHours(),"m+":dateTime.getMinutes(),"s+":dateTime.getSeconds(),"q+":Math.floor((dateTime.getMonth()+3)/3),S:dateTime.getMilliseconds()};if(/(y+)/.test(format)){format=format.replace(RegExp.$1,(dateTime.getFullYear()+"").substr(4-RegExp.$1.length))}for(var k in o){if(new RegExp("("+k+")").test(format)){format=format.replace(RegExp.$1,RegExp.$1.length==1?o[k]:("00"+o[k]).substr((""+o[k]).length))}}return format},getWinHeight:function(){if(window.innerHeight){return window.innerHeight}if(document.compatMode==="CSS1Compat"){return window.document.documentElement.clientHeight}return window.document.body.clientHeight}};if(!Cookie){var Cookie={readCookie:function(name){var nameEQ=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length)}if(c.indexOf(nameEQ)==0){return decodeURIComponent(c.substring(nameEQ.length,c.length))}}return""},eraseCookie:function(name){this.createCookie(name,"",-1)},createCookie:function(name,value,days){var expires="";if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires="; expires="+date.toGMTString()}document.cookie=name+"="+encodeURIComponent(value)+expires+"; path=/"}}};
\ No newline at end of file
/*
* Copyright (c) 2010-2017, b3log.org & hacpai.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var Page=function(tips){this.currentCommentId="";this.tips=tips};$.extend(Page.prototype,{insertEmotions:function(name){var _it=this;if(name===undefined){name=""}$("#emotions"+name+" span").click(function(){var $comment=$("#comment"+name);var endPosition=_it._getCursorEndPosition($comment[0]);var key="["+this.className+"]",textValue=$comment[0].value;textValue=textValue.substring(0,endPosition)+key+textValue.substring(endPosition,textValue.length);$("#comment"+name).val(textValue);if($.browser.msie){endPosition-=textValue.split("\n").length-1;var oR=$comment[0].createTextRange();oR.collapse(true);oR.moveStart("character",endPosition+6);oR.select()}else{$comment[0].setSelectionRange(endPosition+6,endPosition+6)}})},_getCursorEndPosition:function(textarea){textarea.focus();if(textarea.setSelectionRange){return textarea.selectionEnd}else{if(document.selection){var i=0,oS=document.selection.createRange(),oR=document.body.createTextRange();oR.moveToElementText(textarea);oS.getBookmark();for(i=0;oR.compareEndPoints("StartToStart",oS)<0&&oS.moveStart("character",-1)!==0;i++){if(textarea.value.charAt(i)==="\n"){i++}}return i}}},validateComment:function(state){if(Util.isLoggedIn()){var commenterContent=$("#comment"+state).val().replace(/(^\s*)|(\s*$)/g,"");if(2>commenterContent.length||commenterContent.length>500){$("#commentErrorTip"+state).html(this.tips.commentContentCannotEmptyLabel);$("#comment"+state).focus()}else{return true}$("#commentErrorTip"+state).show();return false}var commentName=$("#commentName"+state).val().replace(/(^\s*)|(\s*$)/g,""),commenterContent=$("#comment"+state).val().replace(/(^\s*)|(\s*$)/g,"");if(2>commentName.length||commentName.length>20){$("#commentErrorTip"+state).html(this.tips.nameTooLongLabel);$("#commentName"+state).focus()}else{if($("#commentEmail"+state).val().replace(/\s/g,"")===""){$("#commentErrorTip"+state).html(this.tips.mailCannotEmptyLabel);$("#commentEmail"+state).focus()}else{if(!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#commentEmail"+state).val())){$("#commentErrorTip"+state).html(this.tips.mailInvalidLabel);$("#commentEmail"+state).focus()}else{if(2>commenterContent.length||commenterContent.length>500){$("#commentErrorTip"+state).html(this.tips.commentContentCannotEmptyLabel);$("#comment"+state).focus()}else{if($("#commentValidate"+state).val().replace(/\s/g,"")===""){$("#commentErrorTip"+state).html(this.tips.captchaCannotEmptyLabel);$("#commentValidate"+state).focus()}else{return true}}}}}$("#commentErrorTip"+state).show();return false},replaceCommentsEm:function(selector){var $commentContents=$(selector);for(var i=0;i<$commentContents.length;i++){var str=$commentContents[i].innerHTML;$commentContents[i].innerHTML=Util.replaceEmString(str)}},_initSyntaxHighlighter:function(languages){for(var i=0;i<languages.length;i++){switch(languages[i]){case"groovy":languages[i]="groovy "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushGroovy.js";break;case"java":languages[i]="java "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushJava.js";break;case"php":languages[i]="php "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushPhp.js";break;case"scala":languages[i]="scala "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushScala.js";break;case"sql":languages[i]="sql "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushSql.js";break;case"applescript":languages[i]="applescript "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushAppleScript.js";break;case"as3":case"actionscript3":languages[i]="actionscript3 as3 "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushAS3.js";break;case"bash":case"shell":languages[i]="bash shell "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushBash.js";break;case"coldfusion":case"cf":languages[i]="coldfusion cf "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushColdFusion.js";break;case"c#":case"c-sharp":case"csharp":languages[i]="c# c-sharp csharp "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushCSharp.js";break;case"cpp":case"c":languages[i]="cpp c "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushCpp.js";break;case"css":languages[i]="css "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushCss.js";break;case"delphi":case"pascal":languages[i]="delphi pascal "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushDelphi.js";break;case"diff":case"patch":case"pas":languages[i]="diff patch pas "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushDiff.js";break;case"erl":case"erlang":languages[i]="erl erlang "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushErlang.js";break;case"js":case"jscript":case"javascript":languages[i]="js jscript javascript "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushJScript.js";break;case"jfx":case"javafx":languages[i]="jfx javafx "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushJavaFX.js";break;case"perl":case"pl":languages[i]="perl pl "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushPerl.js";break;case"plain":case"text":languages[i]="text plain "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushPlain.js";break;case"ps":case"powershell":languages[i]="ps powershell "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushPowerShell.js";break;case"py":case"python":languages[i]="py python "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushPython.js";break;case"rails":case"ror":case"ruby":case"rb":languages[i]="ruby rails ror rb "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushRuby.js";break;case"sass":case"scss":languages[i]="sass scss "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushSass.js";break;case"vb":case"vbnet":languages[i]="vb vbnet "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushVb.js";break;case"xml":case"xhtml":case"xslt":case"html":languages[i]="xml xhtml xslt html "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushXml.js";break;default:break}}SyntaxHighlighter.autoloader.apply(null,languages);SyntaxHighlighter.config.stripBrs=true;SyntaxHighlighter.all()},_loadSyntaxHighlighter:function(SHTheme){var cssName=SHTheme?SHTheme:"shCoreEclipse",that=this;if(document.createStyleSheet){document.createStyleSheet(latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/styles/"+cssName+".css")}else{$("head").append($("<link rel='stylesheet' href='"+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/styles/"+cssName+".css' type='text/css' charset='utf-8' />"))}$.ajax({url:latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shCore.js",dataType:"script",cache:true,success:function(){var languages=[],isScrip=false;$(".article-body pre, .code-highlight pre").each(function(){var name=this.className.split(";")[0];var language=name.substr(7,name.length-1);if(this.className.indexOf("html-script: true")>-1&&(language!=="xml"&&language!=="xhtml"&&language!=="xslt"&&language!="html")){isScrip=true}languages.push(language)});if(isScrip){$.ajax({url:latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushXml.js",dataType:"script",cache:true,success:function(){that._initSyntaxHighlighter(languages)}})}else{that._initSyntaxHighlighter(languages)}}})},parseLanguage:function(obj){var isPrettify=false,isSH=false;$(".article-body pre, .code-highlight pre").each(function(){if(this.className.indexOf("brush")>-1){isSH=true}if(this.className.indexOf("prettyprint")>-1){isPrettify=true}});if(isSH){this._loadSyntaxHighlighter(obj?(obj.SHTheme?obj.SHTheme:undefined):undefined);return false}if(isPrettify){if(document.createStyleSheet){document.createStyleSheet(latkeConfig.staticServePath+"/js/lib/google-code-prettify/prettify.css")}else{$("head").append($("<link rel='stylesheet' href='"+latkeConfig.staticServePath+"/js/lib/google-code-prettify/prettify.css'>"))}$.ajax({url:latkeConfig.staticServePath+"/js/lib/google-code-prettify/prettify.js",dataType:"script",cache:true,success:function(){prettyPrint()}});return false}if(document.createStyleSheet){document.createStyleSheet(latkeConfig.staticServePath+"/js/lib/highlight.js-9.6.0/styles/default.css")}else{$("head").append($("<link rel='stylesheet' href='"+latkeConfig.staticServePath+"/js/lib/highlight.js-9.6.0/styles/github.css'>"))}$.ajax({url:latkeConfig.staticServePath+"/js/lib/highlight.js-9.6.0/highlight.pack.js",dataType:"script",cache:true,success:function(){hljs.initHighlightingOnLoad()}})},load:function(obj){var that=this;that.insertEmotions();that.parseLanguage(obj?(obj.language?obj.language:undefined):undefined);$("#commentValidate").keypress(function(event){if(event.keyCode===13){that.submitComment()}});$("#comment").keypress(function(event){if(event.keyCode===13&&event.ctrlKey){that.submitComment()}});$("#captcha").click(function(){$(this).attr("src",latkeConfig.servePath+"/captcha.do?code="+Math.random())});if(!Util.isLoggedIn()){$("#commentEmail").val(Cookie.readCookie("commentEmail"));$("#commentURL").val(Cookie.readCookie("commentURL"));$("#commentName").val(Cookie.readCookie("commentName"))}try{JSON}catch(e){document.write('<script src="'+latkeConfig.staticServePath+'/js/lib/json2.js"><\/script>')}},loadRandomArticles:function(headTitle){var randomArticles1Label=this.tips.randomArticles1Label;$.ajax({url:latkeConfig.servePath+"/get-random-articles.do",type:"POST",success:function(result,textStatus){var randomArticles=result.randomArticles;if(!randomArticles||0===randomArticles.length){$("#randomArticles").remove();return}var listHtml="";for(var i=0;i<randomArticles.length;i++){var article=randomArticles[i];var title=article.articleTitle;var randomArticleLiHtml="<li><a rel='nofollow' title='"+title+"' href='"+latkeConfig.servePath+article.articlePermalink+"'>"+title+"</a></li>";listHtml+=randomArticleLiHtml}var titleHTML=headTitle?headTitle:"<h4>"+randomArticles1Label+"</h4>";var randomArticleListHtml=titleHTML+"<ul class='marginLeft12'>"+listHtml+"</ul>";$("#randomArticles").append(randomArticleListHtml)}})},loadRelevantArticles:function(id,headTitle){$.ajax({url:latkeConfig.servePath+"/article/id/"+id+"/relevant/articles",type:"GET",success:function(data,textStatus){var articles=data.relevantArticles;if(!articles||0===articles.length){$("#relevantArticles").remove();return}var listHtml="";for(var i=0;i<articles.length;i++){var article=articles[i];var title=article.articleTitle;var articleLiHtml="<li><a rel='nofollow' title='"+title+"' href='"+latkeConfig.servePath+article.articlePermalink+"'>"+title+"</a></li>";listHtml+=articleLiHtml}var relevantArticleListHtml=headTitle+"<ul class='marginLeft12'>"+listHtml+"</ul>";$("#relevantArticles").append(relevantArticleListHtml)},error:function(){$("#relevantArticles").remove()}})},loadExternalRelevantArticles:function(tags,headTitle){var tips=this.tips;try{$.ajax({url:"https://rhythm.b3log.org/get-articles-by-tags.do?tags="+tags+"&blogHost="+tips.blogHost+"&paginationPageSize="+tips.externalRelevantArticlesDisplayCount,type:"GET",cache:true,dataType:"jsonp",error:function(){$("#externalRelevantArticles").remove()},success:function(data,textStatus){var articles=data.articles;if(!articles||0===articles.length){$("#externalRelevantArticles").remove();return}var listHtml="";for(var i=0;i<articles.length;i++){var article=articles[i];var title=article.articleTitle;var articleLiHtml="<li><a rel='nofollow' title='"+title+"' target='_blank' href='"+article.articlePermalink+"'>"+title+"</a></li>";listHtml+=articleLiHtml}var titleHTML=headTitle?headTitle:"<h4>"+tips.externalRelevantArticles1Label+"</h4>";var randomArticleListHtml=titleHTML+"<ul class='marginLeft12'>"+listHtml+"</ul>";$("#externalRelevantArticles").append(randomArticleListHtml)}})}catch(e){}},submitComment:function(commentId,state){if(!state){state=""}var that=this,tips=this.tips,type="article";if(tips.externalRelevantArticlesDisplayCount===undefined){type="page"}if(this.validateComment(state)){$("#submitCommentButton"+state).attr("disabled","disabled");$("#commentErrorTip"+state).show().html(this.tips.loadingLabel);var requestJSONObject={oId:tips.oId,commentContent:$("#comment"+state).val().replace(/(^\s*)|(\s*$)/g,"")};if(!Util.isLoggedIn()){requestJSONObject={oId:tips.oId,commentContent:$("#comment"+state).val().replace(/(^\s*)|(\s*$)/g,""),commentEmail:$("#commentEmail"+state).val(),commentURL:Util.proessURL($("#commentURL"+state).val().replace(/(^\s*)|(\s*$)/g,"")),commentName:$("#commentName"+state).val().replace(/(^\s*)|(\s*$)/g,""),captcha:$("#commentValidate"+state).val()};Cookie.createCookie("commentName",requestJSONObject.commentName,365);Cookie.createCookie("commentEmail",requestJSONObject.commentEmail,365);Cookie.createCookie("commentURL",$("#commentURL"+state).val().replace(/(^\s*)|(\s*$)/g,""),365)}if(state==="Reply"){requestJSONObject.commentOriginalCommentId=commentId}$.ajax({type:"POST",url:latkeConfig.servePath+"/add-"+type+"-comment.do",cache:false,contentType:"application/json",data:JSON.stringify(requestJSONObject),success:function(result){$("#submitCommentButton"+state).removeAttr("disabled");if(!result.sc){$("#commentErrorTip"+state).html(result.msg);$("#commentValidate"+state).val("");$("#captcha"+state).click();if(!Util.isLoggedIn()){$("#captcha"+state).attr("src",latkeConfig.servePath+"/captcha.do?code="+Math.random())}return}$("#comment"+state).val(result.commentContent);$("#commentName"+state).val(result.commentName);result.replyNameHTML="";if(!Util.isLoggedIn()){$("#captcha"+state).attr("src",latkeConfig.servePath+"/captcha.do?code="+Math.random());if($("#commentURL"+state).val().replace(/\s/g,"")===""){result.replyNameHTML="<a>"+$("#commentName"+state).val()+"</a>"}else{result.replyNameHTML='<a href="'+Util.proessURL($("#commentURL"+state).val())+'" target="_blank">'+$("#commentName"+state).val()+"</a>"}result.userName=result.commentName}else{result.replyNameHTML='<a href="'+window.location.host+'" target="_blank">'+Util.getUserName()+"</a>";result.userName=Util.getUserName()}if(typeof(addComment)==="undefined"){that.addCommentAjax(Util.replaceEmString(result.cmtTpl),state)}else{that.addCommentAjax(addComment(result,state),state)}}})}},addReplyForm:function(id,commentFormHTML,endHTML){var that=this;if(id===this.currentCommentId){if($("#commentNameReply").val()===""){$("#commentNameReply").focus()}else{if($("#commentEmailReply").val()===""){$("#commentEmailReply").focus()}else{$("#commentReply").focus()}}return}$("#replyForm").remove();endHTML=endHTML?endHTML:"";if(endHTML==="</div>"){$("#"+id).append(commentFormHTML+$("#commentForm").html()+endHTML)}else{$("#"+id).append(commentFormHTML+$("#commentForm").html()+"</table>"+endHTML)}$("#replyForm input, #replyForm textarea").each(function(){this.id=this.id+"Reply"});$("#commentNameReply").val(Cookie.readCookie("commentName"));$("#commentEmailReply").val(Cookie.readCookie("commentEmail"));var $label=$("#replyForm #commentURLLabel");if($label.length===1){$label.attr("id","commentURLLabelReply")}$("#commentURLReply").val(Cookie.readCookie("commentURL"));$("#replyForm #emotions").attr("id","emotionsReply");this.insertEmotions("Reply");$("#commentReply").unbind().keypress(function(event){if(event.keyCode===13&&event.ctrlKey){that.submitComment(id,"Reply");event.preventDefault()}});$("#commentValidateReply").unbind().keypress(function(event){if(event.keyCode===13){that.submitComment(id,"Reply");event.preventDefault()}});$("#replyForm #captcha").attr("id","captchaReply").attr("src",latkeConfig.servePath+"/captcha.do?"+new Date().getTime()).click(function(){$(this).attr("src",latkeConfig.servePath+"/captcha.do?code="+Math.random())});$("#replyForm #commentErrorTip").attr("id","commentErrorTipReply").html("").hide();$("#replyForm #submitCommentButton").attr("id","submitCommentButtonReply");$("#replyForm #submitCommentButtonReply").unbind("click").removeAttr("onclick").click(function(){that.submitComment(id,"Reply")});if($("#commentNameReply").val()===""){$("#commentNameReply").focus()}else{if($("#commentEmailReply").val()===""){$("#commentEmailReply").focus()}else{$("#commentReply").focus()}}this.currentCommentId=id},hideComment:function(id){$("#commentRef"+id).hide()},showComment:function(it,id,top,parentTag){var positionTop=parseInt($(it).position().top);if(parentTag){positionTop=parseInt($(it).parents(parentTag).position().top)}if($("#commentRef"+id).length>0){$("#commentRef"+id).show().css("top",(positionTop+top)+"px")}else{var $refComment=$("#"+id).clone();$refComment.addClass("comment-body-ref").attr("id","commentRef"+id);$refComment.find("#replyForm").remove();$("#comments").append($refComment);$("#commentRef"+id).css("top",(positionTop+top)+"px")}},addCommentAjax:function(commentHTML,state){if($("#comments").children().length>0){$($("#comments").children()[0]).before(commentHTML)}else{$("#comments").html(commentHTML)}if(state===""){$("#commentErrorTip").html("").hide();$("#comment").val("");$("#commentValidate").val("");$("#captcha").attr("src",latkeConfig.servePath+"/captcha.do?code="+Math.random())}else{$("#replyForm").remove()}window.location.hash="#comments"}}); var Page=function(tips){this.currentCommentId="";this.tips=tips};$.extend(Page.prototype,{insertEmotions:function(name){var _it=this;if(name===undefined){name=""}$("#emotions"+name+" span").click(function(){var $comment=$("#comment"+name);var endPosition=_it._getCursorEndPosition($comment[0]);var key="["+this.className+"]",textValue=$comment[0].value;textValue=textValue.substring(0,endPosition)+key+textValue.substring(endPosition,textValue.length);$("#comment"+name).val(textValue);if($.browser.msie){endPosition-=textValue.split("\n").length-1;var oR=$comment[0].createTextRange();oR.collapse(true);oR.moveStart("character",endPosition+6);oR.select()}else{$comment[0].setSelectionRange(endPosition+6,endPosition+6)}})},_getCursorEndPosition:function(textarea){textarea.focus();if(textarea.setSelectionRange){return textarea.selectionEnd}else{if(document.selection){var i=0,oS=document.selection.createRange(),oR=document.body.createTextRange();oR.moveToElementText(textarea);oS.getBookmark();for(i=0;oR.compareEndPoints("StartToStart",oS)<0&&oS.moveStart("character",-1)!==0;i++){if(textarea.value.charAt(i)==="\n"){i++}}return i}}},validateComment:function(state){if(Util.isLoggedIn()){var commenterContent=$("#comment"+state).val().replace(/(^\s*)|(\s*$)/g,"");if(2>commenterContent.length||commenterContent.length>500){$("#commentErrorTip"+state).html(this.tips.commentContentCannotEmptyLabel);$("#comment"+state).focus()}else{return true}$("#commentErrorTip"+state).show();return false}var commentName=$("#commentName"+state).val().replace(/(^\s*)|(\s*$)/g,""),commenterContent=$("#comment"+state).val().replace(/(^\s*)|(\s*$)/g,"");if(2>commentName.length||commentName.length>20){$("#commentErrorTip"+state).html(this.tips.nameTooLongLabel);$("#commentName"+state).focus()}else{if($("#commentEmail"+state).val().replace(/\s/g,"")===""){$("#commentErrorTip"+state).html(this.tips.mailCannotEmptyLabel);$("#commentEmail"+state).focus()}else{if(!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#commentEmail"+state).val())){$("#commentErrorTip"+state).html(this.tips.mailInvalidLabel);$("#commentEmail"+state).focus()}else{if(2>commenterContent.length||commenterContent.length>500){$("#commentErrorTip"+state).html(this.tips.commentContentCannotEmptyLabel);$("#comment"+state).focus()}else{if($("#commentValidate"+state).val().replace(/\s/g,"")===""){$("#commentErrorTip"+state).html(this.tips.captchaCannotEmptyLabel);$("#commentValidate"+state).focus()}else{return true}}}}}$("#commentErrorTip"+state).show();return false},replaceCommentsEm:function(selector){var $commentContents=$(selector);for(var i=0;i<$commentContents.length;i++){var str=$commentContents[i].innerHTML;$commentContents[i].innerHTML=Util.replaceEmString(str)}},_initSyntaxHighlighter:function(languages){for(var i=0;i<languages.length;i++){switch(languages[i]){case"groovy":languages[i]="groovy "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushGroovy.js";break;case"java":languages[i]="java "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushJava.js";break;case"php":languages[i]="php "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushPhp.js";break;case"scala":languages[i]="scala "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushScala.js";break;case"sql":languages[i]="sql "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushSql.js";break;case"applescript":languages[i]="applescript "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushAppleScript.js";break;case"as3":case"actionscript3":languages[i]="actionscript3 as3 "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushAS3.js";break;case"bash":case"shell":languages[i]="bash shell "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushBash.js";break;case"coldfusion":case"cf":languages[i]="coldfusion cf "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushColdFusion.js";break;case"c#":case"c-sharp":case"csharp":languages[i]="c# c-sharp csharp "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushCSharp.js";break;case"cpp":case"c":languages[i]="cpp c "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushCpp.js";break;case"css":languages[i]="css "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushCss.js";break;case"delphi":case"pascal":languages[i]="delphi pascal "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushDelphi.js";break;case"diff":case"patch":case"pas":languages[i]="diff patch pas "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushDiff.js";break;case"erl":case"erlang":languages[i]="erl erlang "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushErlang.js";break;case"js":case"jscript":case"javascript":languages[i]="js jscript javascript "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushJScript.js";break;case"jfx":case"javafx":languages[i]="jfx javafx "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushJavaFX.js";break;case"perl":case"pl":languages[i]="perl pl "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushPerl.js";break;case"plain":case"text":languages[i]="text plain "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushPlain.js";break;case"ps":case"powershell":languages[i]="ps powershell "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushPowerShell.js";break;case"py":case"python":languages[i]="py python "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushPython.js";break;case"rails":case"ror":case"ruby":case"rb":languages[i]="ruby rails ror rb "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushRuby.js";break;case"sass":case"scss":languages[i]="sass scss "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushSass.js";break;case"vb":case"vbnet":languages[i]="vb vbnet "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushVb.js";break;case"xml":case"xhtml":case"xslt":case"html":languages[i]="xml xhtml xslt html "+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushXml.js";break;default:break}}SyntaxHighlighter.autoloader.apply(null,languages);SyntaxHighlighter.config.stripBrs=true;SyntaxHighlighter.all()},_loadSyntaxHighlighter:function(SHTheme){var cssName=SHTheme?SHTheme:"shCoreEclipse",that=this;if(document.createStyleSheet){document.createStyleSheet(latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/styles/"+cssName+".css")}else{$("head").append($("<link rel='stylesheet' href='"+latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/styles/"+cssName+".css' type='text/css' charset='utf-8' />"))}$.ajax({url:latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shCore.js",dataType:"script",cache:true,success:function(){var languages=[],isScrip=false;$(".article-body pre, .code-highlight pre").each(function(){var name=this.className.split(";")[0];var language=name.substr(7,name.length-1);if(this.className.indexOf("html-script: true")>-1&&(language!=="xml"&&language!=="xhtml"&&language!=="xslt"&&language!="html")){isScrip=true}languages.push(language)});if(isScrip){$.ajax({url:latkeConfig.staticServePath+"/js/lib/SyntaxHighlighter/scripts/shBrushXml.js",dataType:"script",cache:true,success:function(){that._initSyntaxHighlighter(languages)}})}else{that._initSyntaxHighlighter(languages)}}})},parseLanguage:function(obj){var isPrettify=false,isSH=false;$(".article-body pre, .code-highlight pre").each(function(){if(this.className.indexOf("brush")>-1){isSH=true}if(this.className.indexOf("prettyprint")>-1){isPrettify=true}});if(isSH){this._loadSyntaxHighlighter(obj?(obj.SHTheme?obj.SHTheme:undefined):undefined);return false}if(isPrettify){if(document.createStyleSheet){document.createStyleSheet(latkeConfig.staticServePath+"/js/lib/google-code-prettify/prettify.css")}else{$("head").append($("<link rel='stylesheet' href='"+latkeConfig.staticServePath+"/js/lib/google-code-prettify/prettify.css'>"))}$.ajax({url:latkeConfig.staticServePath+"/js/lib/google-code-prettify/prettify.js",dataType:"script",cache:true,success:function(){prettyPrint()}});return false}if(document.createStyleSheet){document.createStyleSheet(latkeConfig.staticServePath+"/js/lib/highlight.js-9.6.0/styles/default.css")}else{$("head").append($("<link rel='stylesheet' href='"+latkeConfig.staticServePath+"/js/lib/highlight.js-9.6.0/styles/github.css'>"))}$.ajax({url:latkeConfig.staticServePath+"/js/lib/highlight.js-9.6.0/highlight.pack.js",dataType:"script",cache:true,success:function(){hljs.initHighlightingOnLoad()}})},load:function(obj){var that=this;that.insertEmotions();that.parseLanguage(obj?(obj.language?obj.language:undefined):undefined);$("#commentValidate").keypress(function(event){if(event.keyCode===13){that.submitComment()}});$("#comment").keypress(function(event){if(event.keyCode===13&&event.ctrlKey){that.submitComment()}});$("#captcha").click(function(){$(this).attr("src",latkeConfig.servePath+"/captcha.do?code="+Math.random())});if(!Util.isLoggedIn()){$("#commentEmail").val(Cookie.readCookie("commentEmail"));$("#commentURL").val(Cookie.readCookie("commentURL"));$("#commentName").val(Cookie.readCookie("commentName"))}try{JSON}catch(e){document.write('<script src="'+latkeConfig.staticServePath+'/js/lib/json2.js"><\/script>')}},loadRandomArticles:function(headTitle){var randomArticles1Label=this.tips.randomArticles1Label;$.ajax({url:latkeConfig.servePath+"/get-random-articles.do",type:"POST",success:function(result,textStatus){var randomArticles=result.randomArticles;if(!randomArticles||0===randomArticles.length){$("#randomArticles").remove();return}var listHtml="";for(var i=0;i<randomArticles.length;i++){var article=randomArticles[i];var title=article.articleTitle;var randomArticleLiHtml="<li><a rel='nofollow' title='"+title+"' href='"+latkeConfig.servePath+article.articlePermalink+"'>"+title+"</a></li>";listHtml+=randomArticleLiHtml}var titleHTML=headTitle?headTitle:"<h4>"+randomArticles1Label+"</h4>";var randomArticleListHtml=titleHTML+"<ul class='marginLeft12'>"+listHtml+"</ul>";$("#randomArticles").append(randomArticleListHtml)}})},loadRelevantArticles:function(id,headTitle){$.ajax({url:latkeConfig.servePath+"/article/id/"+id+"/relevant/articles",type:"GET",success:function(data,textStatus){var articles=data.relevantArticles;if(!articles||0===articles.length){$("#relevantArticles").remove();return}var listHtml="";for(var i=0;i<articles.length;i++){var article=articles[i];var title=article.articleTitle;var articleLiHtml="<li><a rel='nofollow' title='"+title+"' href='"+latkeConfig.servePath+article.articlePermalink+"'>"+title+"</a></li>";listHtml+=articleLiHtml}var relevantArticleListHtml=headTitle+"<ul class='marginLeft12'>"+listHtml+"</ul>";$("#relevantArticles").append(relevantArticleListHtml)},error:function(){$("#relevantArticles").remove()}})},loadExternalRelevantArticles:function(tags,headTitle){var tips=this.tips;try{$.ajax({url:"https://rhythm.b3log.org/get-articles-by-tags.do?tags="+tags+"&blogHost="+tips.blogHost+"&paginationPageSize="+tips.externalRelevantArticlesDisplayCount,type:"GET",cache:true,dataType:"jsonp",error:function(){$("#externalRelevantArticles").remove()},success:function(data,textStatus){var articles=data.articles;if(!articles||0===articles.length){$("#externalRelevantArticles").remove();return}var listHtml="";for(var i=0;i<articles.length;i++){var article=articles[i];var title=article.articleTitle;var articleLiHtml="<li><a rel='nofollow' title='"+title+"' target='_blank' href='"+article.articlePermalink+"'>"+title+"</a></li>";listHtml+=articleLiHtml}var titleHTML=headTitle?headTitle:"<h4>"+tips.externalRelevantArticles1Label+"</h4>";var randomArticleListHtml=titleHTML+"<ul class='marginLeft12'>"+listHtml+"</ul>";$("#externalRelevantArticles").append(randomArticleListHtml)}})}catch(e){}},submitComment:function(commentId,state){if(!state){state=""}var that=this,tips=this.tips,type="article";if(tips.externalRelevantArticlesDisplayCount===undefined){type="page"}if(this.validateComment(state)){$("#submitCommentButton"+state).attr("disabled","disabled");$("#commentErrorTip"+state).show().html(this.tips.loadingLabel);var requestJSONObject={oId:tips.oId,commentContent:$("#comment"+state).val().replace(/(^\s*)|(\s*$)/g,"")};if(!Util.isLoggedIn()){requestJSONObject={oId:tips.oId,commentContent:$("#comment"+state).val().replace(/(^\s*)|(\s*$)/g,""),commentEmail:$("#commentEmail"+state).val(),commentURL:Util.proessURL($("#commentURL"+state).val().replace(/(^\s*)|(\s*$)/g,"")),commentName:$("#commentName"+state).val().replace(/(^\s*)|(\s*$)/g,""),captcha:$("#commentValidate"+state).val()};Cookie.createCookie("commentName",requestJSONObject.commentName,365);Cookie.createCookie("commentEmail",requestJSONObject.commentEmail,365);Cookie.createCookie("commentURL",$("#commentURL"+state).val().replace(/(^\s*)|(\s*$)/g,""),365)}if(state==="Reply"){requestJSONObject.commentOriginalCommentId=commentId}$.ajax({type:"POST",url:latkeConfig.servePath+"/add-"+type+"-comment.do",cache:false,contentType:"application/json",data:JSON.stringify(requestJSONObject),success:function(result){$("#submitCommentButton"+state).removeAttr("disabled");if(!result.sc){$("#commentErrorTip"+state).html(result.msg);$("#commentValidate"+state).val("");$("#captcha"+state).click();if(!Util.isLoggedIn()){$("#captcha"+state).attr("src",latkeConfig.servePath+"/captcha.do?code="+Math.random())}return}$("#comment"+state).val(result.commentContent);$("#commentName"+state).val(result.commentName);result.replyNameHTML="";if(!Util.isLoggedIn()){$("#captcha"+state).attr("src",latkeConfig.servePath+"/captcha.do?code="+Math.random());if($("#commentURL"+state).val().replace(/\s/g,"")===""){result.replyNameHTML="<a>"+$("#commentName"+state).val()+"</a>"}else{result.replyNameHTML='<a href="'+Util.proessURL($("#commentURL"+state).val())+'" target="_blank">'+$("#commentName"+state).val()+"</a>"}result.userName=result.commentName}else{result.replyNameHTML='<a href="'+window.location.host+'" target="_blank">'+Util.getUserName()+"</a>";result.userName=Util.getUserName()}if(typeof(addComment)==="undefined"){that.addCommentAjax(Util.replaceEmString(result.cmtTpl),state)}else{that.addCommentAjax(addComment(result,state),state)}}})}},addReplyForm:function(id,commentFormHTML,endHTML){var that=this;if(id===this.currentCommentId){if($("#commentNameReply").val()===""){$("#commentNameReply").focus()}else{if($("#commentEmailReply").val()===""){$("#commentEmailReply").focus()}else{$("#commentReply").focus()}}return}$("#replyForm").remove();endHTML=endHTML?endHTML:"";if(endHTML==="</div>"){$("#"+id).append(commentFormHTML+$("#commentForm").html()+endHTML)}else{$("#"+id).append(commentFormHTML+$("#commentForm").html()+"</table>"+endHTML)}$("#replyForm input, #replyForm textarea").each(function(){this.id=this.id+"Reply"});$("#commentNameReply").val(Cookie.readCookie("commentName"));$("#commentEmailReply").val(Cookie.readCookie("commentEmail"));var $label=$("#replyForm #commentURLLabel");if($label.length===1){$label.attr("id","commentURLLabelReply")}$("#commentURLReply").val(Cookie.readCookie("commentURL"));$("#replyForm #emotions").attr("id","emotionsReply");this.insertEmotions("Reply");$("#commentReply").unbind().keypress(function(event){if(event.keyCode===13&&event.ctrlKey){that.submitComment(id,"Reply");event.preventDefault()}});$("#commentValidateReply").unbind().keypress(function(event){if(event.keyCode===13){that.submitComment(id,"Reply");event.preventDefault()}});$("#replyForm #captcha").attr("id","captchaReply").attr("src",latkeConfig.servePath+"/captcha.do?"+new Date().getTime()).click(function(){$(this).attr("src",latkeConfig.servePath+"/captcha.do?code="+Math.random())});$("#replyForm #commentErrorTip").attr("id","commentErrorTipReply").html("").hide();$("#replyForm #submitCommentButton").attr("id","submitCommentButtonReply");$("#replyForm #submitCommentButtonReply").unbind("click").removeAttr("onclick").click(function(){that.submitComment(id,"Reply")});if($("#commentNameReply").val()===""){$("#commentNameReply").focus()}else{if($("#commentEmailReply").val()===""){$("#commentEmailReply").focus()}else{$("#commentReply").focus()}}this.currentCommentId=id},hideComment:function(id){$("#commentRef"+id).hide()},showComment:function(it,id,top,parentTag){var positionTop=parseInt($(it).position().top);if(parentTag){positionTop=parseInt($(it).parents(parentTag).position().top)}if($("#commentRef"+id).length>0){$("#commentRef"+id).show().css("top",(positionTop+top)+"px")}else{var $refComment=$("#"+id).clone();$refComment.addClass("comment-body-ref").attr("id","commentRef"+id);$refComment.find("#replyForm").remove();$("#comments").append($refComment);$("#commentRef"+id).css("top",(positionTop+top)+"px")}},addCommentAjax:function(commentHTML,state){if($("#comments").children().length>0){$($("#comments").children()[0]).before(commentHTML)}else{$("#comments").html(commentHTML)}if(state===""){$("#commentErrorTip").html("").hide();$("#comment").val("");$("#commentValidate").val("");$("#captcha").attr("src",latkeConfig.servePath+"/captcha.do?code="+Math.random())}else{$("#replyForm").remove()}window.location.hash="#comments"}});
\ No newline at end of file
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