Merge pull request #1526 from nunocoracao/1521-zen-mode-doenst-work-when-toc-is-disabled

🐛 fix https://github.com/nunocoracao/blowfish/issues/1521
This commit is contained in:
Nuno Coração 2024-06-08 12:21:41 +01:00 committed by GitHub
commit ef71d07bc3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 43 additions and 41 deletions

View file

@ -11,7 +11,9 @@ function _toogleZenMode(zendModeButton) {
body.classList.toggle('zen-mode-enable');
// Show/Hide 'toc right' and 'toc inside'
if (tocRight)
tocRight.classList.toggle('lg:block');
if (tocInside)
tocInside.classList.toggle('lg:hidden');
// Change width of article content
@ -50,7 +52,7 @@ function _registerZendModeButtonClick(zendModeButton) {
window.addEventListener("DOMContentLoaded", (event) => {
// Register click on 'zen-mode-button' node element
const zendModeButton = document.getElementById('zen-mode-button');
if(zendModeButton !== null && zendModeButton !== undefined) {
if (zendModeButton !== null && zendModeButton !== undefined) {
_registerZendModeButtonClick(zendModeButton);
}
});

View file

@ -67,7 +67,7 @@ smartTOCHideUnfocusedChildren = false
showPagination = true
invertPagination = false
showReadingTime = true
showTableOfContents = true
showTableOfContents = false
showRelatedContent = true
relatedContentLimit = 6
showTaxonomies = true