Skip to content

Commit ea8e854

Browse files
authored
Update Frontend.html
1 parent 6fbf56c commit ea8e854

File tree

1 file changed

+32
-22
lines changed

1 file changed

+32
-22
lines changed

domains/Frontend.html

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,36 +1206,55 @@ <h3>Next Steps</h3>
12061206
</div>
12071207

12081208
<script>
1209+
// Toggle substeps - needs to be global for onclick attributes
1210+
function toggleSubsteps(id, element) {
1211+
const substeps = document.getElementById(id);
1212+
if (substeps) {
1213+
substeps.classList.toggle('collapsed');
1214+
element.classList.toggle('collapsed');
1215+
}
1216+
}
1217+
1218+
// Close mobile sidebar - needs to be global
1219+
function closeMobileSidebar() {
1220+
const mobileSidebar = document.getElementById('mobileSidebar');
1221+
const mobileSidebarOverlay = document.getElementById('mobileSidebarOverlay');
1222+
if (mobileSidebar) mobileSidebar.classList.remove('active');
1223+
if (mobileSidebarOverlay) mobileSidebarOverlay.classList.remove('active');
1224+
document.body.style.overflow = '';
1225+
}
1226+
12091227
// Wait for DOM to be fully loaded
1210-
document.addEventListener('DOMContentLoaded', function() {
1228+
window.addEventListener('load', function() {
1229+
console.log('Page loaded, initializing...');
1230+
12111231
// Mobile sidebar toggle functionality
12121232
const mobileContentToggle = document.getElementById('mobileContentToggle');
12131233
const mobileSidebar = document.getElementById('mobileSidebar');
12141234
const mobileSidebarOverlay = document.getElementById('mobileSidebarOverlay');
12151235
const mobileCloseBtn = document.getElementById('mobileCloseBtn');
12161236

1237+
console.log('Mobile button:', mobileContentToggle);
1238+
console.log('Mobile sidebar:', mobileSidebar);
1239+
12171240
function openMobileSidebar() {
12181241
console.log('Opening mobile sidebar');
1219-
mobileSidebar.classList.add('active');
1220-
mobileSidebarOverlay.classList.add('active');
1242+
if (mobileSidebar) mobileSidebar.classList.add('active');
1243+
if (mobileSidebarOverlay) mobileSidebarOverlay.classList.add('active');
12211244
document.body.style.overflow = 'hidden';
12221245
}
12231246

1224-
window.closeMobileSidebar = function() {
1225-
console.log('Closing mobile sidebar');
1226-
mobileSidebar.classList.remove('active');
1227-
mobileSidebarOverlay.classList.remove('active');
1228-
document.body.style.overflow = '';
1229-
}
1230-
12311247
if (mobileContentToggle) {
1232-
mobileContentToggle.addEventListener('click', openMobileSidebar);
1248+
mobileContentToggle.addEventListener('click', function(e) {
1249+
console.log('Button clicked!');
1250+
openMobileSidebar();
1251+
});
12331252
}
12341253
if (mobileCloseBtn) {
1235-
mobileCloseBtn.addEventListener('click', window.closeMobileSidebar);
1254+
mobileCloseBtn.addEventListener('click', closeMobileSidebar);
12361255
}
12371256
if (mobileSidebarOverlay) {
1238-
mobileSidebarOverlay.addEventListener('click', window.closeMobileSidebar);
1257+
mobileSidebarOverlay.addEventListener('click', closeMobileSidebar);
12391258
}
12401259

12411260
// Resizable sidebar functionality (desktop)
@@ -1292,15 +1311,6 @@ <h3>Next Steps</h3>
12921311
});
12931312
});
12941313
});
1295-
1296-
// Toggle substeps - needs to be global for onclick attributes
1297-
function toggleSubsteps(id, element) {
1298-
const substeps = document.getElementById(id);
1299-
if (substeps) {
1300-
substeps.classList.toggle('collapsed');
1301-
element.classList.toggle('collapsed');
1302-
}
1303-
}
13041314
</script>
13051315

13061316
<!-- Placeholder for the footer -->

0 commit comments

Comments
 (0)