added theme slector

This commit is contained in:
AUnicornWithNoLife 2021-07-10 10:02:05 +01:00
parent 3951205c47
commit 8edcf37761
3 changed files with 17 additions and 3 deletions

View File

@ -78,9 +78,12 @@
<br> <br>
<br> <br>
<select name="Theme" id="theme-sel"> <select name="Theme" id="theme-sel"></select>
</select> <br>
<br>
<button onmousedown="updateTheme();" id='theme-up'>Update</button>
</th> </th>
</tr> </tr>
</table> </table>

View File

@ -68,6 +68,12 @@ button:hover
width: 150px; width: 150px;
} }
#theme-up
{
height: 50px;
width: 150px;
}
.win .win
{ {
border-radius: 12px; border-radius: 12px;

View File

@ -35,6 +35,11 @@ function setupTheme()
}); });
} }
function updateTheme()
{
setTheme(themesel.options[themesel.selectedIndex].value);
}
function setTheme(name) function setTheme(name)
{ {
root.style.setProperty('--theme-back', themes[name].back); root.style.setProperty('--theme-back', themes[name].back);