From 6185c8f34222a7af77c0806d733c5d738958d502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=BF=97=E5=90=8C?= Date: Fri, 1 Nov 2019 16:31:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=A8=E6=96=87=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E5=8A=9F=E8=83=BD=20(#953)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 添加全文搜索功能 * 对搜索参数进行 encodeURIComponent 编码 --- template/articles/index.html | 4 +-- template/css/site.min.css | 2 +- template/docs/index.html | 4 +-- template/faq/index.html | 4 +-- template/index.html | 4 +-- template/template.html | 63 ++++++++++++++++++++++++++++++++++-- 6 files changed, 70 insertions(+), 11 deletions(-) diff --git a/template/articles/index.html b/template/articles/index.html index 8b0e073cd2..3c13f37187 100644 --- a/template/articles/index.html +++ b/template/articles/index.html @@ -1,5 +1,5 @@ - - + + diff --git a/template/css/site.min.css b/template/css/site.min.css index de5cc4c533..d7f7266970 100644 --- a/template/css/site.min.css +++ b/template/css/site.min.css @@ -1 +1 @@ -html{font-size:87.5%;}body{width:100%;height:100%;margin:0;color:#333;background-color:#fff;font-family:Segoe UI,SegoeUI,Segoe WP,Helvetica Neue,Helvetica,Tahoma,Arial,sans-serif,PingFang SC,'Segoe UI',Tahoma,"Microsoft YaHei",arial,sans-serif;}a{text-decoration:none;background-color:transparent;color:#00af92;}a:hover{text-decoration:underline;color:#00493d;}.table-hover tbody tr:hover{color:#333;background-color:rgba(0,0,0,.075);}nav .logo,nav .logo-dark{width:5.7rem;}nav .logo-dark{display:none;}.navbar,footer>div{background-color:#f8f9fa;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.navbar-toggler,.navbar-toggler:focus,.navbar-toggler:active{outline:none;border-color:#dee2e6;}.navbar-toggler i,.navbar-toggler:focus i,.navbar-toggler:active i{color:rgba(0,0,0,.5);}.navbar-nav .nav-link{color:rgba(0,0,0,.5);padding-left:1em !important;padding-right:1em !important;}.navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3);}.navbar-nav .nav-link.active{color:rgba(0,0,0,.9);border-bottom:1px solid #00af92;}.catalog{border-right:1px solid rgba(0,0,0,.1);position:fixed;left:0;width:18%;height:calc(100vh - 4rem);top:4rem;overflow-x:hidden;overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}@media only screen and (max-width:992px){.catalog{width:25%;}}@media only screen and (max-width:768px){.catalog{width:100%;}}.catalog a,.catalog span{color:#333;}.catalog .nav-pills .nav-link{border-radius:0;width:100%;text-overflow:ellipsis;overflow:hidden;}.catalog span::before{content:attr(data-icon);display:inline-block;width:1rem;margin-left:-1rem;color:#808080;}.catalog i{margin-right:.3rem;margin-left:-.6rem;transition:transform .5s;}.catalog .expand i{transform:rotate(90deg);}.catalog a,.catalog span{cursor:pointer;padding:.2em 1em;}.catalog>nav{margin-bottom:3rem;}.catalog>nav nav{display:none;overflow:hidden;max-width:100%;}.catalog.show{display:block !important;position:static;height:auto;}main{position:relative;left:18%;width:64%;}@media only screen and (max-width:992px){main{left:25%;width:75%;}}@media only screen and (max-width:768px){main{left:0;width:100%;}}.highlight{margin-top:1rem;margin-bottom:1rem;-ms-overflow-style:-ms-autohiding-scrollbar;}.side-nav{position:fixed;height:calc(100vh - 4rem);top:4rem;width:18%;right:0;overflow-x:hidden;overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.side-nav>div{margin-bottom:3rem;}.side-nav .nav-pills .nav-link.active{border-radius:0;padding-left:.8rem;color:#333;background-color:#f0f0f0;border-left:.2rem solid #00af92;}.side-nav nav{width:100%;}.side-nav .contribution-link{margin-top:.85rem;margin-bottom:1rem;}.side-nav .side-nav-text{padding-bottom:1rem;margin-bottom:1rem;font-weight:bold;border-bottom:1px solid #f0f0f0;}.side-nav a:not(.contribution-link){display:block;padding-top:.15em;padding-bottom:.15em;color:#777;font-size:.9rem;border-radius:0;overflow-x:hidden;text-overflow:ellipsis;width:100%;white-space:nowrap;}.catalog a:hover,.catalog a.active,.catalog span:hover,.side-nav a:not(.contribution-link):hover{color:#00af92;background-color:#f0f0f0;}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#00af92;}footer{display:none;}footer>div{position:fixed;left:0;right:0;bottom:0;}footer ul{list-style:none;padding:0;margin:0;}footer ul>:nth-child(n+2):before{margin-right:.7rem;border-left:1px solid #dee2e6;}footer li{display:inline-block;}footer li:before{content:"";display:inline-block;height:.7rem;vertical-align:middle;}footer p{margin:0;}footer a{color:#00af92;text-decoration:none;}footer a:hover{color:#00493d;text-decoration:none;}main{letter-spacing:.03em;}.highlight{position:relative;padding:1rem;margin-top:1rem;margin-bottom:1rem;background-color:#f8f9fa;-ms-overflow-style:-ms-autohiding-scrollbar;}.highlight pre{padding:0;margin-top:0;margin-bottom:0;background-color:transparent;border:0;font-size:1rem;}@media(min-width:576px){.highlight{padding:1.5rem;}}h1{padding-bottom:.8rem;margin-bottom:1.2rem;border-bottom:1px solid #f0f0f0;}h2,h3,h4,h5,h6{margin:.7em 0 .2em;}table.table{border-bottom:1px solid #dee2e6;color:#333;}table.table thead th{background-color:rgba(0,0,0,.04);border-bottom:2px solid #dee2e6;border-top:1px solid #dee2e6;}table.table td{vertical-align:middle;border-top:1px solid #dee2e6;}p,li{line-height:2;}.div-collapse{display:none;border-radius:.25rem;margin-bottom:1em;background-color:#f8f9fa;}.div-collapse p:last-child{margin-bottom:0;}.bd-content-title{display:block;pointer-events:auto;}.h2-collapse{cursor:pointer;font-weight:normal;font-size:1rem;}.h2-collapse span:first-child::before{content:"Q:";margin-right:.5em;display:inline;font-size:1rem;color:#00af92;}h1,h2,h3,h4,h5,h6{line-height:2;pointer-events:none;}h1:before,h2:before,h3:before,h4:before,h5:before,h6:before{content:'';display:block;height:4rem;margin-top:-4rem;}.bd-callout{padding:1.25rem;margin-top:1.25rem;margin-bottom:1.25rem;border-left:.25rem solid #dee2e6;}.bd-callout h4 .anchorjs-link{display:none;}.bd-callout p:last-child{margin-bottom:0;}.bd-callout-info{border-left-color:#5bc0de;background-color:#f2f9fc;}.bd-callout-info .bd-content-title{display:inline-block;}.bd-callout-info h4{font-size:1.2rem;margin:0;color:#5bc0de;}.bd-callout-info h4 i{margin-right:.2em;}.bd-callout-warning{border-left-color:#f0ad4e;background-color:#fdfaec;}.bd-callout-warning .bd-content-title{display:inline-block;}.bd-callout-warning h4{font-size:1.2rem;margin:0;color:#f0ad4e;}.bd-callout-warning h4 i{margin-right:.2em;}.bd-callout-danger{border-left-color:#d9534f;background-color:#fbf4f4;}.bd-callout-danger .bd-content-title{display:inline-block;}.bd-callout-danger h4{font-size:1.2rem;margin:0;color:#d9534f;}.bd-callout-danger h4 i{margin-right:.2em;}.bd-callout dl,.bd-callout ol,.bd-callout ul{margin-bottom:0;}.btn-clipboard,.btn-clipboard:focus{position:absolute;top:.5rem;right:.5rem;z-index:10;display:block;padding:.25rem .5rem;font-size:75%;color:#818a91;background-color:transparent;border:0;outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.btn-clipboard:hover,.btn-clipboard:focus:hover{color:#fff;background-color:#00af92;}.lightbulb{position:fixed;right:0;bottom:3rem;padding:1rem;cursor:pointer;background-color:#f0f0f0;}.anchorjs-link{font-weight:400;color:rgba(0,175,146,.2);transition:color .15s ease-in-out,opacity .15s ease-in-out;opacity:0;-webkit-font-smoothing:antialiased;text-decoration:none;margin-left:.2em;}.anchorjs-link:hover{text-decoration:none;color:#00493d;}:hover>.anchorjs-link,.anchorjs-link:focus{opacity:1;}[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon);}.hljs{display:block;overflow-x:auto;padding:.5em;background:#f8f9fa;color:#000;}.hljs-comment,.hljs-quote,.hljs-variable{color:#008000;}.hljs-keyword,.hljs-selector-tag,.hljs-built_in,.hljs-name,.hljs-tag{color:#00f;}.hljs-string,.hljs-title,.hljs-section,.hljs-attribute,.hljs-literal,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-addition{color:#a31515;}.hljs-deletion,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-meta{color:#2b91af;}.hljs-doctag{color:#808080;}.hljs-attr{color:#f00;}.hljs-symbol,.hljs-bullet,.hljs-link{color:#00b0e8;}.hljs-emphasis{font-style:italic;}.hljs-strong{font-weight:bold;}.hljs-keyword,.hljs-attribute,.hljs-selector-tag,.hljs-meta-keyword,.hljs-doctag,.hljs-name{font-weight:normal;}.hljs-title,.hljs-section{font-weight:normal;}@media screen and (max-width:380px){@-ms-viewport{width:380px;}}.theme-dark body{color:#dcdcdc;background-color:#1e1e1e;}.theme-dark nav .logo{display:none;}.theme-dark nav .logo-dark{display:block;}.theme-dark .navbar,.theme-dark footer>div{background-color:#232323;}.theme-dark .navbar-toggler,.theme-dark .navbar-toggler:focus,.theme-dark .navbar-toggler:active{outline:none;border-color:#444;}.theme-dark .navbar-toggler i,.theme-dark .navbar-toggler:focus i,.theme-dark .navbar-toggler:active i{color:rgba(255,255,255,.5);}.theme-dark .navbar-nav .nav-link{color:rgba(255,255,255,.5);}.theme-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.3);}.theme-dark .navbar-nav .nav-link.active{color:rgba(255,255,255,.9);border-bottom:1px solid #00e599;}.theme-dark .catalog a,.theme-dark .catalog span{color:#dcdcdc;}.theme-dark .side-nav .nav-pills .nav-link.active{color:#dcdcdc;background-color:#333;border-left:.2rem solid #00e599;}.theme-dark .side-nav-text{border-bottom:1px solid #333;}.theme-dark .catalog a:hover,.theme-dark .catalog a.active,.theme-dark .catalog span:hover,.theme-dark .side-nav a:not(.contribution-link):hover{color:#00e599;background-color:#333;}.theme-dark footer ul>:nth-child(n+2):before{border-left:1px solid #444;}.theme-dark footer a{color:#00e599;}.theme-dark footer a:hover{color:#4cffc4;}.theme-dark .highlight{background-color:#232323;}.theme-dark h1{border-bottom:1px solid #333;}.theme-dark table.table{border-bottom:1px solid #444;color:#dcdcdc;}.theme-dark table.table thead th{background-color:rgba(255,255,255,.04);border-bottom:2px solid #444;}.theme-dark .table td,.theme-dark .table th{border-top:1px solid #444;}.theme-dark .div-collapse{background-color:#232323;}.theme-dark .h2-collapse span:first-child:hover{color:#00e599;}.theme-dark .bd-callout{border-left:1px solid #444;}.theme-dark .bd-callout-info{border-left-color:#5bc0de;background-color:#222728;}.theme-dark .bd-callout-info h4{color:#5bc0de;}.theme-dark .bd-callout-warning{border-left-color:#f0ad4e;background-color:#27261c;}.theme-dark .bd-callout-warning h4{color:#f0ad4e;}.theme-dark .bd-callout-danger{border-left-color:#d9534f;background-color:#292524;}.theme-dark .bd-callout-danger h4{color:#d9534f;}.theme-dark .btn-clipboard:hover{color:#fff;background-color:#00e599;}.theme-dark .lightbulb{background-color:#333;}.theme-dark .anchorjs-link{color:rgba(0,229,153,.2);}.theme-dark .anchorjs-link:hover{color:#4cffc4;}.theme-dark a{color:#00e599;}.theme-dark a:hover{color:#4cffc4;}.theme-dark .table-hover tbody tr:hover{color:#dcdcdc;background-color:rgba(255,255,255,.075);}.theme-dark .hljs{display:block;overflow-x:auto;padding:.5em;background:#232323;color:#dcdcdc;}.theme-dark .hljs-keyword,.theme-dark .hljs-literal,.theme-dark .hljs-symbol,.theme-dark .hljs-name{color:#569cd6;}.theme-dark .hljs-link{color:#569cd6;text-decoration:underline;}.theme-dark .hljs-built_in,.theme-dark .hljs-type{color:#4ec9b0;}.theme-dark .hljs-number,.theme-dark .hljs-class{color:#b8d7a3;}.theme-dark .hljs-string,.theme-dark .hljs-meta-string{color:#d69d85;}.theme-dark .hljs-regexp,.theme-dark .hljs-template-tag{color:#9a5334;}.theme-dark .hljs-subst,.theme-dark .hljs-function,.theme-dark .hljs-title,.theme-dark .hljs-params,.theme-dark .hljs-formula{color:#dcdcdc;}.theme-dark .hljs-comment,.theme-dark .hljs-quote{color:#57a64a;font-style:italic;}.theme-dark .hljs-doctag{color:#608b4e;}.theme-dark .hljs-meta,.theme-dark .hljs-meta-keyword,.theme-dark .hljs-tag{color:#9b9b9b;}.theme-dark .hljs-variable,.theme-dark .hljs-template-variable{color:#bd63c5;}.theme-dark .hljs-attr,.theme-dark .hljs-attribute,.theme-dark .hljs-builtin-name{color:#9cdcfe;}.theme-dark .hljs-section{color:#ffd700;}.theme-dark .hljs-emphasis{font-style:italic;}.theme-dark .hljs-bullet,.theme-dark .hljs-selector-tag,.theme-dark .hljs-selector-id,.theme-dark .hljs-selector-class,.theme-dark .hljs-selector-attr,.theme-dark .hljs-selector-pseudo{color:#d7ba7d;}.theme-dark .hljs-addition{background-color:#144212;display:inline-block;width:100%;}.theme-dark .hljs-deletion{background-color:#600;display:inline-block;width:100%;} \ No newline at end of file +html{font-size:87.5%;}body{width:100%;height:100%;margin:0;color:#333;background-color:#fff;font-family:Segoe UI,SegoeUI,Segoe WP,Helvetica Neue,Helvetica,Tahoma,Arial,sans-serif,PingFang SC,'Segoe UI',Tahoma,"Microsoft YaHei",arial,sans-serif;}a{text-decoration:none;background-color:transparent;color:#00af92;}a:hover{text-decoration:underline;color:#00493d;}.table-hover tbody tr:hover{color:#333;background-color:rgba(0,0,0,.075);}nav .logo,nav .logo-dark{width:5.7rem;}nav .logo-dark{display:none;}.navbar,footer>div{background-color:#f8f9fa;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.navbar-toggler,.navbar-toggler:focus,.navbar-toggler:active{outline:none;border-color:#dee2e6;}.navbar-toggler i,.navbar-toggler:focus i,.navbar-toggler:active i{color:rgba(0,0,0,.5);}.navbar-nav .nav-link{color:rgba(0,0,0,.5);padding-left:1em !important;padding-right:1em !important;}.navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3);}.navbar-nav .nav-link.active{color:rgba(0,0,0,.9);border-bottom:1px solid #00af92;}.catalog{border-right:1px solid rgba(0,0,0,.1);position:fixed;left:0;width:18%;height:calc(100vh - 4rem);top:2rem;padding-left:0 !important;overflow-x:hidden;overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}@media only screen and (max-width:992px){.catalog{width:25%;}}@media only screen and (max-width:768px){.catalog{width:100%;}}.catalog a,.catalog span{color:#333;}.catalog .nav-pills .nav-link{border-radius:0;width:100%;text-overflow:ellipsis;overflow:hidden;}.catalog span::before{content:attr(data-icon);display:inline-block;width:1rem;margin-left:-1rem;color:#808080;}.catalog i{margin-right:.3rem;margin-left:-.6rem;transition:transform .5s;}.catalog .expand i{transform:rotate(90deg);}.catalog a,.catalog span{cursor:pointer;padding:.2em 1em;}.catalog>nav{margin-bottom:3rem;margin-left:10px !important;}.catalog>nav nav{display:none;overflow:hidden;max-width:100%;}.catalog.show{display:block !important;position:static;height:auto;}main{position:relative;left:18%;width:64%;}@media only screen and (max-width:992px){main{left:25%;width:75%;}}@media only screen and (max-width:768px){main{left:0;width:100%;}}.highlight{margin-top:1rem;margin-bottom:1rem;-ms-overflow-style:-ms-autohiding-scrollbar;}.side-nav{position:fixed;height:calc(100vh - 4rem);top:4rem;width:18%;right:0;overflow-x:hidden;overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.side-nav>div{margin-bottom:3rem;}.side-nav .nav-pills .nav-link.active{border-radius:0;padding-left:.8rem;color:#333;background-color:#f0f0f0;border-left:.2rem solid #00af92;}.side-nav nav{width:100%;}.side-nav .contribution-link{margin-top:.85rem;margin-bottom:1rem;}.side-nav .side-nav-text{padding-bottom:1rem;margin-bottom:1rem;font-weight:bold;border-bottom:1px solid #f0f0f0;}.side-nav a:not(.contribution-link){display:block;padding-top:.15em;padding-bottom:.15em;color:#777;font-size:.9rem;border-radius:0;overflow-x:hidden;text-overflow:ellipsis;width:100%;white-space:nowrap;}.catalog a:hover,.catalog a.active,.catalog span:hover,.side-nav a:not(.contribution-link):hover{color:#00af92;background-color:#f0f0f0;}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#00af92;}footer{display:none;}footer>div{position:fixed;left:0;right:0;bottom:0;}footer ul{list-style:none;padding:0;margin:0;}footer ul>:nth-child(n+2):before{margin-right:.7rem;border-left:1px solid #dee2e6;}footer li{display:inline-block;}footer li:before{content:"";display:inline-block;height:.7rem;vertical-align:middle;}footer p{margin:0;}footer a{color:#00af92;text-decoration:none;}footer a:hover{color:#00493d;text-decoration:none;}main{letter-spacing:.03em;}.highlight{position:relative;padding:1rem;margin-top:1rem;margin-bottom:1rem;background-color:#f8f9fa;-ms-overflow-style:-ms-autohiding-scrollbar;}.highlight pre{padding:0;margin-top:0;margin-bottom:0;background-color:transparent;border:0;font-size:1rem;}@media(min-width:576px){.highlight{padding:1.5rem;}}h1{padding-bottom:.8rem;margin-bottom:1.2rem;border-bottom:1px solid #f0f0f0;}h2,h3,h4,h5,h6{margin:.7em 0 .2em;}table.table{border-bottom:1px solid #dee2e6;color:#333;}table.table thead th{background-color:rgba(0,0,0,.04);border-bottom:2px solid #dee2e6;border-top:1px solid #dee2e6;}table.table td{vertical-align:middle;border-top:1px solid #dee2e6;}p,li{line-height:2;}.div-collapse{display:none;border-radius:.25rem;margin-bottom:1em;background-color:#f8f9fa;}.div-collapse p:last-child{margin-bottom:0;}.bd-content-title{display:block;pointer-events:auto;}.h2-collapse{cursor:pointer;font-weight:normal;font-size:1rem;}.h2-collapse span:first-child::before{content:"Q:";margin-right:.5em;display:inline;font-size:1rem;color:#00af92;}h1,h2,h3,h4,h5,h6{line-height:2;pointer-events:none;}h1:before,h2:before,h3:before,h4:before,h5:before,h6:before{content:'';display:block;height:4rem;margin-top:-4rem;}.bd-callout{padding:1.25rem;margin-top:1.25rem;margin-bottom:1.25rem;border-left:.25rem solid #dee2e6;}.bd-callout h4 .anchorjs-link{display:none;}.bd-callout p:last-child{margin-bottom:0;}.bd-callout-info{border-left-color:#5bc0de;background-color:#f2f9fc;}.bd-callout-info .bd-content-title{display:inline-block;}.bd-callout-info h4{font-size:1.2rem;margin:0;color:#5bc0de;}.bd-callout-info h4 i{margin-right:.2em;}.bd-callout-warning{border-left-color:#f0ad4e;background-color:#fdfaec;}.bd-callout-warning .bd-content-title{display:inline-block;}.bd-callout-warning h4{font-size:1.2rem;margin:0;color:#f0ad4e;}.bd-callout-warning h4 i{margin-right:.2em;}.bd-callout-danger{border-left-color:#d9534f;background-color:#fbf4f4;}.bd-callout-danger .bd-content-title{display:inline-block;}.bd-callout-danger h4{font-size:1.2rem;margin:0;color:#d9534f;}.bd-callout-danger h4 i{margin-right:.2em;}.bd-callout dl,.bd-callout ol,.bd-callout ul{margin-bottom:0;}.btn-clipboard,.btn-clipboard:focus{position:absolute;top:.5rem;right:.5rem;z-index:10;display:block;padding:.25rem .5rem;font-size:75%;color:#818a91;background-color:transparent;border:0;outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.btn-clipboard:hover,.btn-clipboard:focus:hover{color:#fff;background-color:#00af92;}.lightbulb{position:fixed;right:0;bottom:3rem;padding:1rem;cursor:pointer;background-color:#f0f0f0;}.anchorjs-link{font-weight:400;color:rgba(0,175,146,.2);transition:color .15s ease-in-out,opacity .15s ease-in-out;opacity:0;-webkit-font-smoothing:antialiased;text-decoration:none;margin-left:.2em;}.anchorjs-link:hover{text-decoration:none;color:#00493d;}:hover>.anchorjs-link,.anchorjs-link:focus{opacity:1;}[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon);}.hljs{display:block;overflow-x:auto;padding:.5em;background:#f8f9fa;color:#000;}.hljs-comment,.hljs-quote,.hljs-variable{color:#008000;}.hljs-keyword,.hljs-selector-tag,.hljs-built_in,.hljs-name,.hljs-tag{color:#00f;}.hljs-string,.hljs-title,.hljs-section,.hljs-attribute,.hljs-literal,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-addition{color:#a31515;}.hljs-deletion,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-meta{color:#2b91af;}.hljs-doctag{color:#808080;}.hljs-attr{color:#f00;}.hljs-symbol,.hljs-bullet,.hljs-link{color:#00b0e8;}.hljs-emphasis{font-style:italic;}.hljs-strong{font-weight:bold;}.hljs-keyword,.hljs-attribute,.hljs-selector-tag,.hljs-meta-keyword,.hljs-doctag,.hljs-name{font-weight:normal;}.hljs-title,.hljs-section{font-weight:normal;}@media screen and (max-width:380px){@-ms-viewport{width:380px;}}.search-bar{position:relative;padding-left:10px !important;border-bottom:1px solid rgba(0,0,0,.1);margin-bottom:1rem;padding-bottom:.5rem;}.search-bar:hover .search-re{display:block;}.search-bar .search-de{color:#00af92;position:absolute;right:15px;padding:4px 8px;margin:1px;background:#fff;}.search-bar .search-de:hover{color:#333;}.search-bar #sInput{width:calc(100% - 10px);padding-left:10px;border:1px solid #00af92;padding:5px 8px;}.search-bar #sInput:focus{box-shadow:0 0 3px #00af92;outline:none;}.search-bar #sInput:focus+.search-re{display:block;}.search-bar .search-re{position:absolute;max-height:500px;width:calc(100% - 20px);box-shadow:0 0 8px #ccc;box-shadow:0 0 8px #88888866;background:#fff;overflow-y:auto;display:none;z-index:3;}.search-bar .search-re ul{padding-left:0;background:#fff;margin-bottom:0;}.search-bar .search-re ul>li{list-style:none;border-top:1px solid #ccc;border-top:1px solid #88888866;}.search-bar .search-re ul>li a{display:inline-block;width:100%;padding-bottom:6px;}.search-bar .search-re ul>li a:hover{color:#00af92 !important;}.search-bar .search-re ul>li strong{display:inline-block;padding-top:5px;font-size:1.1rem;color:#00af92;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;vertical-align:bottom;}.search-bar .search-re ul>li span{display:inline-block;padding:0;color:rgba(50,50,50,.7);line-height:1.6;word-break:break-all;}.search-bar .search-re ul>li:first-child{border:none;}.search-bar .search-re::-webkit-scrollbar{width:8px;height:8px;}.search-bar .search-re::-webkit-scrollbar-thumb{border-radius:10px;background:rgba(0,0,0,.15);}.search-bar .search-re::-webkit-scrollbar-track{border-radius:5px;background:transparent;}.theme-dark body{color:#dcdcdc;background-color:#1e1e1e;}.theme-dark nav .logo{display:none;}.theme-dark nav .logo-dark{display:block;}.theme-dark .navbar,.theme-dark footer>div{background-color:#232323;}.theme-dark .navbar-toggler,.theme-dark .navbar-toggler:focus,.theme-dark .navbar-toggler:active{outline:none;border-color:#444;}.theme-dark .navbar-toggler i,.theme-dark .navbar-toggler:focus i,.theme-dark .navbar-toggler:active i{color:rgba(255,255,255,.5);}.theme-dark .navbar-nav .nav-link{color:rgba(255,255,255,.5);}.theme-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.3);}.theme-dark .navbar-nav .nav-link.active{color:rgba(255,255,255,.9);border-bottom:1px solid #00e599;}.theme-dark .catalog a,.theme-dark .catalog span{color:#dcdcdc;}.theme-dark .side-nav .nav-pills .nav-link.active{color:#dcdcdc;background-color:#333;border-left:.2rem solid #00e599;}.theme-dark .side-nav-text{border-bottom:1px solid #333;}.theme-dark .catalog a:hover,.theme-dark .catalog a.active,.theme-dark .catalog span:hover,.theme-dark .side-nav a:not(.contribution-link):hover{color:#00e599;background-color:#333;}.theme-dark footer ul>:nth-child(n+2):before{border-left:1px solid #444;}.theme-dark footer a{color:#00e599;}.theme-dark footer a:hover{color:#4cffc4;}.theme-dark .highlight{background-color:#232323;}.theme-dark h1{border-bottom:1px solid #333;}.theme-dark table.table{border-bottom:1px solid #444;color:#dcdcdc;}.theme-dark table.table thead th{background-color:rgba(255,255,255,.04);border-bottom:2px solid #444;}.theme-dark .table td,.theme-dark .table th{border-top:1px solid #444;}.theme-dark .div-collapse{background-color:#232323;}.theme-dark .h2-collapse span:first-child:hover{color:#00e599;}.theme-dark .bd-callout{border-left:1px solid #444;}.theme-dark .bd-callout-info{border-left-color:#5bc0de;background-color:#222728;}.theme-dark .bd-callout-info h4{color:#5bc0de;}.theme-dark .bd-callout-warning{border-left-color:#f0ad4e;background-color:#27261c;}.theme-dark .bd-callout-warning h4{color:#f0ad4e;}.theme-dark .bd-callout-danger{border-left-color:#d9534f;background-color:#292524;}.theme-dark .bd-callout-danger h4{color:#d9534f;}.theme-dark .btn-clipboard:hover{color:#fff;background-color:#00e599;}.theme-dark .lightbulb{background-color:#333;}.theme-dark .anchorjs-link{color:rgba(0,229,153,.2);}.theme-dark .anchorjs-link:hover{color:#4cffc4;}.theme-dark a{color:#00e599;}.theme-dark a:hover{color:#4cffc4;}.theme-dark .table-hover tbody tr:hover{color:#dcdcdc;background-color:rgba(255,255,255,.075);}.theme-dark .hljs{display:block;overflow-x:auto;padding:.5em;background:#232323;color:#dcdcdc;}.theme-dark .hljs-keyword,.theme-dark .hljs-literal,.theme-dark .hljs-symbol,.theme-dark .hljs-name{color:#569cd6;}.theme-dark .hljs-link{color:#569cd6;text-decoration:underline;}.theme-dark .hljs-built_in,.theme-dark .hljs-type{color:#4ec9b0;}.theme-dark .hljs-number,.theme-dark .hljs-class{color:#b8d7a3;}.theme-dark .hljs-string,.theme-dark .hljs-meta-string{color:#d69d85;}.theme-dark .hljs-regexp,.theme-dark .hljs-template-tag{color:#9a5334;}.theme-dark .hljs-subst,.theme-dark .hljs-function,.theme-dark .hljs-title,.theme-dark .hljs-params,.theme-dark .hljs-formula{color:#dcdcdc;}.theme-dark .hljs-comment,.theme-dark .hljs-quote{color:#57a64a;font-style:italic;}.theme-dark .hljs-doctag{color:#608b4e;}.theme-dark .hljs-meta,.theme-dark .hljs-meta-keyword,.theme-dark .hljs-tag{color:#9b9b9b;}.theme-dark .hljs-variable,.theme-dark .hljs-template-variable{color:#bd63c5;}.theme-dark .hljs-attr,.theme-dark .hljs-attribute,.theme-dark .hljs-builtin-name{color:#9cdcfe;}.theme-dark .hljs-section{color:#ffd700;}.theme-dark .hljs-emphasis{font-style:italic;}.theme-dark .hljs-bullet,.theme-dark .hljs-selector-tag,.theme-dark .hljs-selector-id,.theme-dark .hljs-selector-class,.theme-dark .hljs-selector-attr,.theme-dark .hljs-selector-pseudo{color:#d7ba7d;}.theme-dark .hljs-addition{background-color:#144212;display:inline-block;width:100%;}.theme-dark .hljs-deletion{background-color:#600;display:inline-block;width:100%;}.theme-dark .search-bar{border-bottom:1px solid rgba(0,0,0,.1);}.theme-dark .search-bar .search-de{color:#00e599;background:#1e1e1e;}.theme-dark .search-bar .search-de:hover{color:#0fa;}.theme-dark .search-bar #sInput{border:1px solid #00e599;background:#1e1e1e;color:#dcdcdc;}.theme-dark .search-bar #sInput:focus{box-shadow:0 0 5px #00e599;}.theme-dark .search-bar .search-re{box-shadow:0 0 8px #000;background:#1e1e1e;}.theme-dark .search-bar .search-re ul{background:#1e1e1e;}.theme-dark .search-bar .search-re ul>li{border-top:1px solid #111;}.theme-dark .search-bar .search-re ul>li a:hover{color:#00e599 !important;}.theme-dark .search-bar .search-re ul>li strong{color:#00e599;}.theme-dark .search-bar .search-re ul>li span{color:#bbb;}.theme-dark .search-bar .search-re::-webkit-scrollbar-thumb{background:rgba(200,200,200,.15);}.theme-dark .search-bar .search-re::-webkit-scrollbar-track{background:transparent;} \ No newline at end of file diff --git a/template/docs/index.html b/template/docs/index.html index 0a4db421a5..1d38dcf8fd 100644 --- a/template/docs/index.html +++ b/template/docs/index.html @@ -1,5 +1,5 @@ - - + + diff --git a/template/faq/index.html b/template/faq/index.html index 29784e3ed9..ebbed417aa 100644 --- a/template/faq/index.html +++ b/template/faq/index.html @@ -1,5 +1,5 @@ - - + + diff --git a/template/index.html b/template/index.html index 0a4db421a5..1d38dcf8fd 100644 --- a/template/index.html +++ b/template/index.html @@ -1,5 +1,5 @@ - - + + diff --git a/template/template.html b/template/template.html index 19f531c3a2..2460f6c405 100644 --- a/template/template.html +++ b/template/template.html @@ -1,4 +1,4 @@ - + @@ -69,6 +69,13 @@
+ {catalog}
@@ -115,6 +122,58 @@ $(e.target).parents("h2").next().toggle("fast"); }); } + + $("#sInput").bind({ + focus: function () { + searchBar(); + }, + keyup: function (e) { + clearTimeout(); + if (e.which == 13) { + searchBar(); + } + setTimeout(searchBar, 300); + }, + paste: function () { + searchBar(); + } + }); + + $(".search-de").click(function () { + $("#sInput").val(""); + $("#sResult").html(""); + }) + + var url = window.location.origin; + + function searchBar() { + k = $("#sInput").val(); + l = localStorage.getItem("lang") || navigator.language || "en-us"; + if (!k) $("#sResult").html(""); + $.ajax({ + type: "GET", + url: url + "/?k=" + encodeURIComponent(k) + "&l=" + encodeURIComponent(l), + contentType: "application/json;charset=utf-8", + dataType: "json", + success: function (data) { + var html = "" + + if (data.length == 0) { + html += "
  • No results found.
  • "; + } + for (i in data) { + var _data = data[i]; + html += "
  • " + _data.Title + "
    "; + html += "" + _data.Line + "
  • "; + } + $("#sResult").html(html); + }, + fail: function () { + alert("fail"); + } + }); + } + - + \ No newline at end of file