first commit
This commit is contained in:
commit
09a14bf0a3
1088 files changed
+145132
No files matched your search
@@ -0,0 +1,803 @@
|
||||
#body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ztree * {
|
||||
font-size: 14px;
|
||||
font-family: "Microsoft Yahei", Verdana, Simsun, "Segoe UI Web Light", "Segoe UI Light", "Segoe UI Web Regular", "Segoe UI", "Segoe UI Symbol", "Helvetica Neue", Arial
|
||||
}
|
||||
|
||||
.ztree {
|
||||
padding: 0
|
||||
}
|
||||
|
||||
.ztree li ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
.ztree li {
|
||||
line-height: 32px;
|
||||
padding-left: 1em
|
||||
}
|
||||
|
||||
.ztree li a {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
padding-top: 0;
|
||||
padding-right: 0;
|
||||
color: #666;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.ztree li a::before {
|
||||
content: " ";
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
user-select: none;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.ztree li a.curSelectedNode::before {
|
||||
background: #f1f0f0;
|
||||
}
|
||||
|
||||
.ztree li a.curSelectedNode::after {
|
||||
content: ' ';
|
||||
display: block;
|
||||
width: 4px;
|
||||
float: right;
|
||||
background-color: #5FB878;
|
||||
height: 32px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ztree li a:hover::before {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ztree li a>span {
|
||||
position: relative
|
||||
}
|
||||
|
||||
.ztree li.level0>a {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.ztree li a:hover {
|
||||
text-decoration: none;
|
||||
color: #5FB878;
|
||||
}
|
||||
|
||||
.ztree li a span.button.switch {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.ztree li a span.button.noline_docu {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.ztree.showIcon li a span.button.switch {
|
||||
visibility: visible
|
||||
}
|
||||
|
||||
.ztree li a.curSelectedNode {
|
||||
border: 0;
|
||||
height: 32px;
|
||||
font-weight: bold;
|
||||
color: #5FB878;
|
||||
}
|
||||
|
||||
.ztree li span {
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.ztree li span.button {
|
||||
margin-top: -7px;
|
||||
background-image: url("../images/left_menuForOutLook.png");
|
||||
*background-image: url("../images/left_menuForOutLook.gif")
|
||||
}
|
||||
|
||||
.ztree li span.button.switch {
|
||||
width: 20px;
|
||||
height: 16px;
|
||||
z-index: 2
|
||||
}
|
||||
|
||||
.ztree li span.button.switch.level0 {
|
||||
width: 20px;
|
||||
height: 20px
|
||||
}
|
||||
|
||||
.ztree li span.button.switch.level1 {
|
||||
width: 20px;
|
||||
height: 20px
|
||||
}
|
||||
|
||||
.ztree li span.button.noline_open {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.ztree li span.button.noline_close {
|
||||
background-position: -18px 0;
|
||||
}
|
||||
|
||||
.ztree li a.tmpTargetNode_inner {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.ztree li a.tmpTargetNode_inner::before {
|
||||
height: 32px;
|
||||
background-color: #5FB878;
|
||||
border: 1px solid #009688;
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
span.tmpzTreeMove_arrow {
|
||||
margin: 7px 0 0 1em;
|
||||
}
|
||||
|
||||
#editormd {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#leftbar .copyright {
|
||||
color: #333;
|
||||
border-top: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
#leftbar .layui-tab {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#content_body>h1:first-child {
|
||||
color: #393D49;
|
||||
text-align: center;
|
||||
font-size: 2rem;
|
||||
padding-top: 12px;
|
||||
}
|
||||
|
||||
#searchForm {
|
||||
padding: 0 10px 10px 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.searchResultNone {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
width: 260px;
|
||||
text-align: center;
|
||||
color: #c2c2c2;
|
||||
}
|
||||
|
||||
.searchResultNone .layui-icon {
|
||||
font-size: 48px;
|
||||
}
|
||||
|
||||
.searchResultNone p {
|
||||
margin-top: 4px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
/* markdown正文 */
|
||||
|
||||
.markdown-body {
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
color: #333;
|
||||
overflow: hidden;
|
||||
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "华文细黑", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "宋体", Heiti, "黑体", sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.6;
|
||||
word-wrap: break-word;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.markdown-body * {
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.markdown-body a {
|
||||
background: transparent;
|
||||
color: #01AAED;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.markdown-body h1>a,
|
||||
.markdown-body h2>a,
|
||||
.markdown-body h3>a,
|
||||
.markdown-body h4>a,
|
||||
.markdown-body h5>a,
|
||||
.markdown-body h6>a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.markdown-body a:active,
|
||||
.markdown-body a:hover {
|
||||
outline: 0;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.markdown-body strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.markdown-body img {
|
||||
border: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.markdown-body hr {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.markdown-body code,
|
||||
.markdown-body kbd {
|
||||
font-family: inherit;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.markdown-body input {
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.markdown-body html input[disabled] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.markdown-body input {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.markdown-body input[type="checkbox"] {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.markdown-body input {
|
||||
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
}
|
||||
|
||||
.markdown-body hr {
|
||||
height: 0;
|
||||
margin: 15px 0;
|
||||
overflow: hidden;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.markdown-body hr:before {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.markdown-body hr:after {
|
||||
display: table;
|
||||
clear: both;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.markdown-body h1,
|
||||
.markdown-body h2,
|
||||
.markdown-body h3,
|
||||
.markdown-body h4,
|
||||
.markdown-body h5,
|
||||
.markdown-body h6 {
|
||||
position: relative;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.markdown-body h1 {
|
||||
font-size: 2.25em;
|
||||
border-bottom: 1px solid #eee;
|
||||
text-align: center;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.markdown-body h2 {
|
||||
padding-bottom: 0.3em;
|
||||
font-size: 1.75em;
|
||||
line-height: 1.225;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.markdown-body h3 {
|
||||
font-size: 1.5em;
|
||||
line-height: 1.43;
|
||||
}
|
||||
|
||||
.markdown-body h4 {
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
.markdown-body h5 {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.markdown-body h6 {
|
||||
font-size: 1em;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.markdown-body ul,
|
||||
.markdown-body ol {
|
||||
padding: 0;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
.markdown-body ol ol,
|
||||
.markdown-body ul ol {
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
|
||||
.markdown-body ul ul ol,
|
||||
.markdown-body ul ol ol,
|
||||
.markdown-body ol ul ol,
|
||||
.markdown-body ol ol ol {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
|
||||
.markdown-body dd {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.markdown-body .octicon {
|
||||
font: normal normal 16px octicons-anchor;
|
||||
line-height: 1;
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.markdown-body .octicon-link:before {
|
||||
content: '\f05c';
|
||||
}
|
||||
|
||||
.markdown-body>*:first-child {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.markdown-body>*:last-child {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.markdown-body .anchor {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: block;
|
||||
padding-right: 6px;
|
||||
padding-left: 30px;
|
||||
margin-left: -30px;
|
||||
}
|
||||
|
||||
.markdown-body .anchor:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.markdown-body h1 .octicon-link,
|
||||
.markdown-body h2 .octicon-link,
|
||||
.markdown-body h3 .octicon-link,
|
||||
.markdown-body h4 .octicon-link,
|
||||
.markdown-body h5 .octicon-link,
|
||||
.markdown-body h6 .octicon-link {
|
||||
display: none;
|
||||
color: #000;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.markdown-body h1:hover .anchor,
|
||||
.markdown-body h2:hover .anchor,
|
||||
.markdown-body h3:hover .anchor,
|
||||
.markdown-body h4:hover .anchor,
|
||||
.markdown-body h5:hover .anchor,
|
||||
.markdown-body h6:hover .anchor {
|
||||
padding-left: 8px;
|
||||
margin-left: -30px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.markdown-body h1:hover .anchor .octicon-link,
|
||||
.markdown-body h2:hover .anchor .octicon-link,
|
||||
.markdown-body h3:hover .anchor .octicon-link,
|
||||
.markdown-body h4:hover .anchor .octicon-link,
|
||||
.markdown-body h5:hover .anchor .octicon-link,
|
||||
.markdown-body h6:hover .anchor .octicon-link {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.markdown-body h1 .anchor {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.markdown-body h2 .anchor {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.markdown-body h3 .anchor {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
|
||||
.markdown-body h4 .anchor {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.markdown-body h5 .anchor {
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.markdown-body h6 .anchor {
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.markdown-body p,
|
||||
.markdown-body ul,
|
||||
.markdown-body ol,
|
||||
.markdown-body dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.markdown-body ul ul,
|
||||
.markdown-body ul ol,
|
||||
.markdown-body ol ol,
|
||||
.markdown-body ol ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.markdown-body li>p {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.markdown-body dl {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.markdown-body dl dt {
|
||||
padding: 0;
|
||||
margin-top: 16px;
|
||||
font-size: 1em;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.markdown-body dl dd {
|
||||
padding: 0 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.markdown-body code {
|
||||
padding: 0.2em;
|
||||
margin: 0;
|
||||
border-radius: 3px;
|
||||
color: #FF5722;
|
||||
}
|
||||
|
||||
.markdown-body code:before,
|
||||
.markdown-body code:after {
|
||||
letter-spacing: -0.2em;
|
||||
content: "\00a0";
|
||||
}
|
||||
|
||||
.syntaxhighlighter code:before,
|
||||
.syntaxhighlighter code:after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
.markdown-body .highlight {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.markdown-body 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;
|
||||
}
|
||||
|
||||
.markdown-body .pl-c {
|
||||
color: #969896;
|
||||
}
|
||||
|
||||
.markdown-body .pl-c1,
|
||||
.markdown-body .pl-mdh,
|
||||
.markdown-body .pl-mm,
|
||||
.markdown-body .pl-mp,
|
||||
.markdown-body .pl-mr,
|
||||
.markdown-body .pl-s1 .pl-v,
|
||||
.markdown-body .pl-s3,
|
||||
.markdown-body .pl-sc,
|
||||
.markdown-body .pl-sv {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.markdown-body .pl-e,
|
||||
.markdown-body .pl-en {
|
||||
color: #795da3;
|
||||
}
|
||||
|
||||
.markdown-body .pl-s1 .pl-s2,
|
||||
.markdown-body .pl-smi,
|
||||
.markdown-body .pl-smp,
|
||||
.markdown-body .pl-stj,
|
||||
.markdown-body .pl-vo,
|
||||
.markdown-body .pl-vpf {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.markdown-body .pl-ent {
|
||||
color: #63a35c;
|
||||
}
|
||||
|
||||
.markdown-body .pl-k,
|
||||
.markdown-body .pl-s,
|
||||
.markdown-body .pl-st {
|
||||
color: #a71d5d;
|
||||
}
|
||||
|
||||
.markdown-body .pl-pds,
|
||||
.markdown-body .pl-s1,
|
||||
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
||||
.markdown-body .pl-sr,
|
||||
.markdown-body .pl-sr .pl-cce,
|
||||
.markdown-body .pl-sr .pl-sra,
|
||||
.markdown-body .pl-sr .pl-sre,
|
||||
.markdown-body .pl-src {
|
||||
color: #df5000;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mo,
|
||||
.markdown-body .pl-v {
|
||||
color: #1d3e81;
|
||||
}
|
||||
|
||||
.markdown-body .pl-id {
|
||||
color: #b52a1d;
|
||||
}
|
||||
|
||||
.markdown-body .pl-ii {
|
||||
background-color: #b52a1d;
|
||||
color: #f8f8f8;
|
||||
}
|
||||
|
||||
.markdown-body .pl-sr .pl-cce {
|
||||
color: #63a35c;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.markdown-body .pl-ml {
|
||||
color: #693a17;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mh,
|
||||
.markdown-body .pl-mh .pl-en,
|
||||
.markdown-body .pl-ms {
|
||||
color: #1d3e81;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mq {
|
||||
color: #008080;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mi {
|
||||
color: #333;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mb {
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.markdown-body .pl-md,
|
||||
.markdown-body .pl-mdhf {
|
||||
background-color: #ffecec;
|
||||
color: #bd2c00;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mdht,
|
||||
.markdown-body .pl-mi1 {
|
||||
background-color: #eaffea;
|
||||
color: #55a532;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mdr {
|
||||
color: #795da3;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.markdown-body .task-list-item {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.markdown-body .task-list-item+.task-list-item {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.markdown-body .task-list-item input {
|
||||
float: left;
|
||||
margin: 0.3em 0 0.25em -1.6em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.markdown-body :checked+.radio-label {
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
border-color: #4183c4;
|
||||
}
|
||||
|
||||
.markdown-body .editormd-toc-menu ul {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.markdown-body th {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.syntaxhighlighter a,
|
||||
.syntaxhighlighter div,
|
||||
.syntaxhighlighter code,
|
||||
.syntaxhighlighter,
|
||||
.syntaxhighlighter td,
|
||||
.syntaxhighlighter tr,
|
||||
.syntaxhighlighter tbody,
|
||||
.syntaxhighlighter thead,
|
||||
.syntaxhighlighter caption,
|
||||
.syntaxhighlighter textarea {
|
||||
font-family: Menlo, Monaco, Menlo, Consolas, source-code-pro, "Liberation Mono", "Ubuntu Mono", Courier, "Helvetica Neue", "Microsoft Yahei", 微软雅黑, "Lantinghei SC", STXihei, WenQuanYi, sans-serif;
|
||||
font-size: 14px !important;
|
||||
line-height: 1.625em !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter {
|
||||
margin: 1.625em 0 !important;
|
||||
background-color: #fafafa !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter textarea {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.layui-elem-quote {
|
||||
border-color: #5FB878;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
.layui-elem-quote>p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style: inherit;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .gutter {
|
||||
color: #237893 !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .plain,
|
||||
.syntaxhighlighter .plain a {
|
||||
word-break: break-all;
|
||||
color: #333 !important
|
||||
}
|
||||
|
||||
.syntaxhighlighter .comments,
|
||||
.syntaxhighlighter .comments a {
|
||||
color: gray !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .string,
|
||||
.syntaxhighlighter .string a {
|
||||
color: #10893E !important
|
||||
}
|
||||
|
||||
.syntaxhighlighter .keyword {
|
||||
color: #ff7800 !important
|
||||
}
|
||||
|
||||
.syntaxhighlighter .variable {
|
||||
color: #1E9FFF !important
|
||||
}
|
||||
|
||||
.syntaxhighlighter .functions {
|
||||
color: #FF5722 !important
|
||||
}
|
||||
|
||||
.syntaxhighlighter .constants {
|
||||
color: #5200FF !important
|
||||
}
|
||||
|
||||
#article-content {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#article-content li {
|
||||
list-style: inherit;
|
||||
}
|
||||
|
||||
#content-toc-wrap {
|
||||
width: 16em;
|
||||
position: fixed;
|
||||
right: 2em;
|
||||
z-index: 99;
|
||||
border: 1px solid #dbdbdb;
|
||||
background-color: rgba(255, 255, 255, 0.618);
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
|
||||
#content-toc {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#content-toc ol {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#content-toc>ol {
|
||||
padding: 0.6em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#content-toc li {
|
||||
line-height: 28px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
width: 100%;
|
||||
float: left;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#content-toc a {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#content-toc a:hover {
|
||||
color: #5FB878;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.content-toc-title {
|
||||
margin-bottom: 0 !important;
|
||||
border-bottom: 1px solid #dbdbdb;
|
||||
padding: 0.5em;
|
||||
font-weight: bold;
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
#content-toc-wrap {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.syntaxhighlighter a,.syntaxhighlighter div,.syntaxhighlighter code,.syntaxhighlighter,.syntaxhighlighter td,.syntaxhighlighter tr,.syntaxhighlighter tbody,.syntaxhighlighter thead,.syntaxhighlighter caption,.syntaxhighlighter textarea{-moz-border-radius:0 0 0 0!important;-webkit-border-radius:0 0 0 0!important;background:none!important;border:0!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;margin:0!important;outline:0!important;overflow:visible!important;padding:0!important;position:static!important;right:auto!important;text-align:left!important;top:auto!important;vertical-align:baseline!important;width:auto!important;box-sizing:content-box!important;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-weight:normal!important;font-style:normal!important;min-height:inherit!important;min-height:auto!important;font-size:13px!important}.syntaxhighlighter{width:100%!important;margin:.3em 0 .3em 0!important;position:relative!important;overflow:auto!important;background-color:#f5f5f5!important;border:1px solid #ccc!important;border-radius:4px!important;border-collapse:separate!important}.syntaxhighlighter.source{overflow:hidden!important}.syntaxhighlighter .bold{font-weight:bold!important}.syntaxhighlighter .italic{font-style:italic!important}.syntaxhighlighter .gutter div{white-space:pre!important;word-wrap:normal}.syntaxhighlighter caption{text-align:left!important;padding:.5em 0 .5em 1em!important}.syntaxhighlighter td.code{width:100%!important}.syntaxhighlighter td.code .container{position:relative!important}.syntaxhighlighter td.code .container textarea{box-sizing:border-box!important;position:absolute!important;left:0!important;top:0!important;width:100%!important;border:none!important;background:white!important;padding-left:1em!important;overflow:hidden!important;white-space:pre!important}.syntaxhighlighter td.gutter .line{text-align:right!important;padding:0 .5em 0 1em!important}.syntaxhighlighter td.code .line{padding:0 1em!important}.syntaxhighlighter.nogutter td.code .container textarea,.syntaxhighlighter.nogutter td.code .line{padding-left:0!important}.syntaxhighlighter.show{display:block!important}.syntaxhighlighter.collapsed table{display:none!important}.syntaxhighlighter.collapsed .toolbar{padding:.1em .8em 0 .8em!important;font-size:1em!important;position:static!important;width:auto!important}.syntaxhighlighter.collapsed .toolbar span{display:inline!important;margin-right:1em!important}.syntaxhighlighter.collapsed .toolbar span a{padding:0!important;display:none!important}.syntaxhighlighter.collapsed .toolbar span a.expandSource{display:inline!important}.syntaxhighlighter .toolbar{position:absolute!important;right:1px!important;top:1px!important;width:11px!important;height:11px!important;font-size:10px!important;z-index:10!important}.syntaxhighlighter .toolbar span.title{display:inline!important}.syntaxhighlighter .toolbar a{display:block!important;text-align:center!important;text-decoration:none!important;padding-top:1px!important}.syntaxhighlighter .toolbar a.expandSource{display:none!important}.syntaxhighlighter.ie{font-size:.9em!important;padding:1px 0 1px 0!important}.syntaxhighlighter.ie .toolbar{line-height:8px!important}.syntaxhighlighter.ie .toolbar a{padding-top:0!important}.syntaxhighlighter.printing .line.alt1 .content,.syntaxhighlighter.printing .line.alt2 .content,.syntaxhighlighter.printing .line.highlighted .number,.syntaxhighlighter.printing .line.highlighted.alt1 .content,.syntaxhighlighter.printing .line.highlighted.alt2 .content{background:none!important}.syntaxhighlighter.printing .line .number{color:#bbb!important}.syntaxhighlighter.printing .line .content{color:black!important}.syntaxhighlighter.printing .toolbar{display:none!important}.syntaxhighlighter.printing a{text-decoration:none!important}.syntaxhighlighter.printing .plain,.syntaxhighlighter.printing .plain a{color:black!important}.syntaxhighlighter.printing .comments,.syntaxhighlighter.printing .comments a{color:#008200!important}.syntaxhighlighter.printing .string,.syntaxhighlighter.printing .string a{color:blue!important}.syntaxhighlighter.printing .keyword{color:#ff7800!important;font-weight:bold!important}.syntaxhighlighter.printing .preprocessor{color:gray!important}.syntaxhighlighter.printing .variable{color:#a70!important}.syntaxhighlighter.printing .value{color:#090!important}.syntaxhighlighter.printing .functions{color:#ff1493!important}.syntaxhighlighter.printing .constants{color:#06c!important}.syntaxhighlighter.printing .script{font-weight:bold!important}.syntaxhighlighter.printing .color1,.syntaxhighlighter.printing .color1 a{color:gray!important}.syntaxhighlighter.printing .color2,.syntaxhighlighter.printing .color2 a{color:#ff1493!important}.syntaxhighlighter.printing .color3,.syntaxhighlighter.printing .color3 a{color:red!important}.syntaxhighlighter.printing .break,.syntaxhighlighter.printing .break a{color:black!important}.syntaxhighlLine truncated
|
||||
@@ -0,0 +1,348 @@
|
||||
/* 设置滚动条的样式 */
|
||||
::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
/* 滚动槽 */
|
||||
::-webkit-scrollbar-track {
|
||||
-webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.3);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/* 滚动条滑块 */
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 8px;
|
||||
background: #5FB878;
|
||||
-webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:window-inactive {
|
||||
background: #5FB878;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pull-left {
|
||||
float: left !important;
|
||||
}
|
||||
|
||||
.pull-right {
|
||||
float: right !important;
|
||||
}
|
||||
|
||||
#mask {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
background-color: rgba(0, 0, 0, 0.382);
|
||||
display: none;
|
||||
}
|
||||
|
||||
#navbar {
|
||||
background-color: #393D49;
|
||||
background: -webkit-gradient(left top, right top, color-stop(0%, #70e1f5), color-stop(100%, #FFD194));
|
||||
background: -webkit-linear-gradient(left, #70e1f5 0%, #FFD194 100%);
|
||||
background: -o-linear-gradient(left, #70e1f5 0%, #FFD194 100%);
|
||||
background: -ms-linear-gradient(left, #70e1f5 0%, #FFD194 100%);
|
||||
background: -webkit-gradient(linear, left top, right top, from(#70e1f5), to(#FFD194));
|
||||
background: linear-gradient(200deg, #70e1f5, #ffd194);
|
||||
height: 48px;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
#navbar .bg-blur {
|
||||
background-color: rgba(255, 255, 255, 0.618);
|
||||
backdrop-filter: blur(4px);
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.10);
|
||||
line-height: 48px;
|
||||
height: 48px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#navbar .navbar-body {
|
||||
top: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
padding: 0 1em;
|
||||
}
|
||||
|
||||
#navbar .navbar-body>.layui-nav .layui-nav-more {
|
||||
border-top-color: #333;
|
||||
}
|
||||
|
||||
#navbar .navbar-body>.layui-nav .layui-nav-mored {
|
||||
border-top-color: transparent;
|
||||
border-bottom-color: #333;
|
||||
}
|
||||
|
||||
#navbar .layui-nav {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.layui-nav .layui-nav-item {
|
||||
line-height: 48px;
|
||||
}
|
||||
|
||||
#navbar .logo {
|
||||
float: left;
|
||||
font-size: 1.5rem;
|
||||
color: #333;
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
#navbar .logo>img {
|
||||
height: 42px;
|
||||
}
|
||||
|
||||
.layui-nav .layui-nav-item a,
|
||||
.layui-nav .layui-nav-item a:hover,
|
||||
.layui-nav .layui-this a {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#leftbar {
|
||||
width: 300px;
|
||||
top: 48px;
|
||||
border-radius: 0;
|
||||
transition: left 0.5s ease;
|
||||
-webkit-transition: left 0.5s ease;
|
||||
-moz-transition: left 0.5s ease;
|
||||
-ms-transition: left 0.5s ease;
|
||||
-o-transition: left 0.5s ease;
|
||||
overflow-x: visible;
|
||||
border-right: 1px solid #eee;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
#leftbar .layui-tab-content {
|
||||
padding: 12px 2px 0 0;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#leftbar .copyright {
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 24px;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
#leftbar .copyright.noScroll {
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#leftbar>li>a>i.layui-icon {
|
||||
font-size: 1.625rem;
|
||||
vertical-align: top;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#leftbar>li>dl>dd>a>i.layui-icon {
|
||||
font-size: 1.125rem;
|
||||
vertical-align: top;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#leftbar>li>dl>dd>a {
|
||||
padding-left: 30px;
|
||||
}
|
||||
|
||||
.left-show-hide {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 100%;
|
||||
transform: translateY(-100%);
|
||||
padding: 0;
|
||||
height: 64px;
|
||||
width: 18px;
|
||||
background-color: #393D49;
|
||||
color: #F0F0F0;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
opacity: 1;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.left-show-hide:hover {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.left-show-hide>.layui-icon {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#body {
|
||||
padding-left: 300px;
|
||||
width: 100%;
|
||||
padding-top: 48px;
|
||||
position: absolute;
|
||||
transition: left 0.5s ease;
|
||||
-webkit-transition: left 0.5s ease;
|
||||
-moz-transition: left 0.5s ease;
|
||||
-ms-transition: left 0.5s ease;
|
||||
-o-transition: left 0.5s ease;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.navRight {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#navMenuLeft,
|
||||
#navMenuRight {
|
||||
display: none;
|
||||
color: #333;
|
||||
line-height: 48px;
|
||||
}
|
||||
|
||||
#navMenuLeft {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#navMenuRight {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#navMenuLeft.active>i,
|
||||
#navMenuRight.active>i {
|
||||
color: #5FB878
|
||||
}
|
||||
|
||||
#navMenuLeft>i,
|
||||
#navMenuRight>i {
|
||||
font-size: 1.625rem;
|
||||
}
|
||||
|
||||
.inputBox {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.inputBox .input-icon {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
right: 6px;
|
||||
color: #c2c2c2;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.inputBox .layui-input:focus+.input-icon {
|
||||
color: #000
|
||||
}
|
||||
|
||||
#treeSearch>li {
|
||||
padding: 0 4px 10px 6px;
|
||||
border-bottom: 1px solid #e6e6e6;
|
||||
line-height: 24px;
|
||||
word-break: break-word;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#treeSearch h3 {
|
||||
font-weight: bold;
|
||||
line-height: 48px;
|
||||
}
|
||||
|
||||
#treeSearch strong {
|
||||
color: #FF5722;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
#mask {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#leftbar {
|
||||
left: -300px !important;
|
||||
}
|
||||
|
||||
#leftbar.show-item {
|
||||
left: 0 !important;
|
||||
}
|
||||
|
||||
#navbar {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#navbar .logo {
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#navbar .layui-nav {
|
||||
top: -180px;
|
||||
/* 要根据导航栏项目数量调整 */
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
transition: top 0.5s ease;
|
||||
-webkit-transition: top 0.5s ease;
|
||||
-moz-transition: top 0.5s ease;
|
||||
-ms-transition: top 0.5s ease;
|
||||
-o-transition: top 0.5s ease;
|
||||
z-index: 999;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
#navbar .navbar-body {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#navbar .bg-blur {
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
#navMenuLeft,
|
||||
#navMenuRight {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#body {
|
||||
padding-left: 0
|
||||
}
|
||||
|
||||
#navbar .navbar-body>.layui-nav.show-item {
|
||||
top: 48px;
|
||||
}
|
||||
|
||||
#navbar .navbar-body>.layui-nav>.navRight {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#navbar .navbar-body>.layui-nav>.navRight .layui-nav-item {
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.nav-menu {
|
||||
z-index: 1000;
|
||||
background: inherit;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 0 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.left-show-hide {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 216 B |
Binary file not shown.
|
After Width: | Height: | Size: 421 B |
@@ -0,0 +1,277 @@
|
||||
var curMenu = null, menuTree = null;
|
||||
var ajaxSetting = {
|
||||
edit: {
|
||||
drag: {
|
||||
autoExpandTrigger: true,
|
||||
prev: true,
|
||||
inner: true,
|
||||
next: true
|
||||
},
|
||||
enable: true,
|
||||
showRemoveBtn: false,
|
||||
showRenameBtn: false
|
||||
},
|
||||
view: {
|
||||
showLine: false,
|
||||
showIcon: false,
|
||||
selectedMulti: false,
|
||||
dblClickExpand: false,
|
||||
addDiyDom: addDiyDom
|
||||
},
|
||||
data: {
|
||||
key: {
|
||||
name: 'title',
|
||||
children: null,
|
||||
},
|
||||
simpleData: {
|
||||
enable: true,
|
||||
idKey: "id",
|
||||
pIdKey: 'parent_id',
|
||||
rootPId: 0,
|
||||
}
|
||||
},
|
||||
callback: {
|
||||
onClick: onClick,
|
||||
},
|
||||
};
|
||||
var loadingHandler;
|
||||
function switchNode(event, treeId, treeNode) {
|
||||
if ('pushState' in history) {
|
||||
history.pushState('', '', treeNode.url);
|
||||
getChapter(treeNode.url);
|
||||
}
|
||||
else {
|
||||
location = treeNode.url;
|
||||
}
|
||||
menuTree.expandNode(treeNode, true)
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
function getChapter(url) {
|
||||
if (void 0 === url) {
|
||||
return;
|
||||
}
|
||||
loadingHandler = layer.open({
|
||||
type: 3,
|
||||
icon: 2,
|
||||
shade: 0.1,
|
||||
});
|
||||
$.ajax({
|
||||
method: 'GET',
|
||||
url: url,
|
||||
success: function (result) {
|
||||
try {
|
||||
var resultElement = $(result);
|
||||
$('#article-content').html(resultElement.find('#article-content').html());
|
||||
onContentChange();
|
||||
var hash = location.hash;
|
||||
if (hash.length > 0) {
|
||||
location.hash = '';
|
||||
location.hash = hash;
|
||||
}
|
||||
else {
|
||||
// 有时切换文档不在最上面
|
||||
$('#content_body').scrollTop(0)
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
layer.alert('文档加载失败', { icon: 2 });
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
location = url;
|
||||
},
|
||||
complete: function () {
|
||||
layer.close(loadingHandler);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function addDiyDom(treeId, treeNode) {
|
||||
var spaceWidth = 5;
|
||||
var switchObj = $("#" + treeNode.tId + "_switch"),
|
||||
icoObj = $("#" + treeNode.tId + "_ico");
|
||||
switchObj.remove();
|
||||
icoObj.before(switchObj);
|
||||
|
||||
if (treeNode.level > 1) {
|
||||
var spaceStr = "<span style='display: inline-block;width:" + (spaceWidth * treeNode.level) + "px'></span>";
|
||||
switchObj.before(spaceStr);
|
||||
}
|
||||
}
|
||||
|
||||
function initTree(data) {
|
||||
for (var i in data) {
|
||||
data[i].target = '_self';
|
||||
}
|
||||
if (null === menuTree) {
|
||||
var treeObj = $("#treeDirectory");
|
||||
$.fn.zTree.init(treeObj, ajaxSetting, data);
|
||||
menuTree = $.fn.zTree.getZTreeObj("treeDirectory");
|
||||
var nodes = menuTree.getNodesByParam('url', location.pathname + location.hash, null);
|
||||
if (nodes.length > 0) {
|
||||
if (nodes.length > 1) {
|
||||
if (menuTree.getSelectedNodes().length > 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
menuTree.selectNode(nodes[0]);
|
||||
}
|
||||
else {
|
||||
menuTree.selectNode(menuTree.getNodeByParam('id', currentCatalog.id, null));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onClick(event, treeId, treeNode) {
|
||||
// 未修改内容,直接切换
|
||||
switchNode(event, treeId, treeNode);
|
||||
setTimeout(function () {
|
||||
closeMenuLeft();
|
||||
}, 600);
|
||||
}
|
||||
|
||||
function parseLeftHeight() {
|
||||
$('#leftbar .layui-tab-content').css('max-height', ($('#leftbar').height() - $('#leftbar .layui-tab-title').height() - $('#leftbar .copyright').height()) + 'px');
|
||||
}
|
||||
|
||||
function onContentChange() {
|
||||
$('#content-toc').css('max-height', ($(document).height() / 2) + 'px');
|
||||
hCatalog('#article-content', '#content-toc');
|
||||
var content = $('#article-content');
|
||||
content.find('blockquote').addClass('layui-elem-quote');
|
||||
content.find('table').addClass('layui-table');
|
||||
content.find('pre code').each(function (index, item) {
|
||||
var pre = $(item).parent();
|
||||
var content = $(item).text();
|
||||
var brush = parseCodeBrush($(item).attr('class'));
|
||||
var newPre = $('<pre></pre>').addClass('brush: ' + brush).addClass('toolbar: false').text(content);
|
||||
pre.replaceWith(newPre);
|
||||
});
|
||||
SyntaxHighlighter.highlight();
|
||||
//initSearchDatas();
|
||||
$('#content_body a').each(function () {
|
||||
var url = $(this).attr('href');
|
||||
if (void 0 !== url && '#' !== url.substr(0, 1) && 'http' === url.substr(0, 4)) {
|
||||
$(this).attr('target', '_blank');
|
||||
}
|
||||
})
|
||||
setTimeout(function () {
|
||||
resizeCode();
|
||||
}, 1)
|
||||
}
|
||||
|
||||
function parseCodeBrush(brush) {
|
||||
for (var i in SyntaxHighlighter.brushes) {
|
||||
if (SyntaxHighlighter.brushes[i].aliases.indexOf(brush) > -1) {
|
||||
return brush;
|
||||
}
|
||||
}
|
||||
return 'text';
|
||||
}
|
||||
|
||||
function resizeCode() {
|
||||
var guttelines = $('.gutter .line');
|
||||
var codelines = $('.code .line');
|
||||
for (var i = 0; i < guttelines.length; i++) {
|
||||
var codeline = codelines.eq(i);
|
||||
var height = codeline.css('height');
|
||||
guttelines.eq(i).css('height', height)
|
||||
codeline.css('height', height);
|
||||
}
|
||||
}
|
||||
|
||||
// 基于这里的代码做了修改: https://blog.csdn.net/weixin_57215431/article/details/115676752
|
||||
function hCatalog(current, target) {
|
||||
var box = document.querySelector(target)
|
||||
if (!box) {
|
||||
return;
|
||||
}
|
||||
box.innerHTML = ''
|
||||
var titleTree = hTree(document.querySelector(current))
|
||||
hCreatEle(titleTree, box)
|
||||
}
|
||||
|
||||
function hCreatEle(arr, parent) {
|
||||
if (!arr.length) return
|
||||
var ol = document.createElement('ol')
|
||||
arr.forEach(function (item) {
|
||||
if ('' !== item.node.innerHTML) {
|
||||
var li = document.createElement('li')
|
||||
li.innerHTML = item.node.innerHTML
|
||||
hCreatEle(item.children, li)
|
||||
ol.appendChild(li)
|
||||
}
|
||||
})
|
||||
parent.appendChild(ol)
|
||||
}
|
||||
|
||||
function hTree(wrapNode) {
|
||||
var root = { children: [] }
|
||||
var current = root
|
||||
|
||||
for (var i = 0; i < wrapNode.children.length; ++i) {
|
||||
var item = wrapNode.children[i]
|
||||
if (item.localName.indexOf('h') === 0) {
|
||||
var obj = { node: item, children: [], parent: undefined }
|
||||
while (current !== root && current.node.localName[1] - obj.node.localName[1] !== -1) {
|
||||
current = current.parent
|
||||
}
|
||||
obj.parent = current
|
||||
obj.parent.children.push(obj)
|
||||
current = obj
|
||||
}
|
||||
}
|
||||
return root.children
|
||||
}
|
||||
|
||||
function initContentToc() {
|
||||
var isDown = false;
|
||||
var beginLeft = 0
|
||||
var beginTop = 0;
|
||||
var mouseBeginLeft = 0
|
||||
var mouseBeginTop = 0;
|
||||
|
||||
$(document).on('mousedown', '.content-toc-title', function (e) {
|
||||
var wrap = $('#content-toc-wrap');
|
||||
isDown = true;
|
||||
beginLeft = wrap[0].offsetLeft;
|
||||
beginTop = wrap[0].offsetTop;
|
||||
mouseBeginLeft = e.pageX;
|
||||
mouseBeginTop = e.pageY;
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$(document).on('mouseup', function () {
|
||||
isDown = false;
|
||||
});
|
||||
|
||||
$(document).on('mousemove', function (e) {
|
||||
if (isDown) {
|
||||
var wrap = $('#content-toc-wrap');
|
||||
wrap.css('left', (beginLeft + (e.pageX - mouseBeginLeft)) + 'px');
|
||||
wrap.css('top', (beginTop + (e.pageY - mouseBeginTop)) + 'px');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function () {
|
||||
parseLeftHeight();
|
||||
|
||||
$(window).resize(function () {
|
||||
parseLeftHeight();
|
||||
});
|
||||
|
||||
$('body').on('click', '.ztree.showIcon li a span.button.switch', function (e) {
|
||||
return false;
|
||||
});
|
||||
|
||||
initContentToc();
|
||||
|
||||
SyntaxHighlighter.all();
|
||||
onContentChange();
|
||||
})
|
||||
|
||||
$(window).load(function () {
|
||||
$(window).resize(resizeCode);
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
$.ajaxSetup({
|
||||
xhrFields: {
|
||||
withCredentials: true
|
||||
},
|
||||
});
|
||||
$(function(){
|
||||
layui.element.init();
|
||||
layui.table.init();
|
||||
layui.form.render();
|
||||
});
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
var XRegExp,SyntaxHighlighter;if(XRegExp)throw Error("can't load XRegExp twice in the same frame");!function(l){(XRegExp=function(e,t){var r,i,n,s=[],a=XRegExp.OUTSIDE_CLASS,o=0;if(XRegExp.isRegExp(e)){if(t!==l)throw TypeError("can't supply flags when constructing one RegExp from another");return m(e)}if(g)throw Error("can't call the XRegExp constructor within token definition functions");for(t=t||"",r={hasNamedCapture:!1,captureNames:[],hasFlag:function(e){return-1<t.indexOf(e)},setFlag:function(e){t+=e}};o<e.length;)(i=function(e,t,r,i){var n,s,a,o=d.length;g=!0;try{for(;o--;)if(a=d[o],r&a.scope&&(!a.trigger||a.trigger.call(i))&&(a.pattern.lastIndex=t,s=a.pattern.exec(e))&&s.index===t){n={output:a.handler.call(i,s,r),match:s};break}}catch(e){throw e}finally{g=!1}return n}(e,o,a,r))?(s.push(i.output),o+=i.match[0].length||1):(i=h.exec.call(p[a],e.slice(o)))?(s.push(i[0]),o+=i[0].length):("["===(i=e.charAt(o))?a=XRegExp.INSIDE_CLASS:"]"===i&&(a=XRegExp.OUTSIDE_CLASS),s.push(i),o++);return(n=RegExp(s.join(""),h.replace.call(t,c,"")))._xregexp={source:e,captureNames:r.hasNamedCapture?r.captureNames:null},n}).version="1.5.1",XRegExp.INSIDE_CLASS=1,XRegExp.OUTSIDE_CLASS=2;var e,o=/\$(?:(\d\d?|[$&`'])|{([$\w]+)})/g,c=/[^gimy]+|([\s\S])(?=[\s\S]*\1)/g,t=/^(?:[?*+]|{\d+(?:,\d*)?})\??/,g=!1,d=[],h={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},a=h.exec.call(/()??/,"")[1]===l,u=(e=/^/g,h.test.call(e,""),!e.lastIndex),s=RegExp.prototype.sticky!==l,p={};function m(e,t){var r;if(XRegExp.isRegExp(e))return r=e._xregexp,e=XRegExp(e.source,f(e)+(t||"")),r&&(e._xregexp={source:r.source,captureNames:r.captureNames?r.captureNames.slice(0):null}),e;throw TypeError("type RegExp expected")}function f(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function x(e,t,r){if(Array.prototype.indexOf)return e.indexOf(t,r);for(var i=r||0;i<e.length;i++)if(e[i]===t)return i;return-1}p[XRegExp.INSIDE_CLASS]=/^(?:\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S]))/,p[XRegExp.OUTSIDE_CLASS]=/^(?:\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??)/,XRegExp.addToken=function(e,t,r,i){d.push({pattern:m(e,"g"+(s?"y":"")),handler:t,scope:r||XRegExp.OUTSIDE_CLASS,trigger:i||null})},XRegExp.cache=function(e,t){var r=e+"/"+(t||"");return XRegExp.cache[r]||(XRegExp.cache[r]=XRegExp(e,t))},XRegExp.copyAsGlobal=function(e){return m(e,"g")},XRegExp.escape=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},XRegExp.execAt=function(e,t,r,i){var n=m(t,"g"+(i&&s?"y":""));return n.lastIndex=r=r||0,e=n.exec(e),i&&e&&e.index!==r&&(e=null),t.global&&(t.lastIndex=e?n.lastIndex:0),e},XRegExp.freezeTokens=function(){XRegExp.addToken=function(){throw Error("can't run addToken after freezeTokens")}},XRegExp.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},XRegExp.iterate=function(e,t,r,i){for(var n,s=m(t,"g"),a=-1;n=s.exec(e);)t.global&&(t.lastIndex=s.lastIndex),r.call(i,n,++a,e,t),s.lastIndex===n.index&&s.lastIndex++;t.global&&(t.lastIndex=0)},XRegExp.matchChain=function(e,o){return function e(t,r){for(var i=o[r].regex?o[r]:{regex:o[r]},n=m(i.regex,"g"),s=[],a=0;a<t.length;a++)XRegExp.iterate(t[a],n,function(e){s.push(i.backref?e[i.backref]||"":e[0])});return r!==o.length-1&&s.length?e(s,r+1):s}([e],0)},RegExp.prototype.apply=function(e,t){return this.exec(t[0])},RegExp.prototype.call=function(e,t){return this.exec(t)},RegExp.prototype.exec=function(e){var t,r,i,n;if(this.global||(n=this.lastIndex),t=h.exec.apply(this,arguments)){if(!a&&1<t.length&&-1<x(t,"")&&(i=RegExp(this.source,h.replace.call(f(this),"g","")),h.replace.call((e+"").slice(t.index),i,function(){for(var e=1;e<arguments.length-2;e++)arguments[e]===l&&(t[e]=l)})),this._xregexp&&this._xregexp.captureNames)for(var s=1;s<t.length;s++)(r=this._xregexp.captureNames[s-1])&&(t[r]=t[s]);!u&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--}return this.global||(this.lastIndex=n),t},RegExp.prototype.test=function(e){var t;return this.global||(t=this.lastIndex),(e=h.exec.call(this,e))&&!u&&this.global&&!e[0].length&&this.lastIndex>e.index&&this.lastIndex--,this.global||(this.lastIndex=t),!!e},String.prototype.match=function(e){var t;return(e=XRegExp.isRegExp(e)?e:RegExp(e)).global?(t=h.match.apply(this,arguments),e.lastIndex=0,t):e.exec(this)},String.prototype.replace=function(t,r){var a,e,i,n=XRegExp.isRegExp(t);return n?(t._xregexp&&(a=t._xregexp.captureNames),t.global||(i=t.lastIndex)):t+="",e="[object Function]"===Object.prototype.toString.call(r)?h.replace.call(this+"",t,function(){if(a){arguments[0]=new String(arguments[0]);for(var e=0;e<a.length;e++)a[e]&&(arguments[0][a[e]]=arguments[e+1])}return n&&t.global&&(t.lastIndex=arguments[arguments.length-2]+arguments[0].length),rLine truncated
|
||||
Reference in new issue
Block a user