@@ -110,11 +110,6 @@ function attachAllListeners() {
110
110
111
111
const documentableBriefs = document . querySelectorAll ( ".documentableBrief" ) ;
112
112
[ ...documentableBriefs ] . forEach ( ( brief ) => {
113
- console . log (
114
- brief . parentElement . parentElement . parentElement . previousElementSibling
115
- . children [ 0 ] ,
116
- ) ;
117
-
118
113
brief . addEventListener ( "click" , ( ) => {
119
114
brief . parentElement . parentElement . parentElement . parentElement . classList . add (
120
115
"expand" ,
@@ -187,12 +182,12 @@ function attachAllListeners() {
187
182
) ;
188
183
189
184
const toggleShowAllElem = ( element ) => {
190
- if ( element . textContent == "Show all" ) {
191
- element . textContent = "Collapse"
185
+ if ( element . textContent == "Show all" ) {
186
+ element . textContent = "Collapse" ;
192
187
} else {
193
- element . textContent = "Show all"
188
+ element . textContent = "Show all" ;
194
189
}
195
- }
190
+ } ;
196
191
197
192
document . querySelectorAll ( ".supertypes" ) . forEach ( ( el ) =>
198
193
el . lastElementChild . addEventListener ( "click" , ( ) => {
@@ -313,10 +308,22 @@ function attachAllListeners() {
313
308
// when document is loaded graph needs to be shown
314
309
}
315
310
316
- const DYNAMIC_PAGE_LOAD = "dynamicPageLoad"
311
+ const DYNAMIC_PAGE_LOAD = "dynamicPageLoad" ;
317
312
window . addEventListener ( DYNAMIC_PAGE_LOAD , ( ) => {
318
- attachAllListeners ( )
319
- } )
313
+ attachAllListeners ( ) ;
314
+ } ) ;
315
+
316
+ window . addEventListener ( "dynamicPageLoad" , ( ) => {
317
+ const leftColumn = document . querySelector ( ".show" ) ;
318
+ if ( leftColumn ) leftColumn . classList . remove ( "show" ) ;
319
+
320
+ const mobileSidebarToggleButton = document . querySelector ( ".menu-shown" ) ;
321
+ if ( mobileSidebarToggleButton )
322
+ mobileSidebarToggleButton . classList . remove ( "menu-shown" ) ;
323
+
324
+ const content = document . querySelector ( ".sidebar-shown" ) ;
325
+ if ( content ) content . classList . remove ( "sidebar-shown" ) ;
326
+ } ) ;
320
327
321
328
window . addEventListener ( "DOMContentLoaded" , ( ) => {
322
329
hljs . registerLanguage ( "scala" , highlightDotty ) ;
0 commit comments