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.
Fix incorrect TOC alignment caused by outdated DOM selector in toc.js.
The content reference element changed during layout refactor, breaking
position calculations for the floating TOC.
Updated contentColumn selector to use .main-wrapper/.container fallback,
ensuring correct left offset and responsive positioning.
Also adds a more robust fallback chain to prevent future regressions
when layout structure changes.
- Fix initial state where cleanup button stayed enabled after full cleanup
- Extend logic to detect "nothing to clean" cases:
- no optimized images available for cleanup
- all originals already deleted
- Align PHP initial render logic with runtime JS behavior
- Improve UX consistency between page load and live updates
- Extend cleanup logic to remove full original image family (including subsizes)
- Fix issue where only the main original file was deleted
- Ensure consistent behavior for both manual batch processing and auto-delete
- Improve cleanup safety by validating optimization state before deletion
- 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
feat(typography): migrate from Google Fonts to local font hosting
Replaced external Google Fonts integration with locally hosted font files
for Oswald and Roboto.
- Added local @font-face definitions for Oswald (400, 500, 700)
- Added local @font-face definitions for Roboto (400, 500, 700)
- Removed Google Fonts enqueue and external requests
- Implemented unicode-range optimized font loading (latin subset)
- Fixed font file path inconsistencies causing fallback rendering
- Ensured correct font-weight mapping across all variants
- Maintained existing typography system via CSS variables
Result:
- No external font requests (fonts.googleapis.com / fonts.gstatic.com removed)
- Improved performance and privacy (GDPR compliant)
- Consistent rendering with original Google Fonts appearance
- Full control over font loading and optimization
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.