diff --git a/src/index.html b/src/index.html index 4356517b..ffa93656 100644 --- a/src/index.html +++ b/src/index.html @@ -82,21 +82,70 @@

JPL Design System Assets

- BaseImage and BaseImagePlaceholder + BlockImage

-
-
-
- alt text for image +
+
+ +
+ +
+
+
+ Fourth image +
+
+
+
+
+
+
+
+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed + vel porttitor urna. Maecenas at est laoreet, sagittis risus a, + rutrum ipsum. Quisque tincidunt lacus nunc, dapibus facilisis + felis scelerisque sit amet. +

+
+ Credit: NASA/JPL
@@ -107,160 +156,300 @@

JPL Design System Assets

> BlockImageCarousel +
+
+
+
+
+
+
+ +
-
-
-
-
-
-
- Fourth image +
+
+ First image +
+
-
-
-
-
-
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. - Sed vel porttitor urna. Maecenas at est laoreet, - sagittis risus a, rutrum ipsum. Quisque tincidunt lacus - nunc, dapibus facilisis felis scelerisque sit amet. -

+
+
+
+
+ Lorem ipsum dolor sit amet. +
+ Credit: NASA/JPL-Caltech
- Credit: NASA/JPL -
-
+
-
+
+
+
+ +
-
-
-
- cat +
+
+ Second image +
+
+ +
-
+
+
+
+ +
-
-
-
- Fourth image +
+
+ Third image +
+
-
-
-
-
-
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. - Sed vel porttitor urna. Maecenas at est laoreet, - sagittis risus a, rutrum ipsum. Quisque tincidunt lacus - nunc, dapibus facilisis felis scelerisque sit amet. -

+
+
+
+
+ Credit: NASA/JPL
- Credit: NASA/JPL
- +
+
+ + +
+
+
+ Fourth image +
+
+
+
+
+
+
+
+

+ Lorem ipsum dolor sit amet, consectetur adipiscing + elit. Sed vel porttitor urna. Maecenas at est laoreet, + sagittis risus a, rutrum ipsum. Quisque tincidunt + lacus nunc, dapibus facilisis felis scelerisque sit + amet. +

+
+ Credit: NASA/JPL +
+
-
- diff --git a/storybook/stories/components/BaseImageCaption/BaseImageCaption.stories.js b/storybook/stories/components/BaseImageCaption/BaseImageCaption.stories.js index f36d1ee0..5545ddd0 100644 --- a/storybook/stories/components/BaseImageCaption/BaseImageCaption.stories.js +++ b/storybook/stories/components/BaseImageCaption/BaseImageCaption.stories.js @@ -6,10 +6,12 @@ export default { argTypes: { caption: { type: { name: 'string', required: true }, + description: 'Accepts rich text and plain text.', }, credit: { type: { name: 'string', required: false }, - description: 'Optional credit information', + description: + 'Optional credit information. Limited rich text accepted (text styles and links only, no line or paragraph breaks).', }, url: { type: { name: 'string', required: false }, diff --git a/storybook/stories/components/BlockImage/BlockImageLightbox.js b/storybook/stories/components/BlockImage/BlockImageLightbox.js index 4858c702..b14ede31 100644 --- a/storybook/stories/components/BlockImage/BlockImageLightbox.js +++ b/storybook/stories/components/BlockImage/BlockImageLightbox.js @@ -1,10 +1,10 @@ import { FancyboxButtonTemplate } from '../FancyboxButton/FancyboxButton' -export const BlockImageLightboxTemplate = (image, fancyboxGallery) => { +export const BlockImageLightboxTemplate = ({ image, fancyboxGallery }) => { let fancyboxButton = FancyboxButtonTemplate({ variant: 'primary', fancyboxGallery, - image: image.image, + image: image, icon: 'expand', label: 'View in lightbox', }) diff --git a/storybook/stories/components/BlockImageCarousel/BlockImageCarousel.js b/storybook/stories/components/BlockImageCarousel/BlockImageCarousel.js index 18bb4552..e4999b7c 100644 --- a/storybook/stories/components/BlockImageCarousel/BlockImageCarousel.js +++ b/storybook/stories/components/BlockImageCarousel/BlockImageCarousel.js @@ -15,7 +15,7 @@ export const BlockImageCarouselTemplate = ({ imageClass: 'swiper-lazy', imageCaptionClass: 'slide-caption', imageCaptionWrapperClass: 'lg:pt-3 px-4 pt-10', - fancyboxGallery, + fancyboxGallery: 'ImageGalleryName', })}
` } } @@ -32,7 +32,7 @@ export const BlockImageCarouselTemplate = ({ label: galleryCoverImage.label, title: galleryCoverImage.title, description: galleryCoverImage.description, - fancyboxGallery, + fancyboxGallery: 'ImageGalleryName', image: galleryCoverImage.image, }) : '' diff --git a/storybook/stories/components/FancyboxButton/FancyboxButton.js b/storybook/stories/components/FancyboxButton/FancyboxButton.js index 9441f6de..e7916f19 100644 --- a/storybook/stories/components/FancyboxButton/FancyboxButton.js +++ b/storybook/stories/components/FancyboxButton/FancyboxButton.js @@ -14,6 +14,7 @@ export const FancyboxButtonTemplate = ({ if (image.credit || image.caption) { fancybox += ` data-caption="` if (image.caption) fancybox += image.caption + if (image.caption && image.credit) fancybox += ' ' if (image.credit) fancybox += `Credit: ${image.credit}` fancybox += `"` }