File tree Expand file tree Collapse file tree 2 files changed +34
-17
lines changed Expand file tree Collapse file tree 2 files changed +34
-17
lines changed Original file line number Diff line number Diff line change 102
102
</ div >
103
103
</ a >
104
104
< div class ="search_form ">
105
- < div id ="cse " style ="width: 100%; "> </ div >
105
+ < div class =" gcse-search " id ="cse " style ="width: 100%; "> </ div >
106
106
</ div >
107
107
</ div > <!-- end navbar -->
108
108
@@ -346,15 +346,12 @@ <h2>Machine Learning in Python</h2>
346
346
} ) ( ) ;
347
347
</ script >
348
348
{% endif %}
349
-
350
- < script src ="http://www.google.com/jsapi " type ="text/javascript "> </ script >
351
- < script type ="text/javascript "> google . load ( 'search' , '1' ,
352
- { language : 'en' } ) ; google . setOnLoadCallback ( function ( ) {
353
- var customSearchControl = new
354
- google . search . CustomSearchControl ( '016639176250731907682:tjtqbvtvij0' ) ;
355
- customSearchControl . setResultSetSize ( google . search . Search . FILTERED_CSE_RESULTSET ) ;
356
- var options = new google . search . DrawOptions ( ) ;
357
- options . setAutoComplete ( true ) ;
358
- customSearchControl . draw ( 'cse' , options ) ; } , true ) ;
349
+ < script >
350
+ ( function ( ) {
351
+ var cx = '016639176250731907682:tjtqbvtvij0' ;
352
+ var gcse = document . createElement ( 'script' ) ; gcse . type = 'text/javascript' ; gcse . async = true ;
353
+ gcse . src = 'https://cse.google.com/cse.js?cx=' + cx ;
354
+ var s = document . getElementsByTagName ( 'script' ) [ 0 ] ; s . parentNode . insertBefore ( gcse , s ) ;
355
+ } ) ( ) ;
359
356
</ script >
360
357
{%- endblock %}
Original file line number Diff line number Diff line change @@ -207,20 +207,40 @@ div.navbar div.nav-icon {
207
207
}
208
208
209
209
.search_form {
210
- margin-top: -23px;
211
- /*The min-height is added here, to prevent the element from shrinking
212
- too much, while the scripts are still loading the search-bar.
213
- Without it, layout glitches occur, as the element keeps dynamically
214
- changing its size while its loading-contents adjusts into position.*/
210
+ margin-top: -40px;
215
211
min-height: 42px;
216
212
}
217
213
218
214
#cse .gsc-clear-button {
219
215
width: 50px;
216
+ position: relative;
217
+ top: -2px;
220
218
}
221
219
222
220
.gsc-branding {
223
- display: none;
221
+ display: none !important;
222
+ }
223
+
224
+ form.gsc-search-box {
225
+ padding: 0 !important;
226
+ }
227
+
228
+ input.gsc-search-button {
229
+ position: relative;
230
+ top: -4px;
231
+ border-radius: 5px !important;
232
+ border-color: #FFFFFF !important;
233
+ background-color: #ff9c34 !important;
234
+ }
235
+
236
+ a.gs-title, a.gs-title > b{
237
+ color: blue !important;
238
+ }
239
+
240
+ .gsc-results .gsc-cursor-box .gsc-cursor-current-page {
241
+ border-color: white !important;
242
+ background-color: #ff9c34 !important;
243
+ color: white !important;
224
244
}
225
245
226
246
/*---------------------------------------------------------------*/
You can’t perform that action at this time.
0 commit comments