diff --git a/.storybook/preview.scss b/.storybook/preview.scss index 6ff288d3..9fa2cc55 100644 --- a/.storybook/preview.scss +++ b/.storybook/preview.scss @@ -64,22 +64,25 @@ a.sbdocs-a { .sbdocs { @include font-display; + + &:not(.sbdocs-preview) { + code { + font-size: 90%; + margin-left: 2px; + margin-right: 2px; + background-color: #efefef; + padding: 2px 4px; + } + + img { + display: block; + margin-top: 1rem; + margin-bottom: 2rem; + } + } } -code { - font-size: 90%; - margin-left: 2px; - margin-right: 2px; - background-color: #efefef; - padding: 2px 4px; -} - -img { - display: block; - margin-top: 1rem; - margin-bottom: 2rem; -} div.reset-article { width: calc(100% + 30px); diff --git a/bin/newComponent/template/YourComponent/YourComponent.stories.svelte b/bin/newComponent/template/YourComponent/YourComponent.stories.svelte index 09f52838..b44d792a 100644 --- a/bin/newComponent/template/YourComponent/YourComponent.stories.svelte +++ b/bin/newComponent/template/YourComponent/YourComponent.stories.svelte @@ -34,7 +34,7 @@ diff --git a/package.json b/package.json index 447627c7..86619a10 100644 --- a/package.json +++ b/package.json @@ -204,4 +204,4 @@ "./scss/typography/_variables.scss": "./dist/scss/typography/_variables.scss", ".": "./dist/index.js" } -} \ No newline at end of file +} diff --git a/src/components/FeaturePhoto/FeaturePhoto.svelte b/src/components/FeaturePhoto/FeaturePhoto.svelte index bee5c47a..a3fc0f74 100644 --- a/src/components/FeaturePhoto/FeaturePhoto.svelte +++ b/src/components/FeaturePhoto/FeaturePhoto.svelte @@ -98,6 +98,7 @@ img { width: 100%; + margin: 0; } .placeholder { diff --git a/src/components/GraphicBlock/GraphicBlock.svelte b/src/components/GraphicBlock/GraphicBlock.svelte index 419a7247..8e7b20df 100644 --- a/src/components/GraphicBlock/GraphicBlock.svelte +++ b/src/components/GraphicBlock/GraphicBlock.svelte @@ -67,6 +67,7 @@ import AriaHidden from './AriaHidden.svelte'; import TextBlock from './TextBlock.svelte'; import Block from '../Block/Block.svelte'; + import PaddingReset from '../PaddingReset/index.svelte'; import { marked } from 'marked'; @@ -80,17 +81,21 @@ >
{#if $$slots.title} - - - - + + + + + + {:else if title} - -

{title}

- {#if description} - {@html marked(description)} - {/if} -
+ + +

{title}

+ {#if description} + {@html marked(description)} + {/if} +
+
{/if}
{/if} {#if $$slots.notes} - - - - + + + + + + {:else if notes} - - - + + + + + {/if} diff --git a/src/components/PaddingReset/index.svelte b/src/components/PaddingReset/index.svelte new file mode 100644 index 00000000..decdbd16 --- /dev/null +++ b/src/components/PaddingReset/index.svelte @@ -0,0 +1,18 @@ + + +{#if width === 'fluid'} +
+ +
+{:else} + +{/if} + + \ No newline at end of file diff --git a/src/components/PhotoPack/PhotoPack.stories.svelte b/src/components/PhotoPack/PhotoPack.stories.svelte new file mode 100644 index 00000000..0b40728a --- /dev/null +++ b/src/components/PhotoPack/PhotoPack.stories.svelte @@ -0,0 +1,116 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/components/PhotoPack/PhotoPack.svelte b/src/components/PhotoPack/PhotoPack.svelte new file mode 100644 index 00000000..fafc49ec --- /dev/null +++ b/src/components/PhotoPack/PhotoPack.svelte @@ -0,0 +1,198 @@ + + + +
+ {#each rows as row, ri} +
+ {#each row as group, gi} +
+ {#each group as img, i} +
+ {img.altText} +
+ {/each} +
+ {/each} +
+ {/each} +
+ + +
+ {#each rows as row, ri} + {#each row as group, gi} + {#each group as img, i} + {#if img.caption} +
+ {@html marked(img.caption)} +
+ {/if} + {/each} + {/each} + {/each} +
+
+
+
+ + diff --git a/src/components/PhotoPack/stories/docs/component.md b/src/components/PhotoPack/stories/docs/component.md new file mode 100644 index 00000000..6d5d304f --- /dev/null +++ b/src/components/PhotoPack/stories/docs/component.md @@ -0,0 +1,12 @@ +> **Coming soon!** + +--- + +```svelte + + + + +``` diff --git a/src/components/PhotoPack/stories/docs/more.md b/src/components/PhotoPack/stories/docs/more.md new file mode 100644 index 00000000..9658213d --- /dev/null +++ b/src/components/PhotoPack/stories/docs/more.md @@ -0,0 +1 @@ +You can set sub groups and maxHeights...