-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #497 from WestpacGEL/feature/site-cloud-image
feature(site): update images to use keystatic cloud image
- Loading branch information
Showing
47 changed files
with
705 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletions
9
apps/site/src/app/articles/[article]/components/layout/layout.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
apps/site/src/app/articles/[article]/components/layout/layout.styles.ts
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
apps/site/src/app/articles/[article]/components/layout/layout.types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
import { ReactElement } from 'react'; | ||
import { type VariantProps } from 'tailwind-variants'; | ||
|
||
import { styles } from './layout.styles.js'; | ||
|
||
export type LayoutProps = { | ||
children: ReactElement[]; | ||
layout: [number, ...number[]]; | ||
}; | ||
|
||
export type Variants = VariantProps<typeof styles>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 10 additions & 2 deletions
12
...omponents/component-blocks/components/article-body-image/article-body-image.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
...src/components/component-blocks/components/article-body-image/article-body-image.types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { type CloudImageProps } from '@keystatic/core/component-blocks'; | ||
|
||
export type Width = 'body' | 'bodyWide'; | ||
|
||
export type ArticleBodyImageProps = { | ||
alt?: string; | ||
articleBodyImage?: string; | ||
image: CloudImageProps; | ||
title?: string; | ||
type?: Width; | ||
}; |
21 changes: 21 additions & 0 deletions
21
...site/src/components/component-blocks/components/article-image/article-image.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Image from 'next/image'; | ||
|
||
import { styles as imageStyles } from './article-image.style'; | ||
import { type ArticleImageProps } from './article-image.types'; | ||
|
||
export const ArticleImage = ({ image, caption, spacing = 'default' }: ArticleImageProps) => { | ||
const styles = imageStyles({ spacing }); | ||
return ( | ||
<figure className={styles.base({})}> | ||
<Image | ||
className={styles.img({})} | ||
loading="lazy" | ||
alt={image.alt} | ||
src={image.src} | ||
height={image.height} | ||
width={image.width} | ||
/> | ||
{caption && <figcaption className={styles.caption({})}>{caption}</figcaption>} | ||
</figure> | ||
); | ||
}; |
19 changes: 19 additions & 0 deletions
19
apps/site/src/components/component-blocks/components/article-image/article-image.style.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { tv } from 'tailwind-variants'; | ||
|
||
export const styles = tv({ | ||
slots: { | ||
base: 'relative', | ||
img: 'block', | ||
caption: 'typography-site-10 mt-2 text-gel-muted', | ||
}, | ||
variants: { | ||
spacing: { | ||
default: { | ||
base: 'mb-7 group-[&]:mb-4 xsl:mb-9', | ||
}, | ||
reduced: { | ||
base: 'mb-4 xsl:mb-5', | ||
}, | ||
}, | ||
}, | ||
}); |
8 changes: 8 additions & 0 deletions
8
apps/site/src/components/component-blocks/components/article-image/article-image.types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { type CloudImageProps } from '@keystatic/core/component-blocks'; | ||
|
||
export type ArticleImageProps = { | ||
caption?: string; | ||
image: CloudImageProps; | ||
index: number; | ||
spacing?: 'default' | 'reduced' | undefined; | ||
}; |
2 changes: 2 additions & 0 deletions
2
apps/site/src/components/component-blocks/components/article-image/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './article-image.component'; | ||
export * from './article-image.types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
name: Code with GEL | ||
cardTitle: Code with GEL | ||
thumbnail: >- | ||
https://res.cloudinary.com/westpac-gel/image/upload/v1663140016/cl81amh5c000mam8i3iuq5qt9.png | ||
thumbnail: | ||
src: >- | ||
https://res.cloudinary.com/westpac-gel/image/upload/v1663140016/cl81amh5c000mam8i3iuq5qt9.png | ||
height: 1212 | ||
width: 3168 | ||
smallDescription: Automate your environment, scale your projects and speed up your work flow with our cutting edge code library. | ||
image: >- | ||
https://res.cloudinary.com/westpac-gel/image/upload/v1663300551/cl83y79gg0013am8iddv886ry.jpg | ||
image: | ||
src: >- | ||
https://res.cloudinary.com/westpac-gel/image/upload/v1663300551/cl83y79gg0013am8iddv886ry.jpg | ||
height: 1080 | ||
width: 1920 | ||
description: >- | ||
The GEL coding framework has been built with serviceability in mind, supporting multiple platforms across the Bank that may use different libraries, languages and coding technologies. | ||
author: marita-purins |
Oops, something went wrong.
57d9402
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.
Successfully deployed to the following URLs:
gel-next-site – ./apps/site
gel-next-site-westpacgel.vercel.app
gel-next-site-git-main-westpacgel.vercel.app
gel-next-site.vercel.app