File tree Expand file tree Collapse file tree
tutorial/single_page_book_app Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99</ head >
1010< body >
1111< header class ="main-header ">
12- < button id ="toggle-sidebar "> ☰</ button >
1312 < div class ="header-buttons ">
14- <!-- Placeholder for additional buttons -->
13+ </ div >
14+
15+ < div class ="header-buttons ">
1516 < a href ="https://github.com " target ="_blank " class ="header-btn "> GitHub</ a >
1617 </ div >
1718</ header >
@@ -25,8 +26,8 @@ <h1>Immediate GUI Tutorial</h1>
2526 < main id ="content-area-wrapper ">
2627 < div id ="content-area "> </ div >
2728 </ main >
28- < aside id ="code-panel ">
29- < div id =" breadcrumb-container " class ="vertical-breadcrumbs "> </ div >
29+ < aside id ="sections-sidebar ">
30+ < div class ="sections-sidebar "> </ div >
3031 </ aside >
3132</ div >
3233< div id ="canvas-window " class ="draggable-resizable ">
Original file line number Diff line number Diff line change 11import { initTOC , tocRoot } from "./toc_loader.js" ;
22import { loadPage } from "./page_loader.js" ;
33import { registerCanvasDragEvents } from "./canvas_drag"
4- import { registerSidebarToggle } from "./toggle_sidebars.js" ;
54import { initializePyodideHelper , runPythonCode } from "./pyodide_helper.js" ;
65
76async function initializeAll ( ) {
87 await initTOC ( ) ;
98 registerCanvasDragEvents ( ) ;
10- registerSidebarToggle ( ) ;
119 const rootPage = tocRoot ( )
1210 loadPage ( rootPage . file + ".md" ) ;
1311
Original file line number Diff line number Diff line change 11import { marked } from "marked" ;
22import { baseUrl } from "marked-base-url" ;
33import { prepareCodeEditors } from "./code_editor.js" ;
4- import { updateBreadcrumbs } from "./breadcrumbs .js" ;
4+ import { updatePageSections } from "./page_sections .js" ;
55
66// Custom renderer to preserve `{literalinclude}` directives
77const renderer = new marked . Renderer ( ) ;
@@ -23,5 +23,5 @@ export async function loadPage(mdPath) {
2323 await prepareCodeEditors ( mdText , baseUrlPath ) ;
2424
2525 // Update breadcrumbs after the content is loaded
26- updateBreadcrumbs ( ) ;
26+ updatePageSections ( ) ;
2727}
Original file line number Diff line number Diff line change 1- export function updateBreadcrumbs ( ) {
1+ export function updatePageSections ( ) {
22 const contentArea = document . getElementById ( "content-area" ) ;
33 const h2Elements = contentArea . querySelectorAll ( "h2" ) ;
4- const breadcrumbContainer = document . querySelector ( ".vertical-breadcrumbs " ) ;
4+ const sectionsContainer = document . querySelector ( ".sections-sidebar " ) ;
55
66 // Clear previous breadcrumbs
7- breadcrumbContainer . innerHTML = "" ;
7+ sectionsContainer . innerHTML = "" ;
88
99 // Create a list of H2 headings as vertical links
1010 h2Elements . forEach ( ( h2 ) => {
@@ -17,6 +17,6 @@ export function updateBreadcrumbs() {
1717 const link = document . createElement ( "a" ) ;
1818 link . href = `#${ h2 . id } ` ;
1919 link . textContent = h2 . textContent ;
20- breadcrumbContainer . appendChild ( link ) ;
20+ sectionsContainer . appendChild ( link ) ;
2121 } ) ;
2222}
Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ body {
214214/* ==========================
215215 Breadcrumbs
216216========================== */
217- .vertical-breadcrumbs {
217+ .sections-sidebar {
218218 grid-area : canvas;
219219 display : flex;
220220 flex-direction : column;
@@ -226,14 +226,14 @@ body {
226226 height : 100% ;
227227}
228228
229- .vertical-breadcrumbs a {
229+ .sections-sidebar a {
230230 color : # 007bff ;
231231 padding : 0.25rem 0.5rem ;
232232 border-radius : 4px ;
233233 text-decoration : none;
234234}
235235
236- .vertical-breadcrumbs a : hover {
236+ .sections-sidebar a : hover {
237237 background-color : # f0f8ff ;
238238}
239239
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments