Release v2.2.0

This commit is contained in:
2026-08-01 21:41:44 +01:00
parent c643d2fb07
commit d6417b667c
673 changed files with 146752 additions and 7389 deletions
+2 -53
View File
@@ -1,7 +1,8 @@
// Theme bootstrap script that applies the saved or preferred color scheme.
(function () {
var storageKey = 'lte-theme';
var theme = 'auto';
var ckeditorThemeStyleId = 'ckeditor-dark-theme-overrides';
function getPreferredTheme() {
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
@@ -11,57 +12,6 @@
return 'light';
}
function getOrCreateCkeditorThemeStyleElement() {
var styleElement = document.getElementById(ckeditorThemeStyleId);
if (styleElement) {
return styleElement;
}
styleElement = document.createElement('style');
styleElement.id = ckeditorThemeStyleId;
document.head.appendChild(styleElement);
return styleElement;
}
function syncCkeditorTheme(currentTheme) {
var styleElement = getOrCreateCkeditorThemeStyleElement();
if (currentTheme !== 'dark') {
styleElement.textContent = '';
return;
}
styleElement.textContent = [
'.ck.ck-dropdown__panel,',
'.ck.ck-list__panel,',
'.ck.ck-list,',
'.ck.ck-balloon-panel {',
' background: var(--bs-body-bg) !important;',
' background-color: var(--bs-body-bg) !important;',
' border-color: var(--bs-border-color) !important;',
' color: var(--bs-body-color) !important;',
'}',
'.ck.ck-list .ck-list-item-button {',
' background: transparent !important;',
' background-color: transparent !important;',
' color: var(--bs-body-color) !important;',
'}',
'.ck.ck-list .ck-list-item-button:hover {',
' background: var(--bs-secondary-bg) !important;',
' background-color: var(--bs-secondary-bg) !important;',
'}',
'.ck.ck-color-grid,',
'.ck.ck-color-grid__tile {',
' color: var(--bs-body-color) !important;',
'}',
'.ck.ck-color-grid__tile {',
' border-color: var(--bs-border-color) !important;',
'}'
].join('\n');
}
try {
var storedTheme = window.localStorage.getItem(storageKey);
if (storedTheme === 'dark' || storedTheme === 'light' || storedTheme === 'auto') {
@@ -73,5 +23,4 @@
document.documentElement.dataset.bsTheme = theme;
document.documentElement.style.colorScheme = theme;
syncCkeditorTheme(theme === 'auto' ? getPreferredTheme() : theme);
}());