mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
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:
@@ -11,7 +11,9 @@ function _toogleZenMode(zendModeButton) {
|
|||||||
body.classList.toggle('zen-mode-enable');
|
body.classList.toggle('zen-mode-enable');
|
||||||
|
|
||||||
// Show/Hide 'toc right' and 'toc inside'
|
// Show/Hide 'toc right' and 'toc inside'
|
||||||
|
if (tocRight)
|
||||||
tocRight.classList.toggle('lg:block');
|
tocRight.classList.toggle('lg:block');
|
||||||
|
if (tocInside)
|
||||||
tocInside.classList.toggle('lg:hidden');
|
tocInside.classList.toggle('lg:hidden');
|
||||||
|
|
||||||
// Change width of article content
|
// Change width of article content
|
||||||
@@ -50,7 +52,7 @@ function _registerZendModeButtonClick(zendModeButton) {
|
|||||||
window.addEventListener("DOMContentLoaded", (event) => {
|
window.addEventListener("DOMContentLoaded", (event) => {
|
||||||
// Register click on 'zen-mode-button' node element
|
// Register click on 'zen-mode-button' node element
|
||||||
const zendModeButton = document.getElementById('zen-mode-button');
|
const zendModeButton = document.getElementById('zen-mode-button');
|
||||||
if(zendModeButton !== null && zendModeButton !== undefined) {
|
if (zendModeButton !== null && zendModeButton !== undefined) {
|
||||||
_registerZendModeButtonClick(zendModeButton);
|
_registerZendModeButtonClick(zendModeButton);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ smartTOCHideUnfocusedChildren = false
|
|||||||
showPagination = true
|
showPagination = true
|
||||||
invertPagination = false
|
invertPagination = false
|
||||||
showReadingTime = true
|
showReadingTime = true
|
||||||
showTableOfContents = true
|
showTableOfContents = false
|
||||||
showRelatedContent = true
|
showRelatedContent = true
|
||||||
relatedContentLimit = 6
|
relatedContentLimit = 6
|
||||||
showTaxonomies = true
|
showTaxonomies = true
|
||||||
|
|||||||
Reference in New Issue
Block a user