]> Stephen's Gitweb - donsol-js.git/commitdiff
Add Obsidian theme feature/theme
authorStephen Jianu <stephen@stephenjianu.com>
Mon, 14 Oct 2024 01:53:40 +0000 (20:53 -0500)
committerStephen Jianu <stephen@stephenjianu.com>
Mon, 14 Oct 2024 01:53:40 +0000 (20:53 -0500)
sources/scripts/donsol.js
sources/scripts/player.js
sources/scripts/settings.js

index 0bf565cb077dd32e61047d5317009e12e21d9f22..b9dda2f8b33a74bbed8eb43b886df995b7ab0ab8 100644 (file)
@@ -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',
index fd555425325cc03df5c964348c47a46cd0d79497..c76ea9ac67450e8122771fb7e4ba496a4b73fd2f 100644 (file)
@@ -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
     }
index d740833108e4ae5a06654217c503c4bca5b88569..7e34a185266d3105fc9874c79c7a91ece6faa11f 100644 (file)
@@ -37,6 +37,7 @@ function Settings () {
     this.theme_button.innerHTML += '<option value=\"ninetynine\">Ninety Nine</option>'
     this.theme_button.innerHTML += '<option value=\"noir\">Noir</option>'
     this.theme_button.innerHTML += '<option value=\"nord\">Nord</option>'
+    this.theme_button.innerHTML += '<option value=\"obsidian\">Obsidian</option>'
     this.theme_button.innerHTML += '<option value=\"roguelite\">Roguelite</option>'
     this.theme_button.innerHTML += '<option value=\"tape\">Tape</option>'
     this.theme_button.addEventListener('mousedown', () => { donsol.player.change_theme(this.theme_button.value) })