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 2c4489917a - Show all commits

View file

@ -60,14 +60,11 @@ function changeTheme(id: string, url: string) {
const fetchThemes = async () => {
for (const theme of defaultThemes) {
const themeConfig = await fetch(`${baseURL}themes/${theme}.json`)
const themeConfigJson = await themeConfig.json() as Theme
themeConfigJson.id = theme
const themeConfig = await $fetch(`${baseURL}themes/${theme}.json`) as Theme
themeConfig.id = theme
themes.push(themeConfigJson)
themes.push(themeConfig)
}
console.log(themes)
}
await fetchThemes()