mirror of
https://github.com/Alamantus/Lexiconga.git
synced 2025-03-31 16:50:57 +02:00
29 lines
813 B
JavaScript
29 lines
813 B
JavaScript
import { renderDictionaryDetails, renderPartsOfSpeech } from './details';
|
|
import { renderWords } from './words';
|
|
|
|
export function renderAll() {
|
|
renderTheme();
|
|
renderCustomCSS();
|
|
renderDictionaryDetails();
|
|
renderPartsOfSpeech();
|
|
renderWords();
|
|
}
|
|
|
|
export function renderTheme() {
|
|
const { theme } = window.currentDictionary.settings;
|
|
document.body.id = theme + 'Theme';
|
|
}
|
|
|
|
export function renderCustomCSS() {
|
|
const { customCSS } = window.currentDictionary.settings;
|
|
const stylingId = 'customCSS';
|
|
const stylingElement = document.getElementById(stylingId);
|
|
if (!stylingElement) {
|
|
const styling = document.createElement('style');
|
|
styling.id = stylingId;
|
|
styling.innerHTML = customCSS;
|
|
document.body.appendChild(styling);
|
|
} else {
|
|
stylingElement.innerHTML = customCSS;
|
|
}
|
|
}
|