]> Stephen's Gitweb - donsol-js.git/commitdiff
Add label in front of Theme button feature/theme
authorStephen Jianu <stephen@stephenjianu.com>
Sun, 25 Jan 2026 21:40:36 +0000 (15:40 -0600)
committerStephen Jianu <stephen@stephenjianu.com>
Sun, 25 Jan 2026 21:40:36 +0000 (15:40 -0600)
sources/links/main.css
sources/scripts/settings.js

index e7d4cc682f6871ef1af83fcb170f5ae492ead6c4..a1491395ac7c7e961a370f0edb8dbf77996a9bcf 100644 (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; }
\ No newline at end of file
+#difficulty:hover { text-decoration: underline; cursor: pointer; }
index d1ebc4d4ebea4775b212b239b63d384a5121fee1..3cf2cadcfa5236a3a2d230b4c48059c340a850da 100644 (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