implemented spaces, fixed login and signup, thought creation and space creation.
This commit is contained in:
+34
@@ -0,0 +1,34 @@
|
||||
const darkThemeMq = window.matchMedia("(prefers-color-scheme: dark)");
|
||||
if (darkThemeMq.matches) {
|
||||
const link = document.createElement("link");
|
||||
link.rel = "stylesheet";
|
||||
link.type = "text/css";
|
||||
link.href = "css/dark.css";
|
||||
document.head.appendChild(link);
|
||||
// Theme set to dark.
|
||||
} else {
|
||||
const link = document.createElement("link");
|
||||
link.rel = "stylesheet";
|
||||
link.type = "text/css";
|
||||
link.href = "css/light.css";
|
||||
document.head.appendChild(link);
|
||||
// Theme set to light.
|
||||
}
|
||||
|
||||
darkThemeMq.addEventListener("change", (e) => {
|
||||
if (e.matches) {
|
||||
const link = document.createElement("link");
|
||||
link.rel = "stylesheet";
|
||||
link.type = "text/css";
|
||||
link.href = "css/dark.css";
|
||||
document.head.appendChild(link);
|
||||
// Theme set to dark.
|
||||
} else {
|
||||
const link = document.createElement("link");
|
||||
link.rel = "stylesheet";
|
||||
link.type = "text/css";
|
||||
link.href = "css/light.css";
|
||||
document.head.appendChild(link);
|
||||
// Theme set to light.
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user