|
|
@ -33,8 +33,10 @@ module.exports = { |
|
|
|
|
|
|
|
|
|
|
|
switchTheme: function (theme) { |
|
|
|
switchTheme: function (theme) { |
|
|
|
var themeStorage = new Storage('style:') |
|
|
|
var themeStorage = new Storage('style:') |
|
|
|
console.log(document) |
|
|
|
|
|
|
|
themeStorage.set('theme', theme) |
|
|
|
themeStorage.set('theme', theme) |
|
|
|
|
|
|
|
if (themes[theme]) { |
|
|
|
|
|
|
|
document.getElementById('theme-link').setAttribute('href', themes[theme]) |
|
|
|
|
|
|
|
}
|
|
|
|
// if (theme === 'dark') {
|
|
|
|
// if (theme === 'dark') {
|
|
|
|
// return styleGuideDark()
|
|
|
|
// return styleGuideDark()
|
|
|
|
// } else if (theme === 'light') {
|
|
|
|
// } else if (theme === 'light') {
|
|
|
@ -44,19 +46,5 @@ module.exports = { |
|
|
|
// } else {
|
|
|
|
// } else {
|
|
|
|
// return styleGuideLight()
|
|
|
|
// return styleGuideLight()
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// // Boostrap themes
|
|
|
|
|
|
|
|
// // TODO : Put it somewhere else
|
|
|
|
|
|
|
|
// const themes = {
|
|
|
|
|
|
|
|
// dark: 'https://bootstrap.themes.guide/darkster/theme.min.css',
|
|
|
|
|
|
|
|
// light: 'https://bootstrap.themes.guide/herbie/theme.min.css',
|
|
|
|
|
|
|
|
// clean: 'https://bootstrap.themes.guide/signal/theme.min.css'
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (themes[theme]) {
|
|
|
|
|
|
|
|
// document.getElementById('theme-link').setAttribute('href', themes[theme])
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// else {
|
|
|
|
|
|
|
|
// document.getElementById('theme-link').setProperty('href', themes['light'])
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|