From c9b5f94bba5a9097bc64e866d0453f1d22a4a18e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Rafael=20Siqueira?= Date: Mon, 21 Apr 2025 19:29:01 -0300 Subject: [PATCH] remove unecessary components --- superpage/astro.config.mjs | 2 +- superpage/package-lock.json | 7 ---- superpage/package.json | 1 - superpage/src/components/Accordion.astro | 6 --- superpage/src/components/Bookmark.jsx | 29 --------------- superpage/src/components/Card.tsx | 30 --------------- superpage/src/components/Faq.jsx | 47 ------------------------ superpage/src/components/HeaderNav.astro | 24 ++++++++++-- superpage/src/entrypoint.ts | 6 --- superpage/src/icons/lock-closed.svg | 4 +- superpage/src/layouts/Layout.astro | 3 -- superpage/src/pages/[slug].astro | 18 ++++----- superpage/src/pages/index.astro | 15 ++++---- superpage/src/styles/app.css | 20 ++-------- 14 files changed, 43 insertions(+), 169 deletions(-) delete mode 100644 superpage/src/components/Accordion.astro delete mode 100644 superpage/src/components/Bookmark.jsx delete mode 100644 superpage/src/components/Card.tsx delete mode 100644 superpage/src/components/Faq.jsx delete mode 100644 superpage/src/entrypoint.ts diff --git a/superpage/astro.config.mjs b/superpage/astro.config.mjs index c12dc54..af3a677 100644 --- a/superpage/astro.config.mjs +++ b/superpage/astro.config.mjs @@ -13,7 +13,7 @@ export default defineConfig({ integrations: [ sitemap(), icon(), - alpinejs({ entrypoint: '/src/entrypoint' }), + alpinejs(), partytown({ config: { forward: ['dataLayer.push', 'fbq'], diff --git a/superpage/package-lock.json b/superpage/package-lock.json index 5cbc10a..a32b5d6 100644 --- a/superpage/package-lock.json +++ b/superpage/package-lock.json @@ -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", diff --git a/superpage/package.json b/superpage/package.json index c0899df..715d1f9 100644 --- a/superpage/package.json +++ b/superpage/package.json @@ -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", diff --git a/superpage/src/components/Accordion.astro b/superpage/src/components/Accordion.astro deleted file mode 100644 index e82ba17..0000000 --- a/superpage/src/components/Accordion.astro +++ /dev/null @@ -1,6 +0,0 @@ -
- Why do they call it Ovaltine? -
-

The mug is round. The jar is round. They should call it Roundtine.

-
-
diff --git a/superpage/src/components/Bookmark.jsx b/superpage/src/components/Bookmark.jsx deleted file mode 100644 index 724bde0..0000000 --- a/superpage/src/components/Bookmark.jsx +++ /dev/null @@ -1,29 +0,0 @@ -export function Bookmark(props) { - return ( - - - - - - - - - - - ) -} diff --git a/superpage/src/components/Card.tsx b/superpage/src/components/Card.tsx deleted file mode 100644 index 73d1305..0000000 --- a/superpage/src/components/Card.tsx +++ /dev/null @@ -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 ( -
- {children} -
- ) -} diff --git a/superpage/src/components/Faq.jsx b/superpage/src/components/Faq.jsx deleted file mode 100644 index e31a2f4..0000000 --- a/superpage/src/components/Faq.jsx +++ /dev/null @@ -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) => ( - - - {idx + 1}. {topic} - - -

- 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. -

-

- 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. -

-
-
- ))} - - ) -} - -export function ListItem({ children, ...props }) { - return ( - - {children} - - ) -} - -export function ListButton({ children }) { - return ( - - {children} - - - ) -} - -export function ListPanel({ children }) { - return {children} -} diff --git a/superpage/src/components/HeaderNav.astro b/superpage/src/components/HeaderNav.astro index d68bd0b..57674f8 100644 --- a/superpage/src/components/HeaderNav.astro +++ b/superpage/src/components/HeaderNav.astro @@ -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) ---