File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ function generateIndexHtml() {
162
162
163
163
<div id="app-container">
164
164
<button id="hamburger-menu" aria-label="Toggle menu">☰</button>
165
- <nav id="sidebar" class="overlay">
165
+ <nav id="sidebar" class="collapsed overlay">
166
166
<div class="sidebar-content">
167
167
<ul id="app-links">
168
168
${ appLinks }
Original file line number Diff line number Diff line change @@ -108,7 +108,6 @@ function updateThemeColorFromIframe() {
108
108
// Set the content attribute to the iframe's body background color
109
109
themeMetaTag . content = backgroundColor ;
110
110
console . log ( `Updated theme color to: ${ backgroundColor } ` ) ;
111
-
112
111
} else {
113
112
console . warn ( "Could not retrieve background-color from iframe body." ) ;
114
113
}
@@ -146,7 +145,8 @@ function monitorIframeBackgroundColor() {
146
145
mutation . attributeName === "style"
147
146
) {
148
147
// The style attribute changed, re-run the update function
149
- updateThemeColorFromIframe ( ) ;
148
+ // Wait for the next animation frame to ensure computed styles are ready.
149
+ requestAnimationFrame ( updateThemeColorFromIframe ) ;
150
150
}
151
151
}
152
152
} ) ;
@@ -196,7 +196,7 @@ function initializeAppUI() {
196
196
collapseSidebar ( ) ;
197
197
const href = link . getAttribute ( "href" ) ;
198
198
199
- // The link is already active and loaded
199
+ // The link is already active and loaded
200
200
if ( iframe . getAttribute ( "src" ) === href ) {
201
201
return ;
202
202
}
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ iframe {
175
175
.sidebar-content {
176
176
display : flex;
177
177
flex-direction : column;
178
- height : 80 % ;
178
+ height : 82 % ;
179
179
}
180
180
181
181
.version-label {
You can’t perform that action at this time.
0 commit comments