diff --git a/astro.config.mjs b/astro.config.mjs index ebcaff43..382ef00a 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -2,8 +2,10 @@ import tailwind from "@astrojs/tailwind"; import icon from "astro-icon"; import { defineConfig } from "astro/config"; +import react from "@astrojs/react"; + // https://astro.build/config export default defineConfig({ site: "https://astro-moon-landing.netlify.app/", - integrations: [tailwind(), icon()], -}); + integrations: [tailwind(), icon(), react()] +}); \ No newline at end of file diff --git a/package.json b/package.json index f4c80931..709a29fe 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,16 @@ "tailwindcss-fluid-type": "^2.0.3" }, "dependencies": { + "@astrojs/react": "^3.0.10", "@fontsource-variable/inter": "^5.0.16", + "@headlessui/react": "^1.7.18", + "@heroicons/react": "^2.1.1", + "@types/react": "^18.2.55", + "@types/react-dom": "^18.2.19", + "heroicons": "^2.1.1", "micromodal": "^0.4.10", + "react": "^18.2.0", + "react-dom": "^18.2.0", "sharp": "^0.33.1", "tailwindcss": "^3.4.1", "tiny-invariant": "^1.3.1" diff --git a/src/components/compatibility.astro b/src/components/compatibility.astro index 987aa6ac..871420f1 100644 --- a/src/components/compatibility.astro +++ b/src/components/compatibility.astro @@ -1,6 +1,6 @@ --- -import CompatibilityList from "~/components/compatibility-list.astro"; -import ContentSection from "~/components/content-section.astro"; +import CompatibilityList from "~/components/compatibilityList.astro"; +import ContentSection from "~/components/contentSection.astro"; import type { CompatibilityItem } from "~/types"; const frameworks: Array = [ diff --git a/src/components/compatibility-list.astro b/src/components/compatibilityList.astro similarity index 100% rename from src/components/compatibility-list.astro rename to src/components/compatibilityList.astro diff --git a/src/components/content-section.astro b/src/components/contentSection.astro similarity index 100% rename from src/components/content-section.astro rename to src/components/contentSection.astro diff --git a/src/components/faqs.jsx b/src/components/faqs.jsx new file mode 100644 index 00000000..a146070a --- /dev/null +++ b/src/components/faqs.jsx @@ -0,0 +1,53 @@ +import { Disclosure } from '@headlessui/react' +import { PlayIcon } from '@heroicons/react/24/solid' +// import { getEntry } from 'astro:content'; +import faqs from "~/data/faqs.json" + +export default function Faqs() { + return ( +
+
+
+

Frequently asked questions

+

+ Have a different question and can’t find the answer you’re looking for? + Reach out to our support team by sending us an email and we’ll get back to you as soon as we can. +

+
+
+
+ {faqs.map((faq) => ( + + {({ open }) => ( + <> +
+ +
+ {open ? ( + + ) : ( + + )} +
+ {faq.question} + + +
+
+ +

{faq.answer}

+
+ + )} +
+ ))} +
+
+
+
+ ) +} diff --git a/src/components/features.astro b/src/components/features.astro index 9f4a9011..dd2beadc 100644 --- a/src/components/features.astro +++ b/src/components/features.astro @@ -1,6 +1,6 @@ --- import { Icon } from "astro-icon/components"; -import ContentSection from "~/components/content-section.astro"; +import ContentSection from "~/components/contentSection.astro"; import type { FeatureItem } from "~/types"; const features: Array = [ diff --git a/src/components/github-corner.astro b/src/components/github-corner.astro deleted file mode 100644 index 24926959..00000000 --- a/src/components/github-corner.astro +++ /dev/null @@ -1,51 +0,0 @@ - - - - diff --git a/src/components/header.astro b/src/components/header.astro index 23217979..d3afe75d 100644 --- a/src/components/header.astro +++ b/src/components/header.astro @@ -2,19 +2,23 @@ import { Icon } from "astro-icon/components"; import type { NavItem } from "~/types"; +const { sticky } = Astro.props; + const navItems: Array = [ { title: "Previous edition", url: "https://2023.bugsbyte.org/" }, + { title: "FAQs", url: "/faqs" }, ]; + +const headerClass = sticky + ? "z-20 flex w-full items-center justify-between border-b border-default px-8 py-4 text-white" + : "absolute bottom-0 z-20 flex w-full items-center justify-between border-b border-transparent px-8 py-4 text-white"; --- -