5858 < link rel ="manifest " href ="/icons/site.webmanifest ">
5959
6060 < 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 ">
6261
6362 <!-- Bootstrap -->
6463 < link href ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/css/bootstrap.min.css "
106105 < img src ="/images/logos/osl-color-horizontal.png " class ="logo " alt ="{{ config.site_name }} ">
107106 </ a >
108107
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-
115108 <!-- Mobile toggler (offcanvas) -->
116109 < button class ="navbar-toggler ms-2 " type ="button "
117110 data-bs-toggle ="offcanvas " data-bs-target ="#offcanvasNav "
118111 aria-controls ="offcanvasNav " aria-label ="Toggle navigation ">
119112 < span class ="navbar-toggler-icon "> </ span >
120113 </ button >
121114
122- <!-- Desktop menu -->
115+ <!-- Desktop menu (grows to fill middle) -->
123116 < div class ="collapse navbar-collapse order-lg-1 ">
124117 < ul class ="navbar-nav ms-3 ">
125118
126119 {% if nav|length > 0 %}
127120 {% for nav_item in nav %}
121+
128122 {% if not nav_item.children %}
129123 <!-- Top-level single page -->
130124 < li class ="nav-item {% if nav_item.active %}nav_active{% endif %} ">
148142 </ a >
149143
150144 < 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 #}
152146 {% set parent_overview = None %}
153147 {% for ch in nav_item.children %}
154148 {% if ch.title in menu_group_titles %}
@@ -186,6 +180,7 @@ <h2 class="accordion-header" id="{{ hdr_id }}">
186180 < div id ="{{ col_id }} " class ="accordion-collapse collapse "
187181 data-bs-parent ="#mega-acc-{{ top_i }} ">
188182 < div class ="accordion-body p-2 ">
183+
189184 {% set child_overview = None %}
190185 {% for gc in child.children %}
191186 {% if gc.title in menu_group_titles %}
@@ -200,6 +195,7 @@ <h2 class="accordion-header" id="{{ hdr_id }}">
200195 href ="{{ child_overview.url|url }} "> Overview</ a >
201196 </ li >
202197 {% endif %}
198+
203199 {% for gc in child.children %}
204200 {% if gc.title not in menu_group_titles %}
205201 < li >
@@ -209,6 +205,7 @@ <h2 class="accordion-header" id="{{ hdr_id }}">
209205 {% endif %}
210206 {% endfor %}
211207 </ ul >
208+
212209 </ div >
213210 </ div >
214211 </ div >
@@ -227,14 +224,35 @@ <h2 class="accordion-header" id="{{ hdr_id }}">
227224 </ div >
228225 </ li >
229226 {% endif %}
227+
230228 {% endfor %}
231229 {% endif %}
232230
233231 </ ul >
234232 </ div >
235- </ div >
236- </ nav >
237233
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 >
238256
239257 <!-- ========================= MOBILE OFFCANVAS (Accordion) ========================= -->
240258 < 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>
245263
246264 < div class ="offcanvas-body ">
247265 <!-- 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 >
252281
253282 <!-- Accordion nav -->
254283 < div class ="accordion accordion-flush " id ="navAccordion ">
@@ -482,8 +511,17 @@ <h2 class="accordion-header" id="h-{{ pid }}">
482511 </ div >
483512 </ footer >
484513
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 >
487525 < script src ="/js/theme.js " defer > </ script >
488526
489527 {% endblock footer %}
0 commit comments