_components/quire-figure.webc: defines a <figure> with an id and conditionally renders figureAudio, figureTable, figureVideo, and figureImageWebc
_components/figure-image.webc: conditionally renders <canvas-panel>, <image-sequence>, <image-service>, and <image-tag> components based on mediaType. Registered as an eleventy shortcode named figureImageWebc
_components/image-tag.webc: renders a <img> tag with alt text
Note: Media embed links in video/audio figures are currently rendering in web output; these links should only show in print output. Image Sequences still need to be addressed as well -- see https://jira.getty.edu/browse/DEV-16542
@mphstudios I was originally planning on doing these figure image component webc refactors in isolation, but refactoring the _plugins/shortcodes/figure.js to render quire-figure.webc ended up being much simpler -- we can still use the JS components for video, audio, and table figures via @html="...". Interestingly enough, none of these actually need the quire-data JSON since we can just use our getFigure(id) filter -- I anticipate that will still be necessary / useful for refactoring the lightbox/modal.
This adds:
_components/quire-figure.webc
: defines a<figure>
with anid
and conditionally rendersfigureAudio
,figureTable
,figureVideo
, andfigureImageWebc
_components/figure-image.webc
: conditionally renders<canvas-panel>
,<image-sequence>
,<image-service>
, and<image-tag>
components based onmediaType
. Registered as an eleventy shortcode namedfigureImageWebc
_components/image-tag.webc
: renders a<img>
tag with alt textNote: Media embed links in video/audio figures are currently rendering in web output; these links should only show in print output. Image Sequences still need to be addressed as well -- see https://jira.getty.edu/browse/DEV-16542
@mphstudios I was originally planning on doing these figure image component webc refactors in isolation, but refactoring the
_plugins/shortcodes/figure.js
to renderquire-figure.webc
ended up being much simpler -- we can still use the JS components for video, audio, and table figures via@html="..."
. Interestingly enough, none of these actually need thequire-data
JSON since we can just use ourgetFigure(id)
filter -- I anticipate that will still be necessary / useful for refactoring the lightbox/modal.