remove unecessary components

This commit is contained in:
2025-04-21 19:29:01 -03:00
parent 7a026d09d9
commit c9b5f94bba
14 changed files with 43 additions and 169 deletions

View File

@@ -13,7 +13,7 @@ export default defineConfig({
integrations: [
sitemap(),
icon(),
alpinejs({ entrypoint: '/src/entrypoint' }),
alpinejs(),
partytown({
config: {
forward: ['dataLayer.push', 'fbq'],

View File

@@ -8,7 +8,6 @@
"name": "eduseg",
"version": "0.0.1",
"dependencies": {
"@alpinejs/collapse": "^3.14.9",
"@astrojs/alpinejs": "^0.4.6",
"@astrojs/partytown": "^2.1.4",
"@astrojs/sitemap": "^3.3.0",
@@ -22,12 +21,6 @@
"tailwindcss": "^4.0.13"
}
},
"node_modules/@alpinejs/collapse": {
"version": "3.14.9",
"resolved": "https://registry.npmjs.org/@alpinejs/collapse/-/collapse-3.14.9.tgz",
"integrity": "sha512-cUjbBVo4KR/CfFg0cLB+Q7a8SnjmD4MdxmtZvFjh25Dlf/ZWYPSPx/28b+aAykuX/SUoDPQRmdFiVVvq+iILHw==",
"license": "MIT"
},
"node_modules/@antfu/install-pkg": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-1.0.0.tgz",

View File

@@ -9,7 +9,6 @@
"astro": "astro"
},
"dependencies": {
"@alpinejs/collapse": "^3.14.9",
"@astrojs/alpinejs": "^0.4.6",
"@astrojs/partytown": "^2.1.4",
"@astrojs/sitemap": "^3.3.0",

View File

@@ -1,6 +0,0 @@
<details class="border border-transparent open:border-black/10 open:bg-gray-100 ..." open>
<summary class="text-sm leading-6 font-semibold text-gray-900 select-none">Why do they call it Ovaltine?</summary>
<div class="mt-3 text-sm leading-6 text-gray-600">
<p>The mug is round. The jar is round. They should call it Roundtine.</p>
</div>
</details>

View File

@@ -1,29 +0,0 @@
export function Bookmark(props) {
return (
<svg
viewBox="0 0 368 492"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
d="M347.855 489.218L191.347 418.671C187.077 415.933 181.603 415.933 177.278 418.671L20.7705 489.218C12.0665 494.75 0.680176 488.506 0.680176 478.209V13.0816C0.734918 5.85162 6.59233 -0.0090332 13.8183 -0.0090332H354.917C362.143 -0.0090332 368 5.85162 368 13.0816V478.209C368 488.506 356.614 494.75 347.91 489.218H347.855Z"
// fill="url(#paint0_linear_1145_4906)"
/>
<defs>
<linearGradient
id="paint0_linear_1145_4906"
x1="326.947"
y1="66.4597"
x2="-0.94168"
y2="306.46"
gradientUnits="userSpaceOnUse"
>
<stop stop-color="#FFCF82" />
<stop offset="0.483794" stop-color="#C7D174" />
<stop offset="1" stop-color="#8CD366" />
</linearGradient>
</defs>
</svg>
)
}

View File

@@ -1,30 +0,0 @@
import clsx from 'clsx'
interface CardProps {
children: React.ReactNode
color?: 'gradient' | 'darker' | 'yellow' | 'zinc'
className?: string | undefined
}
export function Card({ children, color = 'gradient', className }: CardProps) {
const colorVariants = {
gradient: 'bg-linear-to-tr from-[#8CD366] via-[#C7D174] to-[#FFCF82]',
darker: 'bg-green-primary text-white',
yellow: 'text-green-primary bg-yellow-tertiary',
zinc: 'text-white bg-zinc-900',
}
return (
<div
className={clsx(
'lg:rounded-2xl',
'lg:drop-shadow-sm',
'p-3 lg:p-12',
colorVariants[color],
className,
)}
>
{children}
</div>
)
}

View File

@@ -1,47 +0,0 @@
import { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/react'
import { ChevronDownIcon } from '@heroicons/react/24/solid'
export function Faq({ topics }) {
return (
<>
{topics?.map((topic, idx) => (
<ListItem defaultOpen={false} key={idx}>
<ListButton>
{idx + 1}. {topic}
</ListButton>
<ListPanel>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sit amet neque id libero semper vulputate a
ut ex. Pellentesque semper ultrices mi in efficitur.
</p>
<p>
Nulla sit amet quam eu neque convallis volutpat. Pellentesque eu commodo sem. Suspendisse ac lobortis
massa, ac mattis mauris. Integer malesuada bibendum ante, sed consequat augue convallis et.
</p>
</ListPanel>
</ListItem>
))}
</>
)
}
export function ListItem({ children, ...props }) {
return (
<Disclosure as="div" className="bg-white/10 rounded-lg w-full data-open:bg-white/15" {...props}>
{children}
</Disclosure>
)
}
export function ListButton({ children }) {
return (
<DisclosureButton className="group flex items-center justify-between w-full px-5 py-3 cursor-pointer">
<span className="text-left">{children}</span>
<ChevronDownIcon className="size-5 fill-white/60 group-data-[hover]:fill-white/50 group-data-[open]:rotate-180 shrink-0" />
</DisclosureButton>
)
}
export function ListPanel({ children }) {
return <DisclosurePanel className="text-sm/6 text-white/70 space-y-2 px-5 pb-3">{children}</DisclosurePanel>
}

View File

@@ -1,6 +1,9 @@
---
import { Icon } from 'astro-icon/components'
import Container from './Container.astro'
import { getCollection } from 'astro:content'
const courses = await getCollection('courses', ({ data }) => data.draft != true)
---
<nav
@@ -16,7 +19,7 @@ import Container from './Container.astro'
aria-haspopup="true"
>
<div class="truncate max-w-36 sm:max-w-72 md:max-w-124">NR-18 PEMT Plataforma Móvel de Trabalho</div>
<Icon name="chevron" aria-hidden="true" class="w-4" />
<Icon name="chevron" aria-hidden="true" class="size-4" />
</button>
<button
@@ -39,13 +42,12 @@ import Container from './Container.astro'
x-transition:leave-end="opacity-0"
role="menu"
class="absolute top-0 bg-lime-400 w-full py-6 2xl:py-24 rounded-b-2xl drop-shadow shadow-sm"
style="display:
none"
style="display: none;"
>
<Container class="text-black relative xl:w-10/12 2xl:w-5xl">
<button
class="absolute border border-black cursor-pointer rounded-full -top-3.5 2xl:-top-21.5 right-2.5"
title="Fechar"
aria-labelledby="Fechar"
aria-hidden={true}
x-on:click="open = false"
>
@@ -60,6 +62,20 @@ import Container from './Container.astro'
<div class="flex max-lg:flex-col gap-2.5 justify-between mb-3.5">
<h6 class="font-medium text-xl lg:text-2xl">Conheça outros cursos da EDUSEG&reg;</h6>
</div>
<ul class="list-disc list-inside max-lg:[&_li]:truncate">
{
courses.map(({ data: { title, slug } }) => {
return (
<li>
<a href={`/${slug}`} class="font-bold hover:underline">
{title}
</a>
</li>
)
})
}
</ul>
</Container>
</div>
<!-- Dropdown Menu End -->

View File

@@ -1,6 +0,0 @@
import type { Alpine } from 'alpinejs'
import collapse from '@alpinejs/collapse'
export default (Alpine: Alpine) => {
Alpine.plugin(collapse)
}

View File

@@ -1,3 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z" />
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
<path fill-rule="evenodd" d="M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z" clip-rule="evenodd" />
</svg>

Before

Width:  |  Height:  |  Size: 359 B

After

Width:  |  Height:  |  Size: 323 B

View File

@@ -6,9 +6,6 @@ import Container from '~/components/Container.astro'
import HeaderNav from '~/components/HeaderNav.astro'
import { Icon } from 'astro-icon/components'
import { getCollection } from 'astro:content'
const courses = await getCollection('courses', ({ data }) => data.draft != true)
const year = new Date().getFullYear()
---

View File

@@ -180,24 +180,24 @@ const trainer = data.course?.trainer ? await getEntry(data.course?.trainer) : nu
{
data.course.modules.map((summary) => (
<div
x-data="{expanded: false}"
class="bg-white/10 rounded-lg w-full px-5 py-3"
:class="{'bg-white/15': expanded === true}"
x-data="{ open: false }"
class="bg-white/10 rounded-lg w-full"
:class="{'bg-white/15': open === true}"
>
<div
@click="expanded = ! expanded"
class="cursor-pointer flex items-center justify-between"
class="cursor-pointer flex items-center justify-between px-5 py-3"
x-on:click="open = !open"
>
<span>{summary}</span>
<Icon
name="chevron"
class="size-4 fill-white/60 group-data-[hover]:fill-white/50 shrink-0"
:class="{'-rotate-180': expanded === true}"
:class="{'-rotate-180': open === true}"
/>
</div>
<div
x-show="expanded"
class="text-sm/6 text-white/70 space-y-2 mt-2"
x-show="open"
class="text-sm/6 text-white/70 space-y-2 px-5 pb-3"
style="display: none;"
>
<p>
@@ -261,7 +261,7 @@ const trainer = data.course?.trainer ? await getEntry(data.course?.trainer) : nu
<div
class="text-black bg-linear-to-t from-lime-600 to-lime-400 border border-lime-400 p-5 lg:py-36 rounded-2xl relative overflow-hidden"
>
<Icon name="lock-closed" class="w-96 absolute -right-16 -bottom-16 text-black/10 max-lg:hidden" />
<Icon name="lock-closed" class="size-96 absolute -right-16 -bottom-16 text-black/10 max-lg:hidden" />
<div class="lg:w-8/12 2xl:w-6/14 mx-auto space-y-5">
<h6 class="text-4xl lg:text-6xl/14 lg:font-black">

View File

@@ -9,14 +9,13 @@ let posts = await res.json()
<Layout>
<Container>
{
posts.map((post) => (
<article>
<h2>
<a href={`/blog/${post.slug}`} set:html={post.title.rendered} />
</h2>
<!-- <Fragment set:html={post.content.rendered} /> -->
</article>
))
posts.map((post) => (
<article>
<h2>
<a href={`/blog/${post.slug}`} set:html={post.title.rendered} />
</h2>
</article>
))
}
</Container>
</Layout>

View File

@@ -1,24 +1,12 @@
@import 'tailwindcss';
@theme {
--font-sans:
'Roboto', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji';
--color-yellow-primary: #ffcf82;
--color-yellow-secondary: #f2ebe1;
--color-yellow-tertiary: #f9f7e8;
--color-green-primary: #2e3524;
--color-green-secondary: #8cd366;
--color-green-tertiary: #83926d;
--color-green-support: #c9fcad;
--color-green-pastel: #f9fff6;
--color-green-light: #cad9b4;
--color-green-dark: #4e8630;
--font-sans:
'Roboto', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji';
}
html,
body {
@apply text-white bg-black scroll-pt-22;
@apply text-white bg-black scroll-pt-22;
}