Skip to content

Commit db889d2

Browse files
authored
Minor updates
1 parent 2117939 commit db889d2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

build-pwa.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function generateIndexHtml() {
162162
163163
<div id="app-container">
164164
<button id="hamburger-menu" aria-label="Toggle menu">☰</button>
165-
<nav id="sidebar" class="overlay">
165+
<nav id="sidebar" class="collapsed overlay">
166166
<div class="sidebar-content">
167167
<ul id="app-links">
168168
${appLinks}

static/app_script.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ function updateThemeColorFromIframe() {
108108
// Set the content attribute to the iframe's body background color
109109
themeMetaTag.content = backgroundColor;
110110
console.log(`Updated theme color to: ${backgroundColor}`);
111-
112111
} else {
113112
console.warn("Could not retrieve background-color from iframe body.");
114113
}
@@ -146,7 +145,8 @@ function monitorIframeBackgroundColor() {
146145
mutation.attributeName === "style"
147146
) {
148147
// 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);
150150
}
151151
}
152152
});
@@ -196,7 +196,7 @@ function initializeAppUI() {
196196
collapseSidebar();
197197
const href = link.getAttribute("href");
198198

199-
// The link is already active and loaded
199+
// The link is already active and loaded
200200
if (iframe.getAttribute("src") === href) {
201201
return;
202202
}

static/app_stylesheet.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ iframe {
175175
.sidebar-content {
176176
display: flex;
177177
flex-direction: column;
178-
height: 80%;
178+
height: 82%;
179179
}
180180

181181
.version-label {

0 commit comments

Comments
 (0)