mirror of
https://github.com/Alamantus/Lexiconga.git
synced 2025-05-25 19:40:06 +02:00
37 lines
968 B
JavaScript
37 lines
968 B
JavaScript
|
import { renderDescription, renderDetails, renderStats } from './render';
|
||
|
|
||
|
export function showSection(sectionName) {
|
||
|
switch (sectionName) {
|
||
|
case 'description': showDescription(); break;
|
||
|
case 'details': showDetails(); break;
|
||
|
case 'stats': showStats(); break;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export function hideDetailsPanel() {
|
||
|
document.getElementById('detailsPanel').style.display = 'none';
|
||
|
}
|
||
|
|
||
|
export function getIsDetailsPanelDisplayed() {
|
||
|
return document.getElementById('detailsPanel').style.display !== 'none';
|
||
|
}
|
||
|
|
||
|
function showDescription() {
|
||
|
const detailsPanel = document.getElementById('detailsPanel');
|
||
|
detailsPanel.style.display = 'block';
|
||
|
|
||
|
renderDescription();
|
||
|
}
|
||
|
|
||
|
function showDetails() {
|
||
|
const detailsPanel = document.getElementById('detailsPanel');
|
||
|
detailsPanel.style.display = 'block';
|
||
|
renderDetails();
|
||
|
}
|
||
|
|
||
|
function showStats() {
|
||
|
const detailsPanel = document.getElementById('detailsPanel');
|
||
|
detailsPanel.style.display = 'block';
|
||
|
renderStats();
|
||
|
}
|