This commit is contained in:
Meutel 2018-12-22 22:49:03 +01:00
parent 758d5738ef
commit 75280d3072

View File

@ -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')