diff --git a/.gitignore b/.gitignore index 067a097..e6b2b3a 100644 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,9 @@ npm-cache/ # Marketing book cover (raster; see docs/guides/static-assets.md) !public/assets/marketing/community-rules-cover.png +# Header Create-rule portraits +!public/assets/marketing/avatar-*.png + # Open Graph 1200×630 share images (`npm run generate:og-images`) !public/assets/marketing/og-image.png !public/assets/marketing/og-image-templates.png diff --git a/app/layout.tsx b/app/layout.tsx index 3e78027..7fdbd2d 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -123,19 +123,19 @@ export default function RootLayout({ children }: { children: ReactNode }) { rel="preload" as="image" href={getAssetPath(ASSETS.AVATAR_1)} - type="image/svg+xml" + type="image/png" /> - - diff --git a/public/assets/marketing/avatar-2.png b/public/assets/marketing/avatar-2.png new file mode 100644 index 0000000..9100a69 Binary files /dev/null and b/public/assets/marketing/avatar-2.png differ diff --git a/public/assets/marketing/avatar-2.svg b/public/assets/marketing/avatar-2.svg deleted file mode 100644 index fc41405..0000000 --- a/public/assets/marketing/avatar-2.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/public/assets/marketing/avatar-3.png b/public/assets/marketing/avatar-3.png new file mode 100644 index 0000000..026635a Binary files /dev/null and b/public/assets/marketing/avatar-3.png differ diff --git a/public/assets/marketing/avatar-3.svg b/public/assets/marketing/avatar-3.svg deleted file mode 100644 index b019939..0000000 --- a/public/assets/marketing/avatar-3.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/stories/asset/Avatar.stories.js b/stories/asset/Avatar.stories.js index 2c5a09c..f7d7491 100644 --- a/stories/asset/Avatar.stories.js +++ b/stories/asset/Avatar.stories.js @@ -55,7 +55,7 @@ export default { export const Default = { args: { - src: "assets/marketing/avatar-1.svg", + src: "assets/marketing/avatar-1.png", alt: "User Avatar", size: "medium", }, @@ -63,7 +63,7 @@ export const Default = { export const Sizes = { args: { - src: "assets/marketing/avatar-1.svg", + src: "assets/marketing/avatar-1.png", alt: "User Avatar", }, render: (args) => ( @@ -146,9 +146,9 @@ export const DifferentAvatars = { render: (args) => (
- - - + + +
), @@ -168,36 +168,36 @@ export const AllSizesWithDifferentAvatars = {

Small Size

- - - + + +

Medium Size

- - - + + +

Large Size

- - - + + +

XLarge Size

- - - + + +
diff --git a/stories/asset/AvatarContainer.stories.js b/stories/asset/AvatarContainer.stories.js index 2ab7cab..3c48851 100644 --- a/stories/asset/AvatarContainer.stories.js +++ b/stories/asset/AvatarContainer.stories.js @@ -33,9 +33,9 @@ export const Default = { }, render: (args) => ( - - - + + + ), }; @@ -47,36 +47,36 @@ export const Sizes = {

Small Size

- - - + + +

Medium Size

- - - + + +

Large Size

- - - + + +

XLarge Size

- - - + + +
@@ -98,38 +98,38 @@ export const DifferentGroupSizes = {

2 Users

- - + +

3 Users

- - - + + +

4 Users

- - - - + + + +

5 Users

- - - - - + + + + +
@@ -158,9 +158,9 @@ export const InContext = {

Team Members

- - - + + + 3 team members
@@ -172,10 +172,10 @@ export const InContext = {
- - - - + + + + 4 contributors
@@ -185,8 +185,8 @@ export const InContext = {

Small Team

- - + + 2 members
diff --git a/tests/components/Avatar.test.tsx b/tests/components/Avatar.test.tsx index 733c0cc..54b9b09 100644 --- a/tests/components/Avatar.test.tsx +++ b/tests/components/Avatar.test.tsx @@ -15,7 +15,7 @@ import { type AvatarProps = React.ComponentProps; const baseProps: AvatarProps = { - src: "/assets/marketing/avatar-1.svg", + src: "/assets/marketing/avatar-1.png", alt: "User avatar", size: "medium", }; @@ -46,7 +46,7 @@ describe("Avatar (behavioral tests)", () => { it("does not show initials while the image is loading", () => { render( , @@ -57,7 +57,7 @@ describe("Avatar (behavioral tests)", () => { it("applies the small photo ring after the image loads", () => { const { container } = render( ,