Add label in front of Theme button

This commit is contained in:
Stephen Jianu 2026-01-25 15:40:36 -06:00
commit f152c43046
2 changed files with 9 additions and 2 deletions

View file

@ -13,6 +13,7 @@ body { background:black; font-family: 'input_mono_regular',monospace; min-width:
#player .button:hover { cursor: pointer; }
#player select.button { appearance: none;-webkit-appearance: none;background-color: transparent; }
#player .settings { text-align: right; }
#player span.label { color:white; }
#player div#timeline { display: inline-block;color:white; transition: opacity 250ms; opacity: 0 }
#player div#timeline b { font-family: 'input_mono_medium',monospace; }
@ -36,4 +37,4 @@ body { background:black; font-family: 'input_mono_regular',monospace; min-width:
#board card:nth-child(3), #table card:nth-child(3) { position:absolute; left:50%;}
#board card:nth-child(4), #table card:nth-child(4) { position:absolute; left:75%;}
#difficulty:hover { text-decoration: underline; cursor: pointer; }
#difficulty:hover { text-decoration: underline; cursor: pointer; }

View file

@ -2,15 +2,20 @@
function Settings () {
this.element = null
this.theme_label = null
this.theme_button = null
this.install = function () {
this.element = document.createElement('div')
this.element.setAttribute('class', 'settings')
this.theme_label = document.createElement('span')
this.theme_label.setAttribute('class', 'label')
this.theme_label.innerHTML = 'Theme: '
this.theme_button = document.createElement('select')
this.theme_button.setAttribute('class', 'theme button')
this.theme_button.innerHTML = '<option value=\"theme\">Theme (default)</option>'
this.theme_button.innerHTML = '<option value=\"theme\">Default</option>'
this.theme_button.innerHTML += '<option value=\"apollo\">Apollo</option>'
this.theme_button.innerHTML += '<option value=\"battlestation\">Battlestation</option>'
this.theme_button.innerHTML += '<option value=\"berry\">Berry</option>'
@ -59,6 +64,7 @@ function Settings () {
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) })
this.element.appendChild(this.theme_label)
this.element.appendChild(this.theme_button)
return this.element