a scaffolding project for svelte and tailwindcss + daisyui
cp -Rv {current folder} {target folder}
cd {target folder}
sh reset.sh
默认使用daisyui的luxury主题:
<html lang="en" data-theme="luxury">
...
如果想允许用户可以切换不同的theme, 可以考虑使用theme-change
<script>
import { themeChange } from 'theme-change'
...
onMount(async () => {
themeChange(false)
...
})
</script>
<select id="theme-select" data-choose-theme class="select">
<option value="Business">Default</option>
<option value="dark">Dark</option>
<option value="dracula">Dracula</option>
<option value="luxury">luxury</option>
<option value="Coffee">Coffee</option>
</select>
data-choose-theme
is the key!