add true deployment on taskfile, fix new light theme and catppuccin theme
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
(function () {
|
||||
function currentSystemTheme() {
|
||||
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'tokyo' : 'light';
|
||||
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'macchiato' : 'light';
|
||||
}
|
||||
|
||||
var btn = document.getElementById('theme-toggle');
|
||||
if (btn) {
|
||||
btn.addEventListener('click', function () {
|
||||
var current = document.documentElement.getAttribute('data-theme') || 'light';
|
||||
var next = current === 'light' ? 'tokyo' : 'light';
|
||||
var next = current === 'light' ? 'macchiato' : 'light';
|
||||
document.documentElement.setAttribute('data-theme', next);
|
||||
localStorage.setItem('poc-theme', next);
|
||||
window.dispatchEvent(new Event('theme-change'));
|
||||
|
||||
Reference in New Issue
Block a user