fix
This commit is contained in:
parent
758d5738ef
commit
75280d3072
@ -21,7 +21,7 @@ jQuery(function($) {
|
|||||||
|
|
||||||
_Blog.toggleTheme = function() {
|
_Blog.toggleTheme = function() {
|
||||||
const currentTheme = window.localStorage && window.localStorage.getItem('theme')
|
const currentTheme = window.localStorage && window.localStorage.getItem('theme')
|
||||||
const isDark = currentTheme === undefined || currentTheme === 'dark'
|
const isDark = currentTheme === null || currentTheme === 'dark'
|
||||||
$('body').toggleClass('dark-theme', isDark)
|
$('body').toggleClass('dark-theme', isDark)
|
||||||
$('.theme-switch').on('click', () => {
|
$('.theme-switch').on('click', () => {
|
||||||
$('body').toggleClass('dark-theme')
|
$('body').toggleClass('dark-theme')
|
||||||
|
Loading…
Reference in New Issue
Block a user