This repository has been archived on 2022-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
teemant-old/public/js/theme.js

47 lines
820 B
JavaScript
Raw Normal View History

2016-09-28 18:00:57 +00:00
function swapSheet(name) {
document.querySelector("#theme_stylesheet").setAttribute('href', "css/"+name+".css");
}
window.themes = {
available: {
default: {
name: "Default",
type: "bright",
nick_pallete: {
H: [1, 360],
S: [30, 100],
L: [30, 70]
},
stylesheet: "theme_default",
default: true,
colorSamples: {
toolbar: "#00c7e0",
background: "#f5f5f5"
}
},
night: {
name: "Night",
type: "dark",
nick_pallete: {
H: [1, 360],
S: [30, 100],
2016-10-01 15:28:53 +00:00
L: [50, 100]
2016-09-28 18:00:57 +00:00
},
stylesheet: "theme_night",
default: false,
colorSamples: {
toolbar: "#008e8e",
background: "#1d1d1d"
}
}
},
change_theme: function(name) {
if(name in themes.available) {
swapSheet(themes.available[name].stylesheet);
window.irc.config.theme = name;
}
}
}