From efd9ecfa212b0a472d8c0cb230f52b9cc2dbb81d Mon Sep 17 00:00:00 2001 From: Aidan Date: Sat, 10 May 2025 05:02:12 -0400 Subject: [PATCH] func: add docs page + overview and mental health pages --- app/docs/page.tsx | 71 ++++++++++++++++++++++++++ components/docs/Docs.tsx | 22 ++++++++ components/docs/pages/MentalHealth.tsx | 10 ++++ components/docs/pages/Overview.tsx | 35 +++++++++++++ 4 files changed, 138 insertions(+) create mode 100644 app/docs/page.tsx create mode 100644 components/docs/Docs.tsx create mode 100644 components/docs/pages/MentalHealth.tsx create mode 100644 components/docs/pages/Overview.tsx diff --git a/app/docs/page.tsx b/app/docs/page.tsx new file mode 100644 index 0000000..a607a4d --- /dev/null +++ b/app/docs/page.tsx @@ -0,0 +1,71 @@ +"use client" + +import Header from '@/components/Header' +import Footer from '@/components/Footer' +import { IoDocumentTextOutline } from "react-icons/io5" +import { Docs, Doc } from '@/components/docs/Docs' +import { useState, useEffect } from 'react' +import { Loader2 } from 'lucide-react' + +export default function DocsPage() { + const [selectedDoc, setSelectedDoc] = useState(null) + const [isClient, setIsClient] = useState(false) + + useEffect(() => { + setSelectedDoc(Docs.Overview) + setIsClient(true) + }, []) + + return ( +
+
+
+
+
+ +

+ Docs +

+
+ + An organized collection of advice. + +
+
+
+

Concepts

+
+ {Object.values(Docs).map((doc: Doc) => ( +
setSelectedDoc(doc)} + > +
+ {doc.icon} + {doc.title} +
+
+ ))} +
+
+ +
+ {isClient && selectedDoc ? ( + selectedDoc.component + ) : ( +
+ + Loading... +
+ )} +
+
+
+
+
+ ) +} \ No newline at end of file diff --git a/components/docs/Docs.tsx b/components/docs/Docs.tsx new file mode 100644 index 0000000..a80eaa9 --- /dev/null +++ b/components/docs/Docs.tsx @@ -0,0 +1,22 @@ +import { House, Brain } from "lucide-react" +import { Overview } from "@/components/docs/pages/Overview" +import { MentalHealth } from "@/components/docs/pages/MentalHealth" + +export interface Doc { + title: string + component: React.ReactNode + icon: React.ReactNode +} + +export const Docs: Record = { + Overview: { + "title": "Overview", + "component": , + "icon": + }, + MentalHealth: { + "title": "Mental Health", + "component": , + "icon": + } +} \ No newline at end of file diff --git a/components/docs/pages/MentalHealth.tsx b/components/docs/pages/MentalHealth.tsx new file mode 100644 index 0000000..f23fae0 --- /dev/null +++ b/components/docs/pages/MentalHealth.tsx @@ -0,0 +1,10 @@ +export function MentalHealth() { + return ( +
+

Mental Health

+

+ --- +

+
+ ) +} \ No newline at end of file diff --git a/components/docs/pages/Overview.tsx b/components/docs/pages/Overview.tsx new file mode 100644 index 0000000..24be2da --- /dev/null +++ b/components/docs/pages/Overview.tsx @@ -0,0 +1,35 @@ +import Link from "@/components/objects/Link" + +export function Overview() { + return ( +
+
+

+ Overview +

+

+ It's time to get a cup of coffee! +

+
+
+

Docs is the space where I share my thoughts and advice on a variety of topics. All of the content is Unlicensed, meaning you are free to use it however you please. All content on this website is not legal, medical, financial, or professional advice.

+
+

+ Reading +

+

+ While reading, I hope you will consider the following: +

+
    +
  • + Even if your opinion is different than mine, that does not mean you're wrong. +
  • +
  • + Take all advice with a grain of salt; nobody lives the same life as you do. +
  • +
+
+
+
+ ) +} \ No newline at end of file