@@ -188,19 +188,19 @@ <h5 class="sidebar-header level-1">Developers</h5>
188188
189189 < h1 class ="mb-4 mt-0 "> Python API examples</ h1 >
190190
191-
191+
192192 <!-- floating table of contents -->
193- < div class ="col-lg-4 col-md-3 float-md-end ms-md-3 mb-sm-3 ">
193+ < div class ="col-lg-4 col-md-3 float-md-end ms-md-3 mb-sm-3 " id =" toc-div " >
194194 < div class ="sidebar docs-sidebar-2 p-4 ">
195- < h5 class ="sidebar-header "> Contents </ h5 >
195+ < h5 class ="sidebar-header "> On this page </ h5 >
196196 < ul id ="toc " class ="section-nav ">
197197< li class ="toc-entry toc-h3 "> < a href ="#hello-world-example-code "> Hello World example code</ a > </ li >
198198< li class ="toc-entry toc-h3 "> < a href ="#elf-files-and-breakpoints "> ELF files and breakpoints</ a > </ li >
199199< li class ="toc-entry toc-h2 "> < a href ="#alternative-ways-to-create-a-session "> Alternative ways to create a session</ a > </ li >
200200</ ul >
201201 </ div >
202202 </ div >
203-
203+
204204 < h3 id ="hello-world-example-code "> Hello World example code</ h3 >
205205
206206< p > This example shows basic connection, loading a firmware binary, and some simple target control.</ p >
@@ -338,7 +338,7 @@ <h2 id="alternative-ways-to-create-a-session">Alternative ways to create a sessi
338338 </ div >
339339 </ div >
340340 </ main >
341-
341+
342342 </ div >
343343 </ div >
344344 </ div >
@@ -410,7 +410,7 @@ <h5>Community</h5>
410410</ footer >
411411
412412 </ div >
413-
413+
414414 < a href ="#top " title ="Scroll to top " id ="scroll-top-link " aria-hidden ="true ">
415415 < i class ="bi bi-arrow-up-short "> </ i >
416416 </ a >
@@ -422,4 +422,11 @@ <h5>Community</h5>
422422 -->
423423
424424 </ body >
425+
426+ < script >
427+ // Hide the page's floating TOC if there are no sections.
428+ if ( $ ( '#toc' ) . children ( ) . length < 1 ) {
429+ $ ( '#toc-div' ) . hide ( )
430+ }
431+ </ script >
425432</ html >
0 commit comments