From 260ea88a873c10738643b6f82ff00bd854246ec4 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Wed, 19 Jul 2023 00:58:38 -0400 Subject: Sorting out files --- app/components/Header.js | 12 ++++++++++++ app/components/Navbar.js | 46 ++++++++++++++++++++++++++++++++++++++++++++++ app/components/PSA.js | 47 +++++++++++++++++++++++++++++++++++++++++++++++ app/components/psa.json | 5 +++++ 4 files changed, 110 insertions(+) create mode 100644 app/components/Header.js create mode 100644 app/components/Navbar.js create mode 100644 app/components/PSA.js create mode 100644 app/components/psa.json (limited to 'app/components') diff --git a/app/components/Header.js b/app/components/Header.js new file mode 100644 index 0000000..bd70dd0 --- /dev/null +++ b/app/components/Header.js @@ -0,0 +1,12 @@ +const Header = ({title, description}) => { + return ( +
+
+

{title}

+

{description}

+
+
+ ) +} + +export default Header; diff --git a/app/components/Navbar.js b/app/components/Navbar.js new file mode 100644 index 0000000..1555eb9 --- /dev/null +++ b/app/components/Navbar.js @@ -0,0 +1,46 @@ +"use client"; +import Image from "next/image"; +import Link from "next/link"; +import { useState } from "react"; + +const Navbar = () => { + const [navbar, setNavbar] = useState(false); + return ( + + ) +} + +export default Navbar; diff --git a/app/components/PSA.js b/app/components/PSA.js new file mode 100644 index 0000000..06bf9ba --- /dev/null +++ b/app/components/PSA.js @@ -0,0 +1,47 @@ +import psaMessage from './psa.json' assert { type: 'json' }; +import Link from "next/link"; + +const PSA = () => { + let defaultStyle = "flex flex-row md:px-40 px-30 py-0.5 space-x-2"; + let styleImportant; + let important; + switch (psaMessage.important) { + case 0: + styleImportant = "hidden" + defaultStyle += ' ' + styleImportant + break; + case 1: + important = "Latest News:" + styleImportant = "bg-zinc-700" + defaultStyle += ' ' + styleImportant + break; + case 2: + important = "WARNING!" + styleImportant = "bg-yellow-700" + defaultStyle += ' ' + styleImportant + break; + case 3: + important = "EMERGENCY!" + styleImportant = "bg-red-800" + defaultStyle += ' ' + styleImportant + break; + + } + + return ( +
+

{important}

+
+

{psaMessage.announcement}

+

+ {psaMessage.link && ( + + Learn more ↗ + + )}

+
+
+ ) +} + +export default PSA; diff --git a/app/components/psa.json b/app/components/psa.json new file mode 100644 index 0000000..df9869f --- /dev/null +++ b/app/components/psa.json @@ -0,0 +1,5 @@ +{ + "important": 0, + "announcement": "No important announcements", + "link": "https://google.ca" +} -- cgit v1.2.3