Skip to content

Commit 59c9c13

Browse files
authored
Add default avatar, clean up some design stories (#1393)
1 parent 799e874 commit 59c9c13

File tree

6 files changed

+35
-20
lines changed

6 files changed

+35
-20
lines changed

.changeset/quick-pears-fix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cloudfour/patterns': minor
3+
---
4+
5+
Add default avatar asset
Lines changed: 6 additions & 0 deletions
Loading

src/design/brand.stories.mdx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
import { Story, Canvas, Meta } from '@storybook/addon-docs/blocks';
2-
// Importing a `.svg` directly, results in a failed build and importing
3-
// the `.svg.twig` file causes linting errors (since they are not tracked).
4-
// Therefore, we must track a twig file to satisfy CI.
5-
import brandLogo from './demo/logo.twig';
2+
import logoSrc from '../assets/brand/logo.svg';
63

74
<Meta title="Design/Brand" />
85

9-
# Logo
6+
# Brand
107

11-
Cloud Four logo in SVG format. The logo fill color can be modified via the CSS
12-
`color` property.
8+
These elements are used to signify Cloud Four projects.
9+
10+
## Logo
1311

1412
<Canvas>
15-
<Story name="Logo">{brandLogo}</Story>
13+
<Story name="Logo">{`<img src="${logoSrc}" alt="Cloud Four">`}</Story>
1614
</Canvas>

src/design/demo/fallback_images.twig renamed to src/design/demo/fallback-feature-images.twig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
2-
{% embed '@cloudfour/objects/deck/deck.twig' %}
1+
{% embed '@cloudfour/objects/deck/deck.twig' with {
2+
class: 'o-deck--2-column@l'
3+
} %}
34
{% block content %}
45
<figure>
56
{% include '@cloudfour/assets/illustrations/fallback/fallback_paintbrush.svg.twig' %}

src/design/demo/logo.twig

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { Story, Canvas, Meta } from '@storybook/addon-docs/blocks';
2-
// Importing a `.svg` directly, results in a failed build and importing
3-
// the `.svg.twig` file causes linting errors (since they are not tracked).
4-
// Therefore, we must track a twig file to satisfy CI.
5-
import fallbackImage from '../demo/fallback_images.twig';
2+
import fallbackFeatureImages from './demo/fallback-feature-images.twig';
3+
import avatarDefaultSrc from '../assets/illustrations/avatar-default.svg';
64

7-
<Meta title="Design/Fallback Images" />
5+
<Meta title="Design/Illustrations" />
86

9-
# Fallback Images
7+
# Illustrations
8+
9+
## Fallback feature images
1010

1111
Article summaries appear more interesting and cohesive when they have an image, but sometimes an article does not have an obvious image, and not every author is an illustrator. These fallback images can be used in place of an original illustration.
1212

@@ -17,7 +17,13 @@ This design also leaves room to add more categories if desired. Ideally, the ico
1717
The captions below each fallback image aren't set in stone, more so just ideas that these designs could be used for.
1818

1919
<Canvas>
20-
<Story name="Fallback Images" args={{ class: 'o-deck--2-column@l' }}>
21-
{fallbackImage}
22-
</Story>
20+
<Story name="Feature images">{() => fallbackFeatureImages()}</Story>
21+
</Canvas>
22+
23+
## Default avatar
24+
25+
This asset may be used in place of a specific user avatar. To differentiate multiple fallback avatars, consider swapping its fill colors for [others in our palette](/docs/design-colors--page).
26+
27+
<Canvas>
28+
<Story name="Default avatar">{`<img src="${avatarDefaultSrc}" alt="Default avatar">`}</Story>
2329
</Canvas>

0 commit comments

Comments
 (0)