2025-05-04 15:58:33 +08:00
|
|
|
<div class="flex h-14 w-full items-center gap-2 px-4">
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
2025-06-18 19:42:26 +08:00
|
|
|
onclick="document.dispatchEvent(new CustomEvent('basecoat:sidebar'))"
|
2025-06-12 10:37:19 +08:00
|
|
|
aria-label="Toggle sidebar"
|
|
|
|
|
data-tooltip="Toggle sidebar"
|
2025-05-04 15:58:33 +08:00
|
|
|
data-side="bottom"
|
|
|
|
|
data-align="start"
|
|
|
|
|
class="btn-sm-icon-ghost mr-auto size-7 -ml-1.5"
|
|
|
|
|
>
|
|
|
|
|
{% lucide "panel-left" %}
|
|
|
|
|
</button>
|
2025-05-06 17:30:23 +08:00
|
|
|
<select
|
|
|
|
|
class="select h-8 leading-none"
|
2025-06-12 18:44:17 +08:00
|
|
|
id="theme-select"
|
2025-05-06 17:30:23 +08:00
|
|
|
>
|
|
|
|
|
<option value="">Default</option>
|
|
|
|
|
<option value="claude">Claude</option>
|
|
|
|
|
<option value="doom-64">Doom 64</option>
|
|
|
|
|
<option value="supabase">Supabase</option>
|
2025-05-04 15:58:33 +08:00
|
|
|
</select>
|
2025-06-12 18:44:17 +08:00
|
|
|
<script>
|
2025-06-13 14:14:38 +08:00
|
|
|
(() => {
|
2025-06-12 18:44:17 +08:00
|
|
|
const themeSelect = document.getElementById('theme-select');
|
|
|
|
|
const storedTheme = localStorage.getItem('themeVariant');
|
|
|
|
|
if (themeSelect && storedTheme) themeSelect.value = storedTheme;
|
|
|
|
|
themeSelect.addEventListener('change', () => {
|
|
|
|
|
const newTheme = themeSelect.value;
|
|
|
|
|
document.documentElement.classList.forEach(c => {
|
|
|
|
|
if (c.startsWith('theme-')) document.documentElement.classList.remove(c);
|
|
|
|
|
});
|
|
|
|
|
if (newTheme) {
|
|
|
|
|
document.documentElement.classList.add(`theme-${newTheme}`);
|
|
|
|
|
localStorage.setItem('themeVariant', newTheme);
|
|
|
|
|
} else {
|
|
|
|
|
localStorage.removeItem('themeVariant');
|
|
|
|
|
}
|
|
|
|
|
});
|
2025-06-13 14:14:38 +08:00
|
|
|
})();
|
2025-06-12 18:44:17 +08:00
|
|
|
</script>
|
2026-06-01 15:10:35 +08:00
|
|
|
<select
|
|
|
|
|
class="select h-8 leading-none"
|
|
|
|
|
id="style-select"
|
|
|
|
|
>
|
|
|
|
|
<option value="vega">Vega</option>
|
|
|
|
|
<option value="nova">Nova</option>
|
|
|
|
|
<option value="maia">Maia</option>
|
|
|
|
|
<option value="lyra">Lyra</option>
|
|
|
|
|
<option value="mira">Mira</option>
|
|
|
|
|
<option value="luma">Luma</option>
|
|
|
|
|
<option value="sera">Sera</option>
|
|
|
|
|
<option value="rhea">Rhea</option>
|
|
|
|
|
</select>
|
|
|
|
|
<script>
|
|
|
|
|
(() => {
|
|
|
|
|
const styleSelect = document.getElementById('style-select');
|
|
|
|
|
const styleLink = document.getElementById('style-variant-stylesheet');
|
|
|
|
|
const applyStyle = (styleName) => {
|
|
|
|
|
const nextStyle = styleName || 'vega';
|
|
|
|
|
document.documentElement.dataset.styleVariant = nextStyle;
|
|
|
|
|
if (nextStyle === 'vega') {
|
|
|
|
|
styleLink.removeAttribute('href');
|
|
|
|
|
} else {
|
|
|
|
|
styleLink.href = `/assets/style-${nextStyle}.css`;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const storedStyle = localStorage.getItem('styleVariant') || 'vega';
|
|
|
|
|
if (styleSelect) styleSelect.value = storedStyle;
|
|
|
|
|
applyStyle(storedStyle);
|
|
|
|
|
|
|
|
|
|
styleSelect.addEventListener('change', () => {
|
|
|
|
|
const newStyle = styleSelect.value || 'vega';
|
|
|
|
|
applyStyle(newStyle);
|
|
|
|
|
localStorage.setItem('styleVariant', newStyle);
|
|
|
|
|
});
|
|
|
|
|
})();
|
|
|
|
|
</script>
|
2025-06-12 18:44:17 +08:00
|
|
|
|
2025-05-04 15:58:33 +08:00
|
|
|
<button
|
|
|
|
|
type="button"
|
2025-06-12 18:44:17 +08:00
|
|
|
aria-label="Toggle dark mode"
|
|
|
|
|
data-tooltip="Toggle dark mode"
|
2025-05-04 15:58:33 +08:00
|
|
|
data-side="bottom"
|
2025-06-18 19:42:26 +08:00
|
|
|
onclick="document.dispatchEvent(new CustomEvent('basecoat:theme'))"
|
2025-05-04 15:58:33 +08:00
|
|
|
class="btn-icon-outline size-8"
|
|
|
|
|
>
|
2025-06-12 18:44:17 +08:00
|
|
|
<span class="hidden dark:block">{% lucide "sun" %}</span>
|
|
|
|
|
<span class="block dark:hidden">{% lucide "moon" %}</span>
|
2025-05-04 15:58:33 +08:00
|
|
|
</button>
|
2025-05-09 09:57:37 +08:00
|
|
|
<a
|
2025-05-09 09:57:54 +08:00
|
|
|
href="https://github.com/hunvreus/basecoat"
|
2025-05-09 09:57:37 +08:00
|
|
|
class="btn-icon size-8"
|
|
|
|
|
target="_blank"
|
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
|
data-tooltip="GitHub repository"
|
|
|
|
|
data-side="bottom"
|
|
|
|
|
data-align="end"
|
|
|
|
|
>
|
|
|
|
|
{% lucide "github" %}
|
|
|
|
|
</a>
|
2026-06-01 15:10:35 +08:00
|
|
|
</div>
|