Skip to content

Add zoom example to rendertest#1140

Closed
linawolf wants to merge 4 commits intomainfrom
pr-1139
Closed

Add zoom example to rendertest#1140
linawolf wants to merge 4 commits intomainfrom
pr-1139

Conversation

@linawolf
Copy link
Copy Markdown
Member

No description provided.

CybotTM and others added 3 commits December 23, 2025 00:04
This commit adds support for the :zoom: option on figure directives,
allowing documentation authors to specify different zoom modes for
images.

Supported zoom values:
- lightbox (default) - Dialog overlay
- gallery - PhotoSwipe-style with wheel zoom
- inline - In-place zoom
- lens - Magnifier lens
- css-only - No JS fallback
- none or false - Disable zoom

Example usage:
.. figure:: /Images/screenshot.png
   :zoom: lightbox

   Caption text.

Changes:
- Added custom FigureDirective in T3Docs\Typo3DocsTheme\Directives
- Registered FigureDirective in typo3-docs-theme.php config
- Updated figure.html.twig template to output data-zoom attribute
- FigureNode now receives and stores the zoom option

The implementation extends phpDocumentor's figure directive by adding
the zoom option to the FigureNode, which is then rendered as a
data-zoom attribute in the HTML output.
- Added _component_image_zoom.scss with styles for all 5 zoom modes
- Added image-zoom.js with zoom functionality (lightbox, gallery, inline, lens, css-only)
- Imported SCSS in theme.scss
- JS auto-included via Gruntfile (assets/js/*.js -> theme.min.js)

Accessibility features:
- Full keyboard navigation (Tab, Enter, ESC, arrows)
- ARIA roles and screen reader support
- Focus trap and focus return for modals
- Reduced motion support
@linawolf linawolf marked this pull request as draft December 24, 2025 10:42
@linawolf linawolf changed the title Pr 1139 Add zoom example to rendertest Dec 24, 2025
@CybotTM
Copy link
Copy Markdown
Contributor

CybotTM commented Dec 27, 2025

added to #1139 - may be closed

@linawolf
Copy link
Copy Markdown
Member Author

Thank you

@linawolf linawolf closed this Dec 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants