From: Stephen Jianu Date: Mon, 14 Oct 2024 01:53:40 +0000 (-0500) Subject: Add Obsidian theme X-Git-Url: https://stephenjianu.com/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Ffeature%2Ftheme;p=donsol-js.git Add Obsidian theme --- diff --git a/sources/scripts/donsol.js b/sources/scripts/donsol.js index 0bf565c..b9dda2f 100644 --- a/sources/scripts/donsol.js +++ b/sources/scripts/donsol.js @@ -304,6 +304,17 @@ function Donsol () { b_low: '#3B4252', b_inv: '#ABCDCC' } + this.obsidianTheme = { + background: '#22282a', + f_high: '#f1f2f3', + f_med: '#93c763', + f_low: '#ec7600', + f_inv: '#963a46', + b_high: '#678cb1', + b_med: '#4f6164', + b_low: '#42464C', + b_inv: '#ffcd22' + } this.rogueliteTheme = { background: '#352b31', f_high: '#f5f5d4', diff --git a/sources/scripts/player.js b/sources/scripts/player.js index fd55542..c76ea9a 100644 --- a/sources/scripts/player.js +++ b/sources/scripts/player.js @@ -230,6 +230,9 @@ function Player () { if (theme_value.localeCompare('nord') === 0) { new_theme = donsol.nordTheme } + if (theme_value.localeCompare('obsidian') === 0) { + new_theme = donsol.obsidianTheme + } if (theme_value.localeCompare('roguelite') === 0) { new_theme = donsol.rogueliteTheme } diff --git a/sources/scripts/settings.js b/sources/scripts/settings.js index d740833..7e34a18 100644 --- a/sources/scripts/settings.js +++ b/sources/scripts/settings.js @@ -37,6 +37,7 @@ function Settings () { this.theme_button.innerHTML += '' this.theme_button.innerHTML += '' this.theme_button.innerHTML += '' + this.theme_button.innerHTML += '' this.theme_button.innerHTML += '' this.theme_button.innerHTML += '' this.theme_button.addEventListener('mousedown', () => { donsol.player.change_theme(this.theme_button.value) })