diff --git a/src/AppTopBar.vue b/src/AppTopBar.vue index 96f4461e6..519120c5b 100755 --- a/src/AppTopBar.vue +++ b/src/AppTopBar.vue @@ -21,18 +21,18 @@
  • Saga GreenSaga Green
  • Saga PurpleSaga Purple
  • Saga OrangeSaga Orange
  • -
  • Vela BlueVela Blue
  • -
  • Vela GreenVela Green
  • -
  • Vela PurpleVela Purple
  • -
  • Vela OrangeVela Orange
  • +
  • Vela BlueVela Blue
  • +
  • Vela GreenVela Green
  • +
  • Vela PurpleVela Purple
  • +
  • Vela OrangeVela Orange
  • Nova LightNova Light
  • Nova DarkNova Dark
  • Nova ColoredNova Colored
  • Nova VueNova Vue
  • -
  • Luna AmberLuna Amber
  • -
  • Luna BlueLuna Blue
  • -
  • Luna GreenLuna Green
  • -
  • Luna PinkLuna Pink
  • +
  • Luna AmberLuna Amber
  • +
  • Luna BlueLuna Blue
  • +
  • Luna GreenLuna Green
  • +
  • Luna PinkLuna Pink
  • RheaRhea
  • @@ -94,25 +94,25 @@ export default { let themeElement = document.getElementById('theme-link'); themeElement.setAttribute('href', themeElement.getAttribute('href').replace(this.theme, theme)); this.theme = theme; - const hasBodyDarkTheme = this.hasClass(document.body, 'dark-theme'); if (dark) { - if (!hasBodyDarkTheme) { - this.addClass(document.body, 'dark-theme'); - } + this.addClass(document.body, dark); } - else if(hasBodyDarkTheme) { + else { this.removeClass(document.body, 'dark-theme'); + this.removeClass(document.body, 'dark-theme-alt'); } this.activeMenuIndex = null; event.preventDefault(); }, addClass(element, className) { - if (element.classList) - element.classList.add(className); - else - element.className += ' ' + className; + if (!this.hasClass(element, className)) { + if (element.classList) + element.classList.add(className); + else + element.className += ' ' + className; + } }, removeClass(element, className) { if (element.classList) diff --git a/src/assets/styles/app.scss b/src/assets/styles/app.scss index 21297381e..8ea123a8c 100644 --- a/src/assets/styles/app.scss +++ b/src/assets/styles/app.scss @@ -1519,7 +1519,6 @@ pre[class*="language-"] code { top: 100px; } -/* Dark Theme such as luna-amber, luna-blue, luna-green and luna-pink */ .dark-theme { .implementation { background-color: #3f3f3f !important; @@ -1535,3 +1534,19 @@ pre[class*="language-"] code { } } } + +.dark-theme-alt { + .implementation { + background-color: #151e27 !important; + color: #ebedef !important; + } + + > h3, + > h4 { + color: #ebedef !important + } + + .demo-footer { + background-color: #151e27 !important; + } +} \ No newline at end of file