diff --git a/public/pages/faq/faq.png b/public/pages/faq/faq.png new file mode 100644 index 00000000..95955b15 Binary files /dev/null and b/public/pages/faq/faq.png differ diff --git a/public/svg/button-minus.svg b/public/svg/button-minus.svg new file mode 100644 index 00000000..e543fb2d --- /dev/null +++ b/public/svg/button-minus.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/public/svg/button-plus.svg b/public/svg/button-plus.svg new file mode 100644 index 00000000..febfa644 --- /dev/null +++ b/public/svg/button-plus.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index a7a9c9b6..c80126c6 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -11,7 +11,7 @@ export enum ButtonType { export interface ButtonProps { theme?: 'primary' | 'secondary' | 'positive' | 'caution' | 'danger' | 'discord'; - label: string | JSX.Element; + label?: string | JSX.Element; disabled?: boolean; className?: string; onClick?: () => void; @@ -49,8 +49,9 @@ const Button: FC = ({ } return ( - ); }; diff --git a/src/components/Discord/Discord.tsx b/src/components/Discord/Discord.tsx index 76623b08..0e17d465 100644 --- a/src/components/Discord/Discord.tsx +++ b/src/components/Discord/Discord.tsx @@ -1,22 +1,23 @@ import Image from 'next/legacy/image'; +import Link from 'next/link'; import Button from '../Button/Button'; import { links } from '../../constants/links'; const Discord = () => ( -
+

Discord

Join us to chat with other members of the community, get started with contributing, or ask us a question!

-
); diff --git a/src/components/Downloads/DownloadLinks.tsx b/src/components/Downloads/DownloadLinks.tsx index ba06067c..e000ef8f 100644 --- a/src/components/Downloads/DownloadLinks.tsx +++ b/src/components/Downloads/DownloadLinks.tsx @@ -1,19 +1,30 @@ +import Link from 'next/link'; import Button from '../Button/Button'; type DownloadProps = { - stableLink: string, - devLink: string, + stableLink?: string, + devLink?: string, aircraft: string, } -const downloadLinks = ({ aircraft }: DownloadProps) => ( +const downloadLinks = ({ stableLink, devLink, aircraft }: DownloadProps) => (

{aircraft}

- - + + + + + + + ) : ( +

Use our installer to download.

+ )}
); diff --git a/src/components/Faqs/Faqs.tsx b/src/components/Faqs/Faqs.tsx new file mode 100644 index 00000000..c3c93391 --- /dev/null +++ b/src/components/Faqs/Faqs.tsx @@ -0,0 +1,33 @@ +import { useState } from 'react'; +import Image from 'next/legacy/image'; + +type FaqsProps = { + question: string, + response?: string, +} + +// @TODO expand to see response functionality + +const Faqs = ({ question }: FaqsProps) => { + const [isToggled, setIsToggled] = useState(false); + + const onToggle = () => { + if (isToggled) { + setIsToggled(false); + } else { + setIsToggled(true); + } + }; + + return ( +
+

{question}

+ {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */} + +
+ ); +}; + +export default Faqs; diff --git a/src/components/Navigation/Footer.tsx b/src/components/Navigation/Footer.tsx index 54eae711..5b1ff5f8 100644 --- a/src/components/Navigation/Footer.tsx +++ b/src/components/Navigation/Footer.tsx @@ -50,6 +50,7 @@ const Footer = () => ( + diff --git a/src/components/Notam/Card.tsx b/src/components/Notam/Card.tsx index a6b39c36..650db7dc 100644 --- a/src/components/Notam/Card.tsx +++ b/src/components/Notam/Card.tsx @@ -3,7 +3,7 @@ import Image from "next/legacy/image"; import Tag from '../Utils/Tag'; import { PostListing } from '../../lib/notams/posts'; -const Card = (props: PostListing) => ( +const Card = (props: Omit) => (
- - + + )} {downloadURL && ( <> - )} diff --git a/src/components/Utils/Tag.tsx b/src/components/Utils/Tag.tsx index 6b21a307..ecacc230 100644 --- a/src/components/Utils/Tag.tsx +++ b/src/components/Utils/Tag.tsx @@ -1,13 +1,15 @@ import { twMerge } from 'tailwind-merge'; -type TagType = 'Update' | 'News' | 'Aircraft' | 'Software' | 'Latest' +export type TagType = 'Update' | 'News' | 'Aircraft' | 'Software' | 'Latest' export interface TagProps { - category: TagType; + category: AnyTag; className?: string; } -const handleCategory = (category: TagType) => { +export type AnyTag = TagType | Uppercase | Lowercase + +const handleCategory = (category: AnyTag) => { switch (category.toLowerCase() as Lowercase) { case 'update': return 'border-yellow-500 bg-yellow-500/20 text-yellow-500'; diff --git a/src/constants/frequentlyAsked.ts b/src/constants/frequentlyAsked.ts new file mode 100644 index 00000000..6a6ba496 --- /dev/null +++ b/src/constants/frequentlyAsked.ts @@ -0,0 +1,8 @@ +export const frequentlyAsked = [ + { question: 'When Will the Project be Released?', response: 'When it is ready' }, + { question: 'What is the meaning of life?', response: 'Lorem Ipsum' }, + { question: 'What is the meaning of life?', response: 'Lorem Ipsum' }, + { question: 'What is the meaning of life?', response: 'Lorem Ipsum' }, + { question: 'What is the meaning of life?', response: 'Lorem Ipsum' }, + { question: 'What is the meaning of life?', response: 'Lorem Ipsum' }, +]; diff --git a/src/constants/links.ts b/src/constants/links.ts index 9c87c939..a1fa3ead 100644 --- a/src/constants/links.ts +++ b/src/constants/links.ts @@ -6,4 +6,5 @@ export const links: {[name: string]: string} = { twitter: 'https://x.com/flybywiresim', facebook: 'https://www.facebook.com/FlyByWireSimulations/', opencollective: 'https://opencollective.com/flybywire', + docsfaq: 'https://docs.flybywiresim.com/faq', }; diff --git a/src/layouts/landing/Hero.tsx b/src/layouts/landing/Hero.tsx index 8f49e610..db62ecd9 100644 --- a/src/layouts/landing/Hero.tsx +++ b/src/layouts/landing/Hero.tsx @@ -33,7 +33,6 @@ const Hero = () => {

diff --git a/src/layouts/landing/Insights.tsx b/src/layouts/landing/Insights.tsx index 7a32c8b8..1794e621 100644 --- a/src/layouts/landing/Insights.tsx +++ b/src/layouts/landing/Insights.tsx @@ -59,7 +59,7 @@ const Insights = () => {
-
+
diff --git a/src/layouts/landing/Installer.tsx b/src/layouts/landing/Installer.tsx index 4d040201..5023c07e 100644 --- a/src/layouts/landing/Installer.tsx +++ b/src/layouts/landing/Installer.tsx @@ -1,29 +1,30 @@ +import { useRouter } from 'next/router'; import Section from '../../components/Utils/Section'; import Container from '../../components/Utils/Container'; import Button from '../../components/Button/Button'; -import { useRouter } from "next/router"; const Installer = () => { const router = useRouter(); return ( -
- -
-
-

Custom-built Installer

-

- Our custom-built, open-source installer is where we keep our projects for you to easily install. -

-
-
- {/* TODO: Change placeholder image */} -
- Installer -
- - -)}; + {/* TODO: Change placeholder image */} +
+ Installer +
+ + + ); +}; export default Installer; diff --git a/src/lib/notams/posts.ts b/src/lib/notams/posts.ts index 0222efd6..e62b65ea 100644 --- a/src/lib/notams/posts.ts +++ b/src/lib/notams/posts.ts @@ -9,6 +9,7 @@ import rehypeSlug from 'rehype-slug-custom-id'; import { remark } from 'remark'; import { rehype } from 'rehype'; import { slug } from 'github-slugger'; +import { TagType } from '../../components/Utils/Tag'; export interface PostListing { index: number; @@ -18,7 +19,8 @@ export interface PostListing { title: string, description: string, authors?: string[], - category: string, + category: TagType | Uppercase | Lowercase, + embedPreviewImage: string, metaImage: string, metaAlt: string, } diff --git a/src/lib/notams/preview.html b/src/lib/notams/preview.html new file mode 100644 index 00000000..8cc8a6ed --- /dev/null +++ b/src/lib/notams/preview.html @@ -0,0 +1,150 @@ + + + + + + + + + Title + + +
+ + {{category}} + {{readingStats}} + + {{title}} + Written by {{authors}} + Posted: {{date}} +
+ +
+ + + + diff --git a/src/pages/downloads/index.tsx b/src/pages/downloads/index.tsx index d6b94a34..4ab2681f 100644 --- a/src/pages/downloads/index.tsx +++ b/src/pages/downloads/index.tsx @@ -1,4 +1,5 @@ import { NextPage } from 'next'; +import Link from 'next/link'; import Section from '../../components/Utils/Section'; import Container from '../../components/Utils/Container'; import Button from '../../components/Button/Button'; @@ -24,7 +25,9 @@ const Downloads: NextPage = () => ( Our easy-to-use installer is the easiest way to get started with our addons. Simply launch and install any addon you want, with only two clicks.

-