From 74cced0d4a39c488469ee4c56f7ea57cc0e8f1af Mon Sep 17 00:00:00 2001 From: Stephen Jianu Date: Sun, 25 Jan 2026 15:34:07 -0600 Subject: [PATCH] Add Sonic Pi theme --- sources/scripts/donsol.js | 11 +++++++++++ sources/scripts/player.js | 3 +++ sources/scripts/settings.js | 1 + 3 files changed, 15 insertions(+) diff --git a/sources/scripts/donsol.js b/sources/scripts/donsol.js index 02b0dd3..c1207ad 100644 --- a/sources/scripts/donsol.js +++ b/sources/scripts/donsol.js @@ -436,6 +436,17 @@ function Donsol () { b_low: '#fdf6e3', b_inv: '#cb4b16' } + this.sonicPiTheme = { + background: '#ffffff', + f_high: '#000000', + f_med: '#ed1e92', + f_low: '#aaaaaa', + f_inv: '#ffffff', + b_high: '#444444', + b_med: '#555555', + b_low: '#ced0ce', + b_inv: '#ed1e92' + } this.tapeTheme = { background: '#dad7cd', f_high: '#696861', diff --git a/sources/scripts/player.js b/sources/scripts/player.js index 29a9300..14a72e7 100644 --- a/sources/scripts/player.js +++ b/sources/scripts/player.js @@ -266,6 +266,9 @@ function Player () { if (theme_value.localeCompare('solarizedLight') === 0) { new_theme = donsol.solarizedLightTheme } + if (theme_value.localeCompare('sonicPi') === 0) { + new_theme = donsol.sonicPiTheme + } if (theme_value.localeCompare('tape') === 0) { new_theme = donsol.tapeTheme } diff --git a/sources/scripts/settings.js b/sources/scripts/settings.js index d14a05a..b4522cb 100644 --- a/sources/scripts/settings.js +++ b/sources/scripts/settings.js @@ -49,6 +49,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.addEventListener('mousedown', () => { donsol.player.change_theme(this.theme_button.value) }) this.theme_button.addEventListener('change', () => { donsol.player.change_theme(this.theme_button.value) })