Add theme switching!!!! #18

Merged
twig merged 9 commits from settings-appearance into main 2025-07-05 17:29:46 +00:00
Showing only changes of commit 2d8475b20a - Show all commits

View file

@ -58,7 +58,7 @@ function changeTheme(id: string, url: string) {
themeLinkElement.href = `${baseURL}themes/${url}`;
}
const fetchThemes = async () => {
async function fetchThemes() {

Convert to regular function rather than arrow function. (Forgot to comment on this before)

Convert to regular function rather than arrow function. (Forgot to comment on this before)
for (const theme of defaultThemes) {
const themeConfig = await $fetch(`${baseURL}themes/${theme}.json`) as Theme

Use $fetch instead of fetch, which among other things automatically parses the body.

Use `$fetch` instead of `fetch`, which among other things automatically parses the body.
themeConfig.id = theme