refactor(toc, customizer): improve TOC architecture and reorganize customizer settings

- Reorganized Customizer structure for improved clarity and maintainability
- Introduced consistent default values for all settings to ensure stable fallbacks
  when no user preferences are defined

- Refactored scroll-driven TOC implementation:
  - Optimized scroll handling using requestAnimationFrame
  - Reduced layout thrashing and unnecessary DOM reads
  - Improved heading detection logic (deterministic viewport trigger)
  - Enhanced positioning logic (responsive alignment + sidebar awareness)
  - Improved footer collision handling for more robust layout behavior

- Added optional IntersectionObserver-based TOC implementation:
  - Event-driven alternative to scroll-based approach
  - Currently not enabled by default
  - May not be supported long-term due to less deterministic behavior

- General cleanup and internal consistency improvements

chore: bump version to 2.4.0
This commit is contained in:
2026-04-26 18:48:28 +02:00
parent 36cad12351
commit 6bf38ae05d
8 changed files with 864 additions and 91 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ Author: Zeitfresser
Author URI: https://ztfr.eu/
Theme URI: https://ztfr.eu/
Description: Zeitfresser Wordpress Theme
Version: 2.2
Version: 2.4
Tested up to: 6.2
Requires PHP: 7.0
License: GNU General Public License v2 or later