|
4 | 4 | let props = $props(); |
5 | 5 |
|
6 | 6 | let displayedTheme = $state("light"); |
| 7 | +
|
7 | 8 | const themeUpdate = (event) => { |
8 | 9 | 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 }); |
12 | 13 | document.dispatchEvent(customEvent); |
13 | | - } |
| 14 | + }; |
| 15 | +
|
14 | 16 | const updateDisplayedTheme = () => { |
15 | | - const darkTheme = String(localStorage.getItem("pm:dark")) === "true"; |
| 17 | + const darkTheme = String(localStorage.getItem("tm:dark")) === "true"; |
16 | 18 | displayedTheme = darkTheme ? "dark" : "light"; |
17 | 19 | }; |
18 | 20 |
|
19 | 21 | if (browser) { |
20 | | - document.addEventListener("penguinmod-dark-updated", () => { |
| 22 | + document.addEventListener("turtlemod-dark-updated", () => { |
21 | 23 | updateDisplayedTheme(); |
22 | 24 | }); |
23 | 25 | updateDisplayedTheme(); |
24 | 26 | } |
25 | 27 | </script> |
26 | 28 |
|
27 | 29 | <div style="height: 24px"></div> |
| 30 | + |
28 | 31 | <div class="footer"> |
29 | 32 | <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 |
31 | 34 | the Scratch Foundation. |
32 | 35 | </span> |
33 | 36 | <span> |
34 | 37 | Scratch is a project of the Scratch Foundation. |
35 | 38 | It is available for free at <a href="https://scratch.org/">https://scratch.org/</a>. |
36 | 39 | </span> |
37 | 40 | </div> |
| 41 | + |
38 | 42 | <div class="links"> |
39 | 43 | <a |
40 | 44 | target="_blank" |
41 | | - href="https://github.com/PenguinMod/PenguinMod-ExtensionsGallery" |
| 45 | + href="https://github.com/TurtleMod-Team/TurtleMod-ExtensionsGallery" |
42 | 46 | > |
43 | 47 | GitHub |
44 | 48 | </a> |
45 | 49 | <span style="margin: 0px 6px;">-</span> |
46 | 50 | <a |
47 | 51 | 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" |
49 | 53 | > |
50 | 54 | Submitting an extension |
51 | 55 | </a> |
52 | | - <span style="margin: 0px 6px;">-</span> |
53 | | - <a target="_blank" href="https://discord.gg/NZ9MBMYTZh">Discord</a> |
54 | 56 | </div> |
| 57 | + |
55 | 58 | <div style="height: 12px"></div> |
| 59 | + |
56 | 60 | <div class="footer"> |
57 | 61 | <div> |
58 | 62 | {@render props.children?.()} |
59 | 63 | </div> |
60 | 64 | </div> |
| 65 | + |
61 | 66 | <div style="height: 12px"></div> |
| 67 | + |
62 | 68 | <div class="footer"> |
63 | 69 | <select |
64 | 70 | value={displayedTheme} |
|
77 | 83 |
|
78 | 84 | .links { |
79 | 85 | width: 100%; |
80 | | - |
81 | 86 | display: flex; |
82 | 87 | flex-direction: row; |
83 | 88 | justify-content: center; |
84 | 89 | align-items: center; |
85 | 90 | } |
| 91 | +
|
86 | 92 | .footer { |
87 | 93 | width: 100%; |
88 | 94 | margin-bottom: 4px; |
89 | | -
|
90 | 95 | display: flex; |
91 | 96 | flex-direction: column; |
92 | 97 | align-items: center; |
|
0 commit comments