Fix: subtopics hidden by default via CSS

This commit is contained in:
Kato committed 2026-09-02 22:32:10 +00:00
1 parent 11cf280bbe
commit 150989aa7d
2 files changed
+10 -4

No files matched your search

+8 -2
View File
@@ -344,8 +344,14 @@ async function loadWiki() {
// Toggle topic on click
topicTitle.onclick = () => {
console.log('Topic clicked:', topicName, 'current hidden:', subtopicsDiv.classList.contains('hidden'));
subtopicsDiv.classList.toggle('hidden');
console.log('After toggle, hidden:', subtopicsDiv.classList.contains('hidden'));
// Subtopics should be hidden by default, show them when topic clicked
if (subtopicsDiv.classList.contains('hidden')) {
subtopicsDiv.classList.remove('hidden');
console.log('Showing subtopics');
} else {
subtopicsDiv.classList.add('hidden');
console.log('Hiding subtopics');
}
};
subtopics.forEach(sub => {