58
58
< link rel ="manifest " href ="/icons/site.webmanifest ">
59
59
60
60
< link rel ="alternate " type ="application/rss+xml " href ="/feed_rss_created.xml " title ="Open Science Labs ">
61
- < link rel ="alternate " type ="application/json " href ="/js/index.json " title ="Open Science Labs ">
62
61
63
62
<!-- Bootstrap -->
64
63
< link href ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/css/bootstrap.min.css "
106
105
< img src ="/images/logos/osl-color-horizontal.png " class ="logo " alt ="{{ config.site_name }} ">
107
106
</ a >
108
107
109
- <!-- Desktop search -->
110
- < div class ="mk-search order-lg-2 d-none d-md-block ms-auto me-2 ">
111
- < input id ="mkdocs-search " type ="search " class ="form-control form-control-sm " placeholder ="Search… " aria-label ="Search ">
112
- < i class ="fa fa-search "> </ i >
113
- </ div >
114
-
115
108
<!-- Mobile toggler (offcanvas) -->
116
109
< button class ="navbar-toggler ms-2 " type ="button "
117
110
data-bs-toggle ="offcanvas " data-bs-target ="#offcanvasNav "
118
111
aria-controls ="offcanvasNav " aria-label ="Toggle navigation ">
119
112
< span class ="navbar-toggler-icon "> </ span >
120
113
</ button >
121
114
122
- <!-- Desktop menu -->
115
+ <!-- Desktop menu (grows to fill middle) -->
123
116
< div class ="collapse navbar-collapse order-lg-1 ">
124
117
< ul class ="navbar-nav ms-3 ">
125
118
126
119
{% if nav|length > 0 %}
127
120
{% for nav_item in nav %}
121
+
128
122
{% if not nav_item.children %}
129
123
<!-- Top-level single page -->
130
124
< li class ="nav-item {% if nav_item.active %}nav_active{% endif %} ">
148
142
</ a >
149
143
150
144
< div class ="dropdown-menu mega p-2 " role ="menu " aria-label ="{{ nav_item.title }} ">
151
- {# optional Overview link for the section #}
145
+ {# Optional Overview link for the section #}
152
146
{% set parent_overview = None %}
153
147
{% for ch in nav_item.children %}
154
148
{% if ch.title in menu_group_titles %}
@@ -186,6 +180,7 @@ <h2 class="accordion-header" id="{{ hdr_id }}">
186
180
< div id ="{{ col_id }} " class ="accordion-collapse collapse "
187
181
data-bs-parent ="#mega-acc-{{ top_i }} ">
188
182
< div class ="accordion-body p-2 ">
183
+
189
184
{% set child_overview = None %}
190
185
{% for gc in child.children %}
191
186
{% if gc.title in menu_group_titles %}
@@ -200,6 +195,7 @@ <h2 class="accordion-header" id="{{ hdr_id }}">
200
195
href ="{{ child_overview.url|url }} "> Overview</ a >
201
196
</ li >
202
197
{% endif %}
198
+
203
199
{% for gc in child.children %}
204
200
{% if gc.title not in menu_group_titles %}
205
201
< li >
@@ -209,6 +205,7 @@ <h2 class="accordion-header" id="{{ hdr_id }}">
209
205
{% endif %}
210
206
{% endfor %}
211
207
</ ul >
208
+
212
209
</ div >
213
210
</ div >
214
211
</ div >
@@ -227,14 +224,35 @@ <h2 class="accordion-header" id="{{ hdr_id }}">
227
224
</ div >
228
225
</ li >
229
226
{% endif %}
227
+
230
228
{% endfor %}
231
229
{% endif %}
232
230
233
231
</ ul >
234
232
</ div >
235
- </ div >
236
- </ nav >
237
233
234
+ <!-- Desktop search (RIGHT side) -->
235
+ < form class ="d-none d-lg-block ms-lg-auto order-lg-2 position-relative " role ="search ">
236
+ < label for ="mkdocs-search " class ="visually-hidden "> Search</ label >
237
+ < div class ="input-group input-group-sm searchbar flex-nowrap ">
238
+ < span class ="input-group-text bg-transparent border-0 pe-2 ">
239
+ < svg class ="search-icon " viewBox ="0 0 24 24 " aria-hidden ="true ">
240
+ < circle cx ="11 " cy ="11 " r ="7 " fill ="none " stroke ="currentColor " stroke-width ="2 "/>
241
+ < line x1 ="21 " y1 ="21 " x2 ="16.65 " y2 ="16.65 " stroke ="currentColor " stroke-width ="2 " stroke-linecap ="round "/>
242
+ </ svg >
243
+ </ span >
244
+ < input id ="mkdocs-search "
245
+ type ="search "
246
+ class ="form-control border-0 bg-transparent "
247
+ placeholder ="Search… "
248
+ autocomplete ="off " />
249
+ </ div >
250
+ <!-- results popover anchor -->
251
+ < div class ="search-popover " id ="search-popover-desktop " aria-label ="Search results "> </ div >
252
+ </ form >
253
+
254
+ </ div >
255
+ </ nav >
238
256
239
257
<!-- ========================= MOBILE OFFCANVAS (Accordion) ========================= -->
240
258
< div class ="offcanvas offcanvas-end text-bg-dark " tabindex ="-1 " id ="offcanvasNav " aria-labelledby ="offcanvasNavLabel ">
@@ -245,10 +263,21 @@ <h5 class="offcanvas-title" id="offcanvasNavLabel">{{ config.site_name }}</h5>
245
263
246
264
< div class ="offcanvas-body ">
247
265
<!-- Mobile search -->
248
- < div class ="mk-search mb-3 ">
249
- < input id ="mkdocs-search-mobile " type ="search " class ="form-control " placeholder ="Search… " aria-label ="Search ">
250
- < i class ="fa fa-search "> </ i >
251
- </ div >
266
+ < form class ="d-lg-none mb-3 " role ="search ">
267
+ < div class ="input-group input-group-sm searchbar flex-nowrap ">
268
+ < span class ="input-group-text bg-transparent border-0 pe-2 ">
269
+ < svg class ="search-icon " viewBox ="0 0 24 24 " aria-hidden ="true ">
270
+ < circle cx ="11 " cy ="11 " r ="7 " fill ="none " stroke ="currentColor " stroke-width ="2 "/>
271
+ < line x1 ="21 " y1 ="21 " x2 ="16.65 " y2 ="16.65 " stroke ="currentColor " stroke-width ="2 " stroke-linecap ="round "/>
272
+ </ svg >
273
+ </ span >
274
+ < input id ="mkdocs-search-mobile "
275
+ type ="search "
276
+ class ="form-control border-0 bg-transparent "
277
+ placeholder ="Search… "
278
+ autocomplete ="off " />
279
+ </ div >
280
+ </ form >
252
281
253
282
<!-- Accordion nav -->
254
283
< div class ="accordion accordion-flush " id ="navAccordion ">
@@ -482,8 +511,17 @@ <h2 class="accordion-header" id="h-{{ pid }}">
482
511
</ div >
483
512
</ footer >
484
513
485
- < script type ="text/javascript " src ="/js/bundle.js " defer > </ script >
486
- < script src ="/js/search.min.js " defer > </ script >
514
+ <!-- Lunr core -->
515
+ < script src ="
https://cdn.jsdelivr.net/npm/[email protected] /lunr.min.js "
defer > </ script >
516
+
517
+ <!-- OPTIONAL: language support (Spanish/Portuguese); keep only what you need -->
518
+ < script src ="
https://cdn.jsdelivr.net/npm/[email protected] /min/lunr.stemmer.support.min.js "
defer > </ script >
519
+ < script src ="
https://cdn.jsdelivr.net/npm/[email protected] /min/lunr.es.min.js "
defer > </ script >
520
+ < script src ="
https://cdn.jsdelivr.net/npm/[email protected] /min/lunr.pt.min.js "
defer > </ script >
521
+ < script src ="
https://cdn.jsdelivr.net/npm/[email protected] /min/lunr.multi.min.js "
defer > </ script >
522
+
523
+ <!-- Your search UI/logic (must come after Lunr) -->
524
+ < script src ="/js/osl-search.js " defer > </ script >
487
525
< script src ="/js/theme.js " defer > </ script >
488
526
489
527
{% endblock footer %}
0 commit comments