update menu
This commit is contained in:
@@ -15,7 +15,7 @@ import {
|
|||||||
} from '@headlessui/react'
|
} from '@headlessui/react'
|
||||||
import { Container } from './Container'
|
import { Container } from './Container'
|
||||||
|
|
||||||
export function Menu() {
|
export function Menu({ recentCourses }) {
|
||||||
return (
|
return (
|
||||||
<Popover className="relative">
|
<Popover className="relative">
|
||||||
<PopoverButton className="text-black font-semibold cursor-pointer flex gap-1 hover:outline-2 rounded focus:outline-none">
|
<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
|
<CloseButton
|
||||||
className="absolute border border-black -top-3.5 2xl:-top-20 right-2.5 2xl:right-0 rounded-full p-px cursor-pointer"
|
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"
|
title="Fechar"
|
||||||
aria-hiden={true}
|
aria-hidden={true}
|
||||||
>
|
>
|
||||||
<XMarkIcon className="size-3.5" />
|
<XMarkIcon className="size-3.5" />
|
||||||
</CloseButton>
|
</CloseButton>
|
||||||
@@ -79,21 +79,13 @@ export function Menu() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul className="list-disc list-inside font-medium *:*:hover:underline *:*:cursor-pointer max-lg:*:truncate">
|
<ul className="list-disc list-inside font-medium *:*:hover:underline *:*:cursor-pointer max-lg:*:truncate">
|
||||||
<li>
|
{recentCourses.map(({ data: { title, slug } }, idx) => {
|
||||||
<a hreg="#">Lei Lucas</a>
|
return (
|
||||||
</li>
|
<li key={idx}>
|
||||||
<li>
|
<a href={slug}>{title}</a>
|
||||||
<a hreg="#">NR-18 PEMT Plataforma Móvel de Trabalho Aéreo</a>
|
</li>
|
||||||
</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>
|
|
||||||
</ul>
|
</ul>
|
||||||
</Container>
|
</Container>
|
||||||
</PopoverPanel>
|
</PopoverPanel>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
id: 76a5ba94-e11c-48f5-88eb-9326df9be264
|
id: 76a5ba94-e11c-48f5-88eb-9326df9be264
|
||||||
title: NR-12 Máquinas e Equipamentos
|
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
|
slug: reciclagem-de-nr-12-maquinas-e-equipamentos
|
||||||
draft: false
|
draft: false
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ import { Container } from '~/components/Container'
|
|||||||
import { Menu } from '~/components/Menu'
|
import { Menu } from '~/components/Menu'
|
||||||
import { ArrowLeftStartOnRectangleIcon } from '@heroicons/react/24/solid'
|
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 { title } = Astro.props
|
||||||
const year = new Date().getFullYear()
|
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">
|
<section class="bg-lime-400 sticky top-0 z-10 py-3">
|
||||||
<Container className="flex items-center">
|
<Container className="flex items-center">
|
||||||
<Menu client:load />
|
<Menu recentCourses={courses} client:load />
|
||||||
|
|
||||||
<button
|
<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"
|
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 nr18plataforma from '~/assets/nr18-plataforma.png'
|
||||||
import mulherdenegocios from '~/assets/mulher-de-negocios.png'
|
import mulherdenegocios from '~/assets/mulher-de-negocios.png'
|
||||||
import homemdenegocios from '~/assets/homem-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 Natura from '~/assets/logos/natura.svg'
|
||||||
import Nissan from '~/assets/logos/nissan.svg'
|
import Nissan from '~/assets/logos/nissan.svg'
|
||||||
import Kordsa from '~/assets/logos/kordsa.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'
|
import { getCollection, getEntry } from 'astro:content'
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
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 {
|
return {
|
||||||
params: { slug: course.id },
|
params: { slug: course.id },
|
||||||
props: { course },
|
props: { course },
|
||||||
|
|||||||
Reference in New Issue
Block a user