From 5600887dfc29be4b101abb125bd43b3b79503e9b Mon Sep 17 00:00:00 2001 From: Philip Colmer Date: Thu, 5 Mar 2026 08:01:51 +0000 Subject: [PATCH 1/3] Add FAQ page --- src/components/nav/Navbar.tsx | 176 ++++++++++++++++++++++++++++++---- src/pages/faq/index.astro | 59 ++++++++++++ 2 files changed, 217 insertions(+), 18 deletions(-) create mode 100644 src/pages/faq/index.astro 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(null); + const dropdownRef = useRef(null); useEffect(() => { setCurrentPath(globalThis.location.pathname); }, []); + useEffect(() => { + function handleClickOutside(e: MouseEvent) { + if ( + dropdownRef.current && + !dropdownRef.current.contains(e.target as Node) + ) { + setDropdownOpen(null); + } + } + document.addEventListener('click', handleClickOutside); + return () => document.removeEventListener('click', handleClickOutside); + }, []); + return ( <>
@@ -28,6 +53,63 @@ export default function Navbar() {
diff --git a/src/pages/faq/index.astro b/src/pages/faq/index.astro new file mode 100644 index 0000000..b7de3c3 --- /dev/null +++ b/src/pages/faq/index.astro @@ -0,0 +1,59 @@ +--- +import BaseLayout from '../../layouts/BaseLayout.astro'; +import backgroundImage from '../../assets/0233f2c4c9a0817f3a88064a357678647bb97e85.png'; + +const faqs = [ + { + question: 'Is there a clear role and set of responsibilities for Linaro?', + answer: + 'Linaro is an active Member of CoreCollective and provides governance, hosting, and other services.', + }, + { + question: 'What is the process for requesting the creation of a new CoreCollective Working Group?', + answer: + 'CoreCollective is always open to the proposal of new Working Groups. A new WG must be approved by the TAC Chair / TAC.', + }, +]; +--- + + +
+

+ Frequently Asked Questions +

+
+ { + faqs.map((faq) => ( +
+ + {faq.question} + + + + +
+ +
+
+ )) + } +
+
+
From af53869c615e6c50e874d165b730f093cf757c5d Mon Sep 17 00:00:00 2001 From: Philip Colmer Date: Thu, 5 Mar 2026 08:21:38 +0000 Subject: [PATCH 2/3] Left-align answer text --- src/pages/faq/index.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/faq/index.astro b/src/pages/faq/index.astro index b7de3c3..c72365e 100644 --- a/src/pages/faq/index.astro +++ b/src/pages/faq/index.astro @@ -28,7 +28,7 @@ const faqs = [

Frequently Asked Questions

-
+
{ faqs.map((faq) => (
From 4c59dbb298680797c0aa4d6be4e8c41b67cc0a6b Mon Sep 17 00:00:00 2001 From: Philip Colmer Date: Fri, 6 Mar 2026 08:37:14 +0000 Subject: [PATCH 3/3] Improve FAQ handling --- README.md | 36 ++++++++++++++++++++++++++++++++++++ src/content/config.ts | 11 +++++++++++ src/content/faq/faq.yaml | 14 ++++++++++++++ src/pages/faq/index.astro | 17 ++++------------- 4 files changed, 65 insertions(+), 13 deletions(-) create mode 100644 src/content/faq/faq.yaml 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:

+
    +
  • Submit a proposal to the TAC
  • +
  • Present to the TAC for approval
  • +
+

Contact info@corecollective.dev for details.

+``` + +**Supported HTML tags:** `

`, `