- 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
The floating TOC positioning logic assumed a correct sidebar reference
when calculating the horizontal offset. However, the selector used
(`aside, .sidebar, #secondary`) could match non-layout elements such as
hidden containers, mobile sidebars, or unrelated widgets.
This resulted in incorrect `getBoundingClientRect()` values and caused
the TOC to be positioned too far left or right, depending on which
element was matched.
Solution:
- Introduced a `getRealSidebar()` helper to dynamically detect the
visually relevant sidebar element.
- Filters out non-visible or irrelevant elements based on size.
- Selects the right-most valid candidate, ensuring correct layout context.
- Uses the actual gap between content and sidebar to position the TOC
symmetrically on the opposite side of the content.
Additional improvements:
- Cached sidebar lookup to avoid repeated DOM queries during scroll.
- Stabilized gap calculation with clamping to prevent layout drift.
Result:
The TOC now consistently aligns with the content column and mirrors
the sidebar spacing correctly across different layouts and breakpoints.
- Add AVIF/WebP conversion for uploads and legacy media
- Implement manual batch optimizer via Performance Tools dashboard
- Introduce automatic optimization toggle via Customizer
- Add optional automatic deletion of original images after optimization
- Ensure safe processing with versioned metadata and idempotent operations
- Decouple manual optimization from automation logic using force flag
- Add live progress UI for optimization and cleanup processes
- Improve UX with status indicators, dependency handling and warnings
This commit introduces a major internal refactor of the theme, replacing all
dynamic styling mechanisms with a fully static, CSS-based system.
The previous implementation relied on WordPress Customizer settings, PHP-based
style generation, and inline CSS injection for fonts, colors, and header behavior.
These systems have been completely removed and replaced with a deterministic
architecture using CSS variables and dedicated stylesheets.
Key changes:
- Removed dynamic font system (Google/local/inline CSS)
- Removed dynamic color system and Customizer controls
- Removed legacy compatibility layer (legacy-aliases.php)
- Removed custom header support and related UI (header image, text color)
- Eliminated inline <style> injection in wp_head
- Introduced static typography system via fonts.css
- Introduced static color system via colors.css
- Refactored style.css to rely entirely on CSS variables
- Cleaned up conflicting font declarations and redundant rules
- Simplified theme structure and reduced PHP overhead
- Aligned translation template with theme slug (zeitfresser.pot)
Result:
- Improved frontend performance and caching behavior
- Reduced PHP execution and complexity
- Fully deterministic rendering without runtime style mutations
- Cleaner, more maintainable codebase
No visual changes intended.