Commit Graph

73 Commits

Author SHA1 Message Date
Dome b51ce9ab3f feat: add native code block feature with Prism highlighting and editor integration
- Implemented custom code block system for frontend and editors
- Integrated Prism.js for syntax highlighting (YAML + HTML support)
- Added copy-to-clipboard functionality with hover-based UI
- Introduced custom Gutenberg block for code input
- Added Classic Editor button for quick code insertion
- Implemented server-side rendering via the_content filter
- Added dedicated styling (code.css) with Dracula-inspired theme
- Added editor preview styling (editor.css) for visual consistency
- Ensured accessibility and keyboard support for copy button
- Optimized asset loading and versioning using filemtime()

This feature provides a lightweight, theme-native alternative to external code highlighting plugins.
2.6
2026-05-02 15:50:33 +02:00
Dome 3150f4da51 Merge branch 'main' of https://github.com/Domoel/Zeitfresser-Wordpress-Theme 2026-04-30 21:41:30 +02:00
Dome 1020442c06 refactor(inc, image-optimizer): restructure /inc architecture and standardize image optimizer module
- reorganized /inc directory structure for improved separation of concerns
  - grouped files into customizer, utilities, and tools
  - improved naming consistency across files (e.g. *-settings, template-tags, etc.)
  - simplified functions.php includes for better readability and maintainability

- refactored Customizer structure
  - extracted image optimizer settings from core-settings into dedicated module
  - consolidated settings, UI logic, and styles into a single feature file
  - improved naming consistency for hooks and functions

- standardized Image Optimizer admin tool
  - renamed "Performance Tools" to "Image Optimizer" across UI and hooks
  - updated admin page registration, callback names, and menu labels
  - aligned AJAX nonce naming for consistency and clarity

- preserved all existing logic and behavior (no functional changes)
- improved overall code organization and long-term maintainability

no breaking changes
2026-04-30 21:41:19 +02:00
Dome 81ed7efa1a enforce justify via css 2026-04-30 11:44:58 +02:00
Dome 84b2b85bf6 more robust toc scroll 2.5 2026-04-30 00:14:19 +02:00
Dome 3bcf9f47fb fixed toc progressbar 2026-04-29 23:23:31 +02:00
Dome 8ec3992945 fixec comment count alignment 2026-04-29 22:35:24 +02:00
Dome cac17ab39d fixed alignment and spacing, and highlight issues 2026-04-29 22:22:05 +02:00
Dome 042547c98f fixed fonts issue 2026-04-29 19:32:01 +02:00
Dome 33df5bbe2e refactor(css): restructure stylesheet, remove duplicates, and improve maintainability
* reorganized CSS into clear sections (Root, Base, Layout, Typography, Components, Utilities)
* removed redundant and duplicate rules (header, branding, search, media, etc.)
* consolidated repeated selectors into single sources of truth
* unified form styles (comments + CF7)
* cleaned up sidebar/widget styles and resolved conflicting rules
* fixed related posts grid issue (min-width: 0 for grid children)
* improved TOC structure and extracted shared calculations
* simplified social links and hover behavior
* removed unsafe global performance hint (will-change)
* added prefers-reduced-motion support for accessibility
* improved overall cascade predictability and reduced specificity conflicts

No visual changes intended (safe refactor).
2026-04-29 19:24:55 +02:00
Dome 798d3f9e1f Delete assets/community-badge.png 2026-04-27 09:24:12 +02:00
Dome d477c95917 Update readme.md 2026-04-27 09:23:44 +02:00
Dome 6bf38ae05d 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
2026-04-26 18:48:28 +02:00
Dome 36cad12351 Update style.css 2026-04-26 14:01:12 +02:00
Dome a9f1e799d4 refactor(toc): fix alignment and improve layout responsiveness
- add heuristic sidebar detection
- improve TOC positioning and width calculation
- enhance layout robustness across themes
2026-04-26 14:00:35 +02:00
Dome dbdaaff9f2 Update style.css 2026-04-26 08:44:15 +02:00
Dome 00341252a1 fix(toc): correct floating TOC alignment by resolving wrong sidebar reference
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.
2026-04-26 07:27:52 +02:00
Dome 05de6f2028 fix(toc): restore correct floating TOC positioning after layout refactor
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.
2026-04-26 04:43:04 +02:00
Dome 4408a738ec Update readme.md 2026-04-26 04:17:10 +02:00
Dome e5c716740c Merge branch 'main' of https://github.com/Domoel/Zeitfresser-Wordpress-Theme 2.0 2026-04-26 04:06:20 +02:00
Dome 001390457b Sync 2026-04-26 04:06:01 +02:00
Dome f479530c4c Merge branch 'main' of https://github.com/Domoel/Zeitfresser-Wordpress-Theme 2026-04-26 03:57:36 +02:00
Dome e3302b79a3 Update functions.php 2026-04-26 03:57:22 +02:00
Dome 2a28d94b4d introduce 2026-04-26 03:56:28 +02:00
Dome fafc46e007 up version 2026-04-26 03:17:02 +02:00
Dome 9f92958651 refactor(core): introduce modular architecture and restructure theme into clean, maintainable components
This commit introduces a complete internal refactoring of the theme architecture,
transitioning from a monolithic functions.php structure to a modular, scalable system.

### Key Changes

#### 1. Modular Architecture
- Extracted core logic into dedicated modules under `/inc/`
- Introduced clear separation of concerns:
  - `helpers/` → shared utility functions
  - `performance/` → optimization and media processing logic
  - `customizer/` → fully modularized Customizer structure
  - `template-*` → presentation and template-related logic

#### 2. Customizer Refactor
- Replaced legacy monolithic customizer with modular system:
  - `core.php` → base setup
  - `general.php`, `layout.php`, `toc.php`, `social.php` → feature-based modules
- Improved maintainability and extensibility for future settings

#### 3. Performance Layer Separation
- Moved performance-related logic into `/inc/performance/`
- Clearly separated:
  - frontend performance tweaks (scripts, CSS, cleanup)
  - media optimization tools (batch processing, cleanup UI)
- Reduced coupling between UI, logic, and processing

#### 4. Media Optimization Pipeline Stabilization
- Re-aligned upload pipeline with WordPress native flow
- Restored proper use of `wp_generate_attachment_metadata`
- Ensured compatibility with:
  - format conversion (AVIF/WebP)
  - responsive image generation
  - WordPress core image handling

#### 5. Cleaner Hook Management
- Removed duplicated hooks and redundant filters
- Standardized hook priorities and responsibilities
- Ensured consistent use of feature toggles (`get_theme_mod`)

#### 6. Improved Code Quality
- Reduced function duplication
- Standardized naming conventions
- Improved readability and inline documentation
- Removed legacy patterns and implicit dependencies

#### 7. Asset Handling Improvements
- Introduced centralized asset versioning via `filemtime`
- Improved script loading strategy (defer non-critical JS)
- Cleaner enqueue structure for styles and scripts

#### 8. Foundation for Future Development
This refactor lays the groundwork for:
- easier feature expansion
- better testability
- improved debugging capabilities
- long-term maintainability

### Breaking Changes
- Internal file structure has changed significantly
- Direct modifications to old functions.php logic may no longer apply
- Customizer extensions must now hook into modular structure

---

This is a purely structural and architectural release.
No intentional changes to frontend behavior were introduced,
but the internal system is now significantly more robust and maintainable.
2026-04-26 03:16:00 +02:00
Dome 787cdb31aa up version 2026-04-25 15:09:49 +02:00
Dome 7b5bd18dcd fix(performance): correctly disable cleanup button when no actionable items remain
- 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
2026-04-25 15:07:21 +02:00
Dome 937b36b27f up version 1.7.1 2026-04-25 10:22:58 +02:00
Dome 76902390e4 Merge branch 'main' of https://github.com/Domoel/Zeitfresser-Wordpress-Theme 2026-04-25 10:19:45 +02:00
Dome e1f7db91f8 fix(performance): delete all original image subsizes during cleanup
- 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
2026-04-25 10:19:33 +02:00
Dome 05c9a70e01 Update readme.md 2026-04-25 02:34:55 +02:00
Dome af8a9447b0 Update customizer.php 1.7 2026-04-25 02:26:19 +02:00
Dome b0eb1d9526 feat(performance): introduce image optimization pipeline with optional automation and cleanup
- 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
2026-04-25 02:18:25 +02:00
Dome c6b0919eb3 Update readme.md 1.6 2026-04-23 23:32:07 +02:00
Dome 4f87ca1475 Update readme.md 2026-04-23 23:30:48 +02:00
Dome 271b7fef7f Update readme.md 2026-04-23 23:30:07 +02:00
Dome 32f17f6e9d Update readme.md 2026-04-23 23:29:14 +02:00
Dome a7c71933a8 cleanup fonts.css 2026-04-23 23:15:33 +02:00
Dome a3f69b4118 Update style.css 2026-04-23 21:14:47 +02:00
Dome 84ebfcadf2 Update fonts.css 2026-04-23 21:13:40 +02:00
Dome 5152784a20 feat(typography): migrate from Google Fonts to local font hosting
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
2026-04-23 21:00:32 +02:00
Dome d066342413 Update style.css 1.5 2026-04-23 19:28:31 +02:00
Dome eaf31ba27e Update style.css 2026-04-23 18:52:29 +02:00
Dome 0d6ff33a68 functions.php fix 2026-04-23 18:45:30 +02:00
Dome d925911261 refactor(theme): remove dynamic styling systems and migrate to static CSS architecture
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.
1.4
2026-04-23 17:00:13 +02:00
Dome c06b2e25ba TOC optimizations 1.3 2026-04-22 10:47:30 +02:00
Dome 4424799bb0 TOC Optimizations 1.2 2026-04-22 08:30:54 +02:00
Dome 40001ac757 Update toc.js 1.1 2026-04-22 01:30:12 +02:00
Dome 1fc6cd3009 Update style.css 2026-04-22 01:27:05 +02:00