-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Refactor lightbox to generate slides dynamically and refine web componentry #952
Conversation
Co-authored-by: matthew p hrudka <[email protected]>
|
||
const { assetDir } = eleventyConfig.globalData.config.figures | ||
|
||
return async function(...args) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return async function(...args) { | |
/** | |
* lightboxData shortcode component function | |
* @param {Object} Figures data object | |
* @return {string} HTML script element with the JSON-serialized payload | |
*/ | |
return async function(...args) { |
return html`<script type="application/json" | ||
class="q-lightbox-data" | ||
slot="data"> | ||
${jsonData} | ||
</script>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return html`<script type="application/json" | |
class="q-lightbox-data" | |
slot="data"> | |
${jsonData} | |
</script>` | |
return html` | |
<script type="application/json" class="q-lightbox-data" slot="data"> | |
${jsonData} | |
</script> | |
` |
const { id, | ||
mediaType, | ||
figureElementContent, | ||
annotationsElementContent, | ||
aspectRatio, | ||
isVideo, | ||
isAudio, | ||
label, | ||
labelHtml, | ||
caption, | ||
captionHtml, | ||
credit, | ||
creditHtml } = figure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const { id, | |
mediaType, | |
figureElementContent, | |
annotationsElementContent, | |
aspectRatio, | |
isVideo, | |
isAudio, | |
label, | |
labelHtml, | |
caption, | |
captionHtml, | |
credit, | |
creditHtml } = figure | |
const { | |
id, | |
mediaType, | |
figureElementContent, | |
annotationsElementContent, | |
aspectRatio, | |
isVideo, | |
isAudio, | |
label, | |
labelHtml, | |
caption, | |
captionHtml, | |
credit, | |
creditHtml | |
} = figure |
* Returns an HTML script element with the JSON-serialized payload | ||
* | ||
* */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Returns an HTML script element with the JSON-serialized payload | |
* | |
* */ | |
* @returns HTML script element with the JSON-serialized payload | |
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cbutcosk this looks great, I made a few linting comments.
The merge-base changed after approval.
Co-authored-by: matthew p hrudka <[email protected]>
Co-authored-by: matthew p hrudka <[email protected]>
Co-authored-by: matthew p hrudka <[email protected]>
This PR (along with thegetty/quire-starter-default#45) refactor the
q-lightbox
element:slot
elements for data, ui, slides, and stylesimage-sequence
from 11ty-webc to Lit, renamedq-image-sequence