Skip to content

Commit b5d715d

Browse files
Update index.js
1 parent 65753fd commit b5d715d

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

js/index.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7412,12 +7412,13 @@ function setupCollapsibleSettings() {
74127412
icon.className = 'material-symbols-rounded';
74137413
icon.textContent = 'expand_more';
74147414
icon.style.transition = 'transform 0.3s ease';
7415-
// Default state is expanded (pointing up)
7416-
icon.style.transform = 'rotate(180deg)';
7415+
// Default state is collapsed (pointing down)
7416+
icon.style.transform = 'rotate(0deg)';
74177417

74187418
heading.appendChild(icon);
74197419

74207420
const content = heading.nextElementSibling;
7421+
content.style.display = 'none'; // Collapse by default
74217422

74227423
heading.addEventListener('click', () => {
74237424
if (content.style.display === 'none') {
@@ -10793,6 +10794,18 @@ function closeControls() {
1079310794
customizeModal.classList.remove('show'); // Start animation
1079410795
blurOverlayControls.classList.remove('show');
1079510796

10797+
// Collapse all settings sections when closing
10798+
const homeSettings = document.querySelector('.settings-grid.home-settings');
10799+
if (homeSettings) {
10800+
homeSettings.querySelectorAll('h4').forEach(heading => {
10801+
const icon = heading.querySelector('.material-symbols-rounded');
10802+
const content = heading.nextElementSibling;
10803+
10804+
if (content) content.style.display = 'none';
10805+
if (icon) icon.style.transform = 'rotate(0deg)';
10806+
});
10807+
}
10808+
1079610809
setTimeout(() => {
1079710810
customizeModal.style.display = 'none'; // Hide after animation
1079810811
blurOverlayControls.style.display = 'none';

0 commit comments

Comments
 (0)