update menu
This commit is contained in:
@@ -15,7 +15,7 @@ import {
|
||||
} from '@headlessui/react'
|
||||
import { Container } from './Container'
|
||||
|
||||
export function Menu() {
|
||||
export function Menu({ recentCourses }) {
|
||||
return (
|
||||
<Popover className="relative">
|
||||
<PopoverButton className="text-black font-semibold cursor-pointer flex gap-1 hover:outline-2 rounded focus:outline-none">
|
||||
@@ -35,7 +35,7 @@ export function Menu() {
|
||||
<CloseButton
|
||||
className="absolute border border-black -top-3.5 2xl:-top-20 right-2.5 2xl:right-0 rounded-full p-px cursor-pointer"
|
||||
title="Fechar"
|
||||
aria-hiden={true}
|
||||
aria-hidden={true}
|
||||
>
|
||||
<XMarkIcon className="size-3.5" />
|
||||
</CloseButton>
|
||||
@@ -79,21 +79,13 @@ export function Menu() {
|
||||
</div>
|
||||
|
||||
<ul className="list-disc list-inside font-medium *:*:hover:underline *:*:cursor-pointer max-lg:*:truncate">
|
||||
<li>
|
||||
<a hreg="#">Lei Lucas</a>
|
||||
</li>
|
||||
<li>
|
||||
<a hreg="#">NR-18 PEMT Plataforma Móvel de Trabalho Aéreo</a>
|
||||
</li>
|
||||
<li>
|
||||
<a hreg="#">NR-35 Trabalho em Altura</a>
|
||||
</li>
|
||||
<li>
|
||||
<a hreg="#">NR-10 Básico</a>
|
||||
</li>
|
||||
<li>
|
||||
<a hreg="#">LOTO Lockout Tagout</a>
|
||||
</li>
|
||||
{recentCourses.map(({ data: { title, slug } }, idx) => {
|
||||
return (
|
||||
<li key={idx}>
|
||||
<a href={slug}>{title}</a>
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
</ul>
|
||||
</Container>
|
||||
</PopoverPanel>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
id: 76a5ba94-e11c-48f5-88eb-9326df9be264
|
||||
title: NR-12 Máquinas e Equipamentos
|
||||
summary: ...
|
||||
summary: Com foco na prevenção de acidentes, na conformidade com a NR-18 e no uso correto de EPIs, como operação, manutenção e inspeção de plataformas elevatórias, assegurando maior segurança e garantindo atendimento às exigências legais.
|
||||
slug: reciclagem-de-nr-12-maquinas-e-equipamentos
|
||||
draft: false
|
||||
|
||||
|
||||
@@ -9,6 +9,9 @@ import { Container } from '~/components/Container'
|
||||
import { Menu } from '~/components/Menu'
|
||||
import { ArrowLeftStartOnRectangleIcon } from '@heroicons/react/24/solid'
|
||||
|
||||
import { getCollection } from 'astro:content'
|
||||
const courses = await getCollection('courses', ({ data }) => data.draft != true)
|
||||
|
||||
const { title } = Astro.props
|
||||
const year = new Date().getFullYear()
|
||||
---
|
||||
@@ -42,7 +45,7 @@ const year = new Date().getFullYear()
|
||||
|
||||
<section class="bg-lime-400 sticky top-0 z-10 py-3">
|
||||
<Container className="flex items-center">
|
||||
<Menu client:load />
|
||||
<Menu recentCourses={courses} client:load />
|
||||
|
||||
<button
|
||||
class="bg-black hover:bg-white hover:text-black font-semibold py-2.5 px-3 rounded-md cursor-pointer ml-auto transition duration-150"
|
||||
|
||||
@@ -9,7 +9,6 @@ import { LinkedInIcon } from '~/components/LinkedInIcon'
|
||||
import nr18plataforma from '~/assets/nr18-plataforma.png'
|
||||
import mulherdenegocios from '~/assets/mulher-de-negocios.png'
|
||||
import homemdenegocios from '~/assets/homem-de-negocios.png'
|
||||
import francis from '~/assets/francis.jpeg'
|
||||
import Natura from '~/assets/logos/natura.svg'
|
||||
import Nissan from '~/assets/logos/nissan.svg'
|
||||
import Kordsa from '~/assets/logos/kordsa.svg'
|
||||
@@ -19,9 +18,12 @@ import Semeq from '~/assets/logos/semeq.svg'
|
||||
import { getCollection, getEntry } from 'astro:content'
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const posts = await getCollection('courses', ({ data }) => data.draft != true)
|
||||
const courses = await getCollection(
|
||||
'courses',
|
||||
({ data }) => data.draft != true,
|
||||
)
|
||||
|
||||
return posts.map((course) => {
|
||||
return courses.map((course) => {
|
||||
return {
|
||||
params: { slug: course.id },
|
||||
props: { course },
|
||||
|
||||
Reference in New Issue
Block a user