Spaces:
Running
Running
Show current theme icon
Browse files
theme.js
CHANGED
|
@@ -31,8 +31,8 @@
|
|
| 31 |
root.dataset.theme = night ? "night" : "day";
|
| 32 |
|
| 33 |
button.textContent = night
|
| 34 |
-
? "
|
| 35 |
-
: "
|
| 36 |
|
| 37 |
button.setAttribute(
|
| 38 |
"aria-pressed",
|
|
@@ -42,8 +42,15 @@
|
|
| 42 |
button.setAttribute(
|
| 43 |
"aria-label",
|
| 44 |
night
|
| 45 |
-
? "Switch to
|
| 46 |
-
: "Switch to
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
);
|
| 48 |
}
|
| 49 |
|
|
|
|
| 31 |
root.dataset.theme = night ? "night" : "day";
|
| 32 |
|
| 33 |
button.textContent = night
|
| 34 |
+
? "🌙"
|
| 35 |
+
: "☀️";
|
| 36 |
|
| 37 |
button.setAttribute(
|
| 38 |
"aria-pressed",
|
|
|
|
| 42 |
button.setAttribute(
|
| 43 |
"aria-label",
|
| 44 |
night
|
| 45 |
+
? "Current theme: dark. Switch to light theme"
|
| 46 |
+
: "Current theme: light. Switch to dark theme",
|
| 47 |
+
);
|
| 48 |
+
|
| 49 |
+
button.setAttribute(
|
| 50 |
+
"title",
|
| 51 |
+
night
|
| 52 |
+
? "Switch to light theme"
|
| 53 |
+
: "Switch to dark theme",
|
| 54 |
);
|
| 55 |
}
|
| 56 |
|