diff options
Diffstat (limited to 'static/js/theme-mode.js')
-rw-r--r-- | static/js/theme-mode.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/static/js/theme-mode.js b/static/js/theme-mode.js index 58b58a1..c1f9bab 100644 --- a/static/js/theme-mode.js +++ b/static/js/theme-mode.js @@ -1,11 +1,16 @@ function switchTheme() { const currentStyle = currentTheme(); + var iconElement = document.getElementById('github-icon'); if (currentStyle == 'light') { setTheme('dark'); + iconElement.removeAttribute('fill'); + iconElement.setAttribute('class', 'octicon Header-link'); } else { setTheme('light'); + iconElement.setAttribute('fill', '#24292e'); + iconElement.setAttribute('class', 'Header-link'); } } @@ -25,4 +30,4 @@ function currentTheme() { (() => { setTheme(currentTheme()); -})();
\ No newline at end of file +})(); |