Skip to content

Commit

Permalink
fix(templates): website template breaking change by renaming hero ima…
Browse files Browse the repository at this point in the history
…ge to jpg (payloadcms#9416)
  • Loading branch information
paulpopus authored Nov 21, 2024
1 parent 3b68671 commit 18b139b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions templates/website/src/Footer/Component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export async function Footer() {
<picture>
<img
alt="Payload Logo"
width={193}
height={43}
className="max-w-[6rem] invert-0 w-full"
src="https://raw.githubusercontent.com/payloadcms/payload/main/packages/ui/src/assets/payload-logo-light.svg"
/>
Expand Down
2 changes: 2 additions & 0 deletions templates/website/src/components/Logo/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export const Logo = () => {
/* eslint-disable @next/next/no-img-element */
<img
alt="Payload Logo"
width={193}
height={43}
className="max-w-[9.375rem] invert dark:invert-0 w-full"
src="https://raw.githubusercontent.com/payloadcms/payload/main/packages/ui/src/assets/payload-logo-light.svg"
/>
Expand Down
6 changes: 6 additions & 0 deletions templates/website/src/components/Media/ImageMedia/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ import { getClientSideURL } from '@/utilities/getURL'

const { breakpoints } = cssVariables

// A base64 encoded image to use as a placeholder while the image is loading
const placeholderBlur =
'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABchJREFUWEdtlwtTG0kMhHtGM7N+AAdcDsjj///EBLzenbtuadbLJaZUTlHB+tRqSesETB3IABqQG1KbUFqDlQorBSmboqeEBcC1d8zrCixXYGZcgMsFmH8B+AngHdurAmXKOE8nHOoBrU6opcGswPi5KSP9CcBaQ9kACJH/ALAA1xm4zMD8AczvQCcAQeJVAZsy7nYApTSUzwCHUKACeUJi9TsFci7AHmDtuHYqQIC9AgQYKnSwNAig4NyOOwXq/xU47gDYggarjIpsRSEA3Fq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V1SfMhOhaumFCT87zy4pPhQBZEK1kQVRjJBBi7AOlePgyAPYjwlvtagx9e/dnQraAyS894TIkkAIEYMKEc8k4EqJ68lZ5jjNqcQC2QteQOf7659umwBgPybNtK4dg9WvnMyFwXYGP7uEO1lwJgAnPNeMYMVXbIIYKFioI4PGFt+BWPVfmWJdjW2lTUnLGCswECAgaUy86iwA1464ajo0QhgMBFGyBoZahANsMpMfXr1JA1SN29m5lqgXj+UPV85uRA7yv/KYUO4Tk7Hc1AZwbIRzg0AyNj2UlAMwfSLSMnl7fdAbcxHuA27YaAMvaQ4GOjwX4RTUGAG8Ge14N963g1AynqUiFqRX9noasxT4b8entNRQYyamk/3tYcHsO7R3XJRRYOn4tw4iUnwBM5gDnySGOreAwAGo8F9IDHEcq8Pz2Kg/oXCpuIL6tOPD8LsDn0ABYQoGFRowlsAEUPPDrGAGowAbgKsgDMmE8mDy/vXQ9IAwI7u4wta+gAdAdgB64Ah9SgD4IgGKhwACoAjgNgFDhtxY8f33ZTMjqdTAiHMBPrn8ZWkEfzFdX4Oc1AHg3+ADbvN8PU8WdFKg4Tt6CQy2+D4YHaMT/JP4XzbAq98cPDIUAAAAASUVORK5CYII='

export const ImageMedia: React.FC<MediaProps> = (props) => {
const {
alt: altFromProps,
Expand Down Expand Up @@ -69,6 +73,8 @@ export const ImageMedia: React.FC<MediaProps> = (props) => {
onLoadFromProps()
}
}}
placeholder="blur"
blurDataURL={placeholderBlur}
priority={priority}
quality={90}
sizes={sizes}
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion templates/website/src/endpoints/seed/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const seed = async ({
'https://raw.githubusercontent.com/payloadcms/payload/refs/heads/main/templates/website/src/endpoints/seed/image-post3.webp',
),
fetchFileByURL(
'https://raw.githubusercontent.com/payloadcms/payload/refs/heads/main/templates/website/src/endpoints/seed/image-hero1.jpg',
'https://raw.githubusercontent.com/payloadcms/payload/refs/heads/main/templates/website/src/endpoints/seed/image-hero1.webp',
),
])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ export const ThemeSelector: React.FC = () => {

return (
<Select onValueChange={onThemeChange} value={value}>
<SelectTrigger className="w-auto bg-transparent gap-2 pl-0 md:pl-3 border-none">
<SelectTrigger
aria-label="Select a theme"
className="w-auto bg-transparent gap-2 pl-0 md:pl-3 border-none"
>
<SelectValue placeholder="Theme" />
</SelectTrigger>
<SelectContent>
Expand Down

0 comments on commit 18b139b

Please sign in to comment.