diff --git a/superpage/src/assets/placeholder.png b/superpage/src/assets/placeholder.png new file mode 100644 index 0000000..b0661dc Binary files /dev/null and b/superpage/src/assets/placeholder.png differ diff --git a/superpage/src/content.config.ts b/superpage/src/content.config.ts index 764ff37..5885ca4 100644 --- a/superpage/src/content.config.ts +++ b/superpage/src/content.config.ts @@ -13,24 +13,26 @@ const trainers = defineCollection({ const courses = defineCollection({ loader: glob({ pattern: '**/*.md', base: './src/data/courses' }), - schema: z.object({ - id: z.string(), - title: z.string(), - summary: z.string(), - slug: z.string(), - course: z.object({ - hours: z.number(), - reciclagem: z.boolean().default(false), - modules: z.array(z.string()), - trainer: reference('trainers').optional(), + schema: ({ image }) => + z.object({ + id: z.string(), + title: z.string(), + summary: z.string(), + slug: z.string(), + img: image().optional(), + course: z.object({ + hours: z.number(), + reciclagem: z.boolean().default(false), + modules: z.array(z.string()), + trainer: reference('trainers').optional(), + }), + seo: z + .object({ + tags: z.array(z.string()), + }) + .optional(), + draft: z.boolean().default(true), }), - seo: z - .object({ - tags: z.array(z.string()), - }) - .optional(), - draft: z.boolean().default(true), - }), }) export const collections = { trainers, courses } diff --git a/superpage/src/data/courses/nr-18-plataforma-de-trabalho-aereo.md b/superpage/src/data/courses/nr-18-plataforma-de-trabalho-aereo.md index 276c427..b3e5a81 100644 --- a/superpage/src/data/courses/nr-18-plataforma-de-trabalho-aereo.md +++ b/superpage/src/data/courses/nr-18-plataforma-de-trabalho-aereo.md @@ -4,6 +4,7 @@ title: NR-18 PEMT Plataforma Móvel de Trabalho Aéreo summary: Capacita os profissionais para identificar e minimizar riscos, utilizar corretamente os Equipamentos de Proteção Individual (EPIs), realizar manutenções preventivas e corretivas, além de garantir a segurança durante a operação de plataformas elevatórias. slug: nr-18-plataforma-de-trabalho-aereo draft: false +img: ~/assets/nr18-plataforma.png seo: tags: diff --git a/superpage/src/pages/[slug].astro b/superpage/src/pages/[slug].astro index eb64baf..585e690 100644 --- a/superpage/src/pages/[slug].astro +++ b/superpage/src/pages/[slug].astro @@ -7,7 +7,7 @@ import { CheckBadgeIcon } from '@heroicons/react/24/solid' import { LinkedInIcon } from '~/components/LinkedInIcon' import Layout from '~/layouts/Layout.astro' import ClientsLogo from '~/components/ClientsLogo.astro' -import nr18plataforma from '~/assets/nr18-plataforma.png' +import placeholder from '~/assets/placeholder.png' import mulherdenegocios from '~/assets/mulher-de-negocios.png' import homemdenegocios from '~/assets/homem-de-negocios.png' @@ -39,10 +39,10 @@ const trainer = data.course?.trainer