diff --git a/assets/js/zen-mode.js b/assets/js/zen-mode.js index 9d6d4a82..ec6cabdb 100644 --- a/assets/js/zen-mode.js +++ b/assets/js/zen-mode.js @@ -24,13 +24,14 @@ function _toogleZenMode(zendModeButton) { if (body.classList.contains('zen-mode-enable')) { // Persist configuration - localStorage.setItem('blowfish-zen-mode-enabled', 'true'); + //localStorage.setItem('blowfish-zen-mode-enabled', 'true'); + // Change title to enable zendModeButton.setAttribute('title', titleI18nEnable) // Auto-scroll to title article window.scrollTo(window.scrollX, header.getBoundingClientRect().top - 90); } else { - localStorage.setItem('blowfish-zen-mode-enabled', 'false'); + //localStorage.setItem('blowfish-zen-mode-enabled', 'false'); zendModeButton.setAttribute('title', titleI18nDisable); document.querySelector('body').scrollIntoView(); } @@ -56,10 +57,10 @@ function _registerZendModeButtonClick(zendModeButton) { } // Initialize localstorage option 'blowfish-zen-mode-enabled' to false, if it does not exist, otherwise enable it. - if (localStorage.getItem('blowfish-zen-mode-enabled') === null) { - localStorage.setItem('blowfish-zen-mode-enabled', 'false'); - } else if (localStorage.getItem('blowfish-zen-mode-enabled') === 'true') { - _toogleZenMode(zendModeButton) - } + //if (localStorage.getItem('blowfish-zen-mode-enabled') === null) { + // localStorage.setItem('blowfish-zen-mode-enabled', 'false'); + //} else if (localStorage.getItem('blowfish-zen-mode-enabled') === 'true') { + // _toogleZenMode(zendModeButton) + //} }); })(); \ No newline at end of file diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 11319d68..daa8507d 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -44,7 +44,7 @@ smartTOCHideUnfocusedChildren = false showMoreLinkDest = "docs" cardView = false cardViewScreenWidth = false - layoutBackgroundBlur = true # only used when layout equals background + layoutBackgroundBlur = false # only used when layout equals background [article] showDate = false diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 87b1e790..de661e7b 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -232,6 +232,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `article.showWordCount` | `false` | Whether or not article word counts are displayed. | | `article.showComments` | `false` | Whether or not the [comments partial]({{< ref "partials#comments" >}}) is included after the article footer. | | `article.sharingLinks` | _Not set_ | Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed. Available values are: "linkedin", "twitter", "reddit", "pinterest", "facebook", "email", "whatsapp", and "telegram" | +| `article.showZenMode` | `true` | Flag to activate Zen Mode reading feature for articles. | ### List