Merge pull request #2001 from hayduke-io/zenmode_fix

🐛Fix zen mode footer line bug
This commit is contained in:
Nuno Coração 2025-03-29 23:30:34 +00:00 committed by GitHub
commit c4ae51b557
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -5,6 +5,7 @@ function _toogleZenMode(zendModeButton) {
const tocInside = document.querySelector('.toc-inside');
const articleContent = document.querySelector('.article-content');
const header = document.querySelector('#single_header');
const footer = document.querySelector(''#single_footer''); // Add footer ref for class transformation
// Add semantic class into body tag
@ -24,6 +25,10 @@ function _toogleZenMode(zendModeButton) {
header.classList.toggle('max-w-full');
header.classList.toggle('max-w-prose');
// Change width of article footer
header.classList.toggle('max-w-full');
header.classList.toggle('max-w-prose');
// Read i18n title from data-attributes
const titleI18nDisable = zendModeButton.getAttribute('data-title-i18n-disable');
const titleI18nEnable = zendModeButton.getAttribute('data-title-i18n-enable');

View file

@ -150,7 +150,7 @@
{{ end }}
</section>
<footer class="pt-8 max-w-prose print:hidden">
<footer id="single_footer" class="pt-8 max-w-prose print:hidden">
{{ partial "article-pagination.html" . }}
{{ if .Params.showComments | default (.Site.Params.article.showComments | default false) }}