fix: correct toggleIcons to use .cv-paper instead of .cv-container
The CSS rules for showing/hiding icons target .cv-paper, not .cv-container. Changed toggleIcons function to: - Add/remove .show-icons class on .cv-paper (not .cv-container) - This matches the CSS selectors in logo-toggle.css Bug: Icons toggle wasn't working because class was being applied to wrong element Fix: Apply .show-icons to .cv-paper to match CSS rules
This commit is contained in:
@@ -132,8 +132,8 @@ end
|
||||
|
||||
def toggleCVLength(isLong)
|
||||
set paper to the first .cv-paper
|
||||
set lengthCheckbox to the first #cv-length-toggle
|
||||
set menuLengthCheckbox to the first #menu-cv-length-toggle
|
||||
set lengthCheckbox to the first #lengthToggle
|
||||
set menuLengthCheckbox to the first #lengthToggleMenu
|
||||
|
||||
-- Update DOM state
|
||||
if isLong is true
|
||||
@@ -154,20 +154,20 @@ def toggleCVLength(isLong)
|
||||
end
|
||||
|
||||
def toggleIcons(showIcons)
|
||||
set container to the first .cv-container
|
||||
set iconsCheckbox to the first #icons-toggle
|
||||
set menuIconsCheckbox to the first #menu-icons-toggle
|
||||
set paper to the first .cv-paper
|
||||
set iconsCheckbox to the first #iconToggle
|
||||
set menuIconsCheckbox to the first #iconToggleMenu
|
||||
|
||||
-- Update DOM state
|
||||
if showIcons is true
|
||||
remove .hide-icons from container
|
||||
add .show-icons to paper
|
||||
set iconsCheckbox's checked to true
|
||||
set menuIconsCheckbox's checked to true
|
||||
call localStorage.setItem('cv-icons', 'show')
|
||||
end
|
||||
|
||||
if showIcons is false
|
||||
add .hide-icons to container
|
||||
remove .show-icons from paper
|
||||
set iconsCheckbox's checked to false
|
||||
set menuIconsCheckbox's checked to false
|
||||
call localStorage.setItem('cv-icons', 'hide')
|
||||
@@ -176,8 +176,8 @@ end
|
||||
|
||||
def toggleTheme(isClean)
|
||||
set container to the first .cv-container
|
||||
set themeCheckbox to the first #theme-toggle
|
||||
set menuThemeCheckbox to the first #menu-theme-toggle
|
||||
set themeCheckbox to the first #themeToggle
|
||||
set menuThemeCheckbox to the first #themeToggleMenu
|
||||
|
||||
-- Update DOM state
|
||||
if isClean is true
|
||||
|
||||
Reference in New Issue
Block a user