diff --git a/README.md b/README.md index 0ce2a48..4677dd3 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,42 @@ Copy the asset url and update the base url to "https://static.corecollective.dev Add the url in alphabetical order to the company.yaml list with a `alt` field also. If the logo appears larger or small add a `scale` field also to adjust accordingly. +## Updating FAQ content + +FAQ entries are stored in `src/content/faq/faq.yaml`. Each entry has a `question` and an `answer` field. + +### Simple answers + +For short, plain-text answers: + +```yaml +- question: "What is CoreCollective?" + answer: "CoreCollective provides a neutral platform for collaboration in the Arm ecosystem." +``` + +### Rich answers with HTML + +For answers that need bullet lists, links, email addresses, or multiple paragraphs, use the YAML `>` folded block scalar and write HTML: + +```yaml +- question: "What is the process for requesting a new Working Group?" + answer: > +
CoreCollective is always open to proposals. The process involves:
+Contact info@corecollective.dev for details.
+``` + +**Supported HTML tags:** ``, `
` tags when using multiple paragraphs
+- Use `` for email addresses
+- Links are automatically styled in cyan; lists and paragraphs are styled via Tailwind Typography
+- Preview changes locally with `npm run dev` before deploying
+
## Updating blogs
New blogs should be added as `.mdx` files to `src/content/blogs` folder.
diff --git a/src/components/nav/Navbar.tsx b/src/components/nav/Navbar.tsx
index ac62fc2..795b91f 100644
--- a/src/components/nav/Navbar.tsx
+++ b/src/components/nav/Navbar.tsx
@@ -1,9 +1,19 @@
-import React, { useState, useEffect } from 'react';
+import React, { useState, useEffect, useRef } from 'react';
import LogoImg from '../../assets/CoreCollective_White-Wordmark.png';
-const navLinks = [
+type NavLink =
+ | { name: string; href: string }
+ | { name: string; children: { name: string; href: string }[] };
+
+const navLinks: NavLink[] = [
{ name: 'Working Groups', href: '/working-groups/' },
- { name: 'About', href: '/about/' },
+ {
+ name: 'About',
+ children: [
+ { name: 'About', href: '/about/' },
+ { name: 'FAQ', href: '/faq/' },
+ ],
+ },
{ name: 'Join', href: '/join/' },
{ name: 'Blog & News', href: '/blog/' },
{ name: 'Contact', href: '/contact/' },
@@ -12,11 +22,26 @@ const navLinks = [
export default function Navbar() {
const [isOpen, setIsOpen] = useState(false);
const [currentPath, setCurrentPath] = useState('');
+ const [dropdownOpen, setDropdownOpen] = useState
{navLinks.map((link) => {
+ if ('children' in link) {
+ const isActive = link.children.some(
+ (child) => currentPath === child.href,
+ );
+ const isDropdownOpen = dropdownOpen === link.name;
+ return (
+
+ {link.children.map((child) => (
+
+ )}
+
- {navLinks.map((link) => (
-
+ {link.children.map((child) => (
+
+ )}
+
CoreCollective is always open to the proposal of new Working Groups. A new WG must be approved by the TAC Chair / TAC.
+Considerations regarding requesting the launch of new WGs:
+The above can be sent to enquiries@corecollective.dev for consideration. A member of the leadership team will respond with additional questions and proposed next steps.
diff --git a/src/pages/faq/index.astro b/src/pages/faq/index.astro new file mode 100644 index 0000000..baa5c0b --- /dev/null +++ b/src/pages/faq/index.astro @@ -0,0 +1,50 @@ +--- +import BaseLayout from '../../layouts/BaseLayout.astro'; +import backgroundImage from '../../assets/0233f2c4c9a0817f3a88064a357678647bb97e85.png'; +import { getEntry } from 'astro:content'; + +const faqData = await getEntry('faq', 'faq'); +const faqs = faqData?.data || []; +--- + +