File tree Expand file tree Collapse file tree 5 files changed +43
-4
lines changed
docs/reference/themes/mongodb Expand file tree Collapse file tree 5 files changed +43
-4
lines changed Original file line number Diff line number Diff line change 1111 </ a >
1212 </ div >
1313 <!--logo end-->
14- {{ partial "header/topRight.html" }}
14+ {{ partial "header/topRight.html" . }}
1515 </ div >
1616</ header >
Original file line number Diff line number Diff line change 1+ < div id ="search ">
2+ < form method ="get " action ="//www.google.com/search " target ="_blank ">
3+ < input type ="text " name ="searchQuery " size ="20 " value ="" autocomplete ="off " placeholder ="Search docs ">
4+ < input type ="hidden " name ="site " value ="site:{{.Site.BaseUrl}} ">
5+ < input type ="hidden " name ="q " value ="">
6+ < label for ="searchQuery "> < i class ="fa fa-search fa-1 "> </ i > </ label >
7+ </ form >
8+ </ div >
Original file line number Diff line number Diff line change 55 < a href ="http://www.mongodb.org/get-involved " data-toggle ="tooltip " data-placement ="bottom " title ="Get involved with MongoDB "> Community</ a >
66 < a href ="http://docs.mongodb.org " data-toggle ="tooltip " data-placement ="bottom " title ="The MongoDB Documentation "> Docs</ a >
77 < a href ="http://blog.mongodb.org " data-toggle ="tooltip " data-placement ="bottom " title ="The MongoDB Blog "> Blog</ a >
8+ {{ partial "header/search.html" . }}
89</ div >
910</ div >
Original file line number Diff line number Diff line change 2323 margin-left : 5px ;
2424}
2525
26- .hljsCode pre { padding : 0px ; overflow : auto; word-wrap : normal; white-space : nowrap;}
27- .hljsCode pre code { padding : 24px 12px ; overflow : auto; white-space : pre;}
26+ .jsEnabled pre { padding : 0px ; overflow : auto; word-wrap : normal; white-space : nowrap;}
27+ .jsEnabled pre code { padding : 24px 12px ; overflow : auto; white-space : pre;}
2828
2929.body blockquote {
3030 background-color : # edf4e8 ;
@@ -88,3 +88,30 @@ code {
8888a code {
8989 color : # 006cbc ;
9090}
91+
92+ # search {
93+ visibility : hidden;
94+ display : inline-block;
95+ background-color : rgba (255 , 255 , 255 , 0.3 );
96+ border-radius : 6px ;
97+ border : 1px solid # 3b2920 ;
98+ font-weight : 300 ;
99+ font-size : 15px ;
100+ padding : 2px ;
101+ }
102+
103+ # search label {
104+ padding-right : 5px ;
105+ }
106+
107+ # search input [name = "searchQuery" ] {
108+ background-color : transparent !important ;
109+ color : white;
110+ border : none;
111+ padding : 2px 0 0 4px ;
112+ outline : none;
113+ }
114+
115+ .jsEnabled # search {
116+ visibility : visible;
117+ }
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ function initializeJS() {
1515jQuery ( document ) . ready ( function ( ) {
1616 initializeJS ( ) ;
1717 jQuery ( '[data-toggle="tooltip"]' ) . tooltip ( ) ;
18- jQuery ( "body" ) . addClass ( "hljsCode " ) ;
18+ jQuery ( "body" ) . addClass ( "jsEnabled " ) ;
1919 hljs . initHighlightingOnLoad ( ) ;
2020 var linkRegex = new RegExp ( '/' + window . location . host + '/' ) ;
2121 jQuery ( 'a' ) . not ( '[href*="mailto:"]' ) . each ( function ( ) {
@@ -24,4 +24,7 @@ jQuery(document).ready(function(){
2424 }
2525 } ) ;
2626 jQuery ( '.body table' ) . addClass ( 'table' ) . addClass ( 'table-striped' ) ;
27+ jQuery ( "#search form" ) . submit ( function ( ) {
28+ $ ( '#search input[name="q"]' ) . attr ( "value" , $ ( '#search input[name="searchQuery"]' ) . val ( ) + ' ' + $ ( '#search input[name="site"]' ) . val ( ) ) ;
29+ } ) ;
2730} ) ;
You can’t perform that action at this time.
0 commit comments