Skip to content

Commit d09402d

Browse files
authored
Update Component.svelte
1 parent df773b8 commit d09402d

1 file changed

Lines changed: 18 additions & 13 deletions

File tree

src/lib/Footer/Component.svelte

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,61 +4,67 @@
44
let props = $props();
55
66
let displayedTheme = $state("light");
7+
78
const themeUpdate = (event) => {
89
const isDark = event.target.value === "dark";
9-
localStorage.setItem("pm:dark", isDark);
10-
11-
const customEvent = new CustomEvent("penguinmod-dark-updated", { detail: isDark });
10+
localStorage.setItem("tm:dark", isDark);
11+
12+
const customEvent = new CustomEvent("turtlemod-dark-updated", { detail: isDark });
1213
document.dispatchEvent(customEvent);
13-
}
14+
};
15+
1416
const updateDisplayedTheme = () => {
15-
const darkTheme = String(localStorage.getItem("pm:dark")) === "true";
17+
const darkTheme = String(localStorage.getItem("tm:dark")) === "true";
1618
displayedTheme = darkTheme ? "dark" : "light";
1719
};
1820
1921
if (browser) {
20-
document.addEventListener("penguinmod-dark-updated", () => {
22+
document.addEventListener("turtlemod-dark-updated", () => {
2123
updateDisplayedTheme();
2224
});
2325
updateDisplayedTheme();
2426
}
2527
</script>
2628

2729
<div style="height: 24px"></div>
30+
2831
<div class="footer">
2932
<span>
30-
PenguinMod is not affiliated with TurboWarp, Scratch, the Scratch Team, or
33+
TurtleMod is not affiliated with TurboWarp, Scratch, the Scratch Team, or
3134
the Scratch Foundation.
3235
</span>
3336
<span>
3437
Scratch is a project of the Scratch Foundation.
3538
It is available for free at <a href="https://scratch.org/">https://scratch.org/</a>.
3639
</span>
3740
</div>
41+
3842
<div class="links">
3943
<a
4044
target="_blank"
41-
href="https://github.com/PenguinMod/PenguinMod-ExtensionsGallery"
45+
href="https://github.com/TurtleMod-Team/TurtleMod-ExtensionsGallery"
4246
>
4347
GitHub
4448
</a>
4549
<span style="margin: 0px 6px;">-</span>
4650
<a
4751
target="_blank"
48-
href="https://github.com/PenguinMod/PenguinMod-ExtensionsGallery/blob/main/README.md"
52+
href="https://github.com/TurtleMod-Team/TurtleMod-ExtensionsGallery/blob/main/README.md"
4953
>
5054
Submitting an extension
5155
</a>
52-
<span style="margin: 0px 6px;">-</span>
53-
<a target="_blank" href="https://discord.gg/NZ9MBMYTZh">Discord</a>
5456
</div>
57+
5558
<div style="height: 12px"></div>
59+
5660
<div class="footer">
5761
<div>
5862
{@render props.children?.()}
5963
</div>
6064
</div>
65+
6166
<div style="height: 12px"></div>
67+
6268
<div class="footer">
6369
<select
6470
value={displayedTheme}
@@ -77,16 +83,15 @@
7783
7884
.links {
7985
width: 100%;
80-
8186
display: flex;
8287
flex-direction: row;
8388
justify-content: center;
8489
align-items: center;
8590
}
91+
8692
.footer {
8793
width: 100%;
8894
margin-bottom: 4px;
89-
9095
display: flex;
9196
flex-direction: column;
9297
align-items: center;

0 commit comments

Comments
 (0)