Scope TOC to article body only and use language string for title

- Move data-toc-scope from outer column to .article-content div so
  the TOC only sees headings inside the article body, ignoring page
  headers and article titles.
- Pass $scope explicitly in the JS auto-init so headings outside the
  article content are never picked up.
- Replace hardcoded article title in TOC heading with a
  TPL_MOKOCASSIOPEIA_TOC_TITLE language string ("Table of Contents").
- Add Text use statement to both toc-left.php and toc-right.php.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-04 11:28:45 -05:00
parent 93e9d3a88c
commit 81e89db88c
5 changed files with 12 additions and 7 deletions

View File

@@ -66,6 +66,7 @@ TPL_MOKOCASSIOPEIA_FONT_NOTE_TEXT="Loading fonts from external sources might be
; ===== Header & navigation (Theme tab) =====
TPL_MOKOCASSIOPEIA_STICKY_LABEL="Sticky Header"
TPL_MOKOCASSIOPEIA_BACKTOTOP="Back to Top"
TPL_MOKOCASSIOPEIA_TOC_TITLE="Table of Contents"
TPL_MOKOCASSIOPEIA_BACKTOTOP_LABEL="Back-to-top Link"
TPL_MOKOCASSIOPEIA_TOC="Table of Contents"

View File

@@ -66,6 +66,7 @@ TPL_MOKOCASSIOPEIA_FONT_NOTE_TEXT="Loading fonts from external sources might be
; ===== Header & navigation (Theme tab) =====
TPL_MOKOCASSIOPEIA_STICKY_LABEL="Sticky Header"
TPL_MOKOCASSIOPEIA_BACKTOTOP="Back to Top"
TPL_MOKOCASSIOPEIA_TOC_TITLE="Table of Contents"
TPL_MOKOCASSIOPEIA_BACKTOTOP_LABEL="Back-to-top Link"
TPL_MOKOCASSIOPEIA_TOC="Table of Contents"