light theme! crt now disabled by default
This commit is contained in:
parent
cdcc7466e5
commit
c6afc274c2
9 changed files with 355 additions and 315 deletions
16
public/script/index.js
Normal file
16
public/script/index.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
const hexPrimary = document.getElementById("hex-primary");
|
||||
const hexSecondary = document.getElementById("hex-secondary");
|
||||
const hexTertiary = document.getElementById("hex-tertiary");
|
||||
|
||||
function updateHexColours() {
|
||||
const style = getComputedStyle(document.body);
|
||||
hexPrimary.textContent = style.getPropertyValue('--primary');
|
||||
hexSecondary.textContent = style.getPropertyValue('--secondary');
|
||||
hexTertiary.textContent = style.getPropertyValue('--tertiary');
|
||||
}
|
||||
|
||||
updateHexColours();
|
||||
|
||||
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
|
||||
updateHexColours();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue