File tree Expand file tree Collapse file tree 6 files changed +44
-4
lines changed
docs/reference/themes/mongodb Expand file tree Collapse file tree 6 files changed +44
-4
lines changed Original file line number Diff line number Diff line change 11
11
</ a >
12
12
</ div >
13
13
<!--logo end-->
14
- {{ partial "header/topRight.html" }}
14
+ {{ partial "header/topRight.html" . }}
15
15
</ div >
16
16
</ 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 5
5
< a href ="http://www.mongodb.org/get-involved " data-toggle ="tooltip " data-placement ="bottom " title ="Get involved with MongoDB "> Community</ a >
6
6
< a href ="http://docs.mongodb.org " data-toggle ="tooltip " data-placement ="bottom " title ="The MongoDB Documentation "> Docs</ a >
7
7
< a href ="http://blog.mongodb.org " data-toggle ="tooltip " data-placement ="bottom " title ="The MongoDB Blog "> Blog</ a >
8
+ {{ partial "header/search.html" . }}
8
9
</ div >
9
10
</ div >
Original file line number Diff line number Diff line change 23
23
margin-left : 5px ;
24
24
}
25
25
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;}
28
28
29
29
.body blockquote {
30
30
background-color : # edf4e8 ;
@@ -88,3 +88,30 @@ code {
88
88
a code {
89
89
color : # 006cbc ;
90
90
}
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,12 +15,16 @@ function initializeJS() {
15
15
jQuery ( document ) . ready ( function ( ) {
16
16
initializeJS ( ) ;
17
17
jQuery ( '[data-toggle="tooltip"]' ) . tooltip ( ) ;
18
- jQuery ( "body" ) . addClass ( "hljsCode " ) ;
18
+ jQuery ( "body" ) . addClass ( "jsEnabled " ) ;
19
19
hljs . initHighlightingOnLoad ( ) ;
20
20
var linkRegex = new RegExp ( '/' + window . location . host + '/' ) ;
21
21
jQuery ( 'a' ) . not ( '[href*="mailto:"]' ) . each ( function ( ) {
22
22
if ( ! linkRegex . test ( this . href ) ) {
23
23
$ ( this ) . attr ( 'target' , '_blank' ) ;
24
24
}
25
25
} ) ;
26
+ 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
+ } ) ;
26
30
} ) ;
You can’t perform that action at this time.
0 commit comments