Proje dosyaları eklendi

This commit is contained in:
2026-08-29 15:53:53 +03:00
commit d3313400ca
440 changed files with 24827 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
(function (window, document) {
'use strict';
var labels = { light: 'Açık', dark: 'Karanlık', system: 'Sistem' };
var icons = { light: '☀', dark: '☾', system: '◐' };
function updateThemeControls(event) {
var state = event && event.detail ? event.detail : {
preference: window.ThemeManager.getPreference(),
resolved: window.ThemeManager.getResolvedTheme()
};
document.querySelectorAll('[data-theme-value]').forEach(function (button) {
var active = button.dataset.themeValue === state.preference;
button.classList.toggle('active', active);
button.setAttribute('aria-pressed', String(active));
});
document.querySelectorAll('[data-theme-current-label]').forEach(function (node) {
node.textContent = labels[state.preference];
});
document.querySelectorAll('[data-theme-current-icon]').forEach(function (node) {
node.textContent = icons[state.preference];
});
document.querySelectorAll('[data-theme-preference]').forEach(function (node) {
node.textContent = labels[state.preference];
});
document.querySelectorAll('[data-theme-resolved]').forEach(function (node) {
node.textContent = labels[state.resolved];
});
}
document.addEventListener('click', function (event) {
var button = event.target.closest('[data-theme-value]');
if (button) {
window.ThemeManager.setPreference(button.dataset.themeValue);
}
});
window.addEventListener('trafficpumper:theme-change', updateThemeControls);
updateThemeControls();
}(window, document));