File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -362,4 +362,25 @@ def add_parens_to_functions(match):
362362 print (f"Index file not found: { index_file } " )
363363
364364
365+ # Update quarto-secondary-nav-title to display "User Guide" text
366+ # This improves the mobile navigation by making it clear what the sidebar toggle reveals
367+ all_html_files = glob .glob ("_site/**/*.html" , recursive = True )
368+ print (f"Found { len (all_html_files )} HTML files to check for secondary nav title" )
369+
370+ for html_file in all_html_files :
371+ with open (html_file , "r" ) as file :
372+ content = file .read ()
373+
374+ # Replace empty h1.quarto-secondary-nav-title with h5 containing "User Guide"
375+ original_pattern = r'<h1 class="quarto-secondary-nav-title"></h1>'
376+ replacement = '<h5 class="quarto-secondary-nav-title">User Guide</h5>'
377+
378+ if original_pattern in content :
379+ print (f"Updating secondary nav title in: { html_file } " )
380+ content = content .replace (original_pattern , replacement )
381+
382+ with open (html_file , "w" ) as file :
383+ file .write (content )
384+
385+
365386print ("Finished processing all files" )
Original file line number Diff line number Diff line change @@ -263,3 +263,11 @@ a.sidebar-item-text.sidebar-link.text-start > span {
263263 background-position : 0% 50% ;
264264 }
265265}
266+
267+ /* Adjust mobile secondary nav positioning */
268+ @media (max-width : 991.98px ) {
269+ # quarto-header .container-fluid .d-flex {
270+ margin-left : 0 ;
271+ padding-left : 5px ;
272+ }
273+ }
You can’t perform that action at this time.
0 commit comments