From 97625a8398386fab13059ed272a3e060bd9b773c Mon Sep 17 00:00:00 2001 From: Desmond Grealy Date: Sun, 1 Jan 2023 23:11:18 -0800 Subject: [PATCH] Theme implementation which does not rely on the Chakra Container component, which is for contianing width (and buggy). Last commit before pulling in latest to resolve merge confilicts, and continue to fix the survey pages. --- website/src/components/AuthLayout.tsx | 6 +-- website/src/components/CallToAction.tsx | 47 ++++++++++++++++--- website/src/components/CircleBackground.tsx | 22 --------- website/src/components/Faq.tsx | 17 +++++-- website/src/components/Footer.tsx | 13 +++-- website/src/components/Header/Header.tsx | 6 +-- website/src/components/Header/NavLinks.tsx | 17 ++++++- website/src/components/Hero.tsx | 27 +++++++---- website/src/pages/auth/signin.tsx | 42 +++++++++++++---- website/src/pages/index.tsx | 6 ++- website/src/styles/Theme/colors.ts | 8 +++- .../src/styles/Theme/components/Container.ts | 10 +--- website/src/styles/Theme/index.ts | 18 +++++-- website/tailwind.config.js | 4 ++ 14 files changed, 161 insertions(+), 82 deletions(-) delete mode 100644 website/src/components/CircleBackground.tsx diff --git a/website/src/components/AuthLayout.tsx b/website/src/components/AuthLayout.tsx index 3d6ed134..e07c2c40 100644 --- a/website/src/components/AuthLayout.tsx +++ b/website/src/components/AuthLayout.tsx @@ -1,13 +1,13 @@ -import { Container } from "@chakra-ui/react"; + export function AuthLayout({ children }) { return ( - +
{children}
- +
); } diff --git a/website/src/components/CallToAction.tsx b/website/src/components/CallToAction.tsx index 2fd91c79..fc88af82 100644 --- a/website/src/components/CallToAction.tsx +++ b/website/src/components/CallToAction.tsx @@ -1,16 +1,51 @@ -import { CircleBackground } from "./CircleBackground"; +import { useId } from "react"; +import { useColorMode } from "@chakra-ui/react"; import { Container } from "./Container"; -export function CallToAction() { + +function CircleBackground({ width = 558, height = 558, ...props }) { + const id = useId(); + + const { colorMode } = useColorMode(); + const baseRingColor = colorMode === "light" ? "#777" : "#000"; + const gradStopColor = colorMode === "light" ? "#fff" : "#000"; + return ( -
+ + ); +} + + +export function CallToAction() { + + const { colorMode } = useColorMode(); + const bgColorClass = colorMode === "light" ? "bg-gray-900" : "bg-gray-50"; + const headingColorClass = colorMode === "light" ? "text-white" : "text-black"; + const textColorClass = colorMode === "light" ? "text-gray-300" : "text-black"; + const gradStopColor = colorMode === "light" ? "#06b6d4" : "#00f2ff"; + + return ( +
- +
-

Join Us

-

+

Join Us

+

All open source projects begin with people like you. Open source is the belief that if we collaborate we can together gift our knowledge and technology to the world for the benefit of humanity. Are you in? Find us here: diff --git a/website/src/components/CircleBackground.tsx b/website/src/components/CircleBackground.tsx deleted file mode 100644 index 5851d4ab..00000000 --- a/website/src/components/CircleBackground.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { useId } from "react"; - -export function CircleBackground({ color, width = 558, height = 558, ...props }) { - const id = useId(); - - return ( - - ); -} diff --git a/website/src/components/Faq.tsx b/website/src/components/Faq.tsx index d7c2eae9..e7b4c65a 100644 --- a/website/src/components/Faq.tsx +++ b/website/src/components/Faq.tsx @@ -1,4 +1,4 @@ -import Link from "next/link"; +import { useColorMode } from "@chakra-ui/react"; import { Container } from "./Container"; @@ -27,11 +27,20 @@ const faqs = [ ]; export function Faq() { + + const { colorMode } = useColorMode(); + const bgColorClass = colorMode === "light" ? "bg-gray-900" : "bg-gray-50"; + + const gradStopColor = colorMode === "light" ? "#06b6d4" : "#00f2ff"; + + const headingColorClass = colorMode === "light" ? "text-gray-900" : "text-white"; + const textColorClass = colorMode === "light" ? "text-gray-700" : "text-gray-100"; + return (

-

+

Frequently Asked Questions

{/*

@@ -54,8 +63,8 @@ export function Faq() {

    {column.map((faq, faqIndex) => (
  • -

    {faq.question}

    -

    {faq.answer}

    +

    {faq.question}

    +

    {faq.answer}

  • ))}
diff --git a/website/src/components/Footer.tsx b/website/src/components/Footer.tsx index 022e70c5..5e3ba0f9 100644 --- a/website/src/components/Footer.tsx +++ b/website/src/components/Footer.tsx @@ -1,12 +1,15 @@ import Image from "next/image"; import Link from "next/link"; - -import { Container, Text, useColorModeValue } from "@chakra-ui/react"; +import { useColorMode } from "@chakra-ui/react"; export function Footer() { + const { colorMode } = useColorMode(); + const bgColorClass = colorMode === "light" ? "bg-transparent" : "bg-gray-800"; + const borderClass = colorMode === "light" ? "border-slate-200" : "border-gray-900"; + return ( -
- +
+
logo @@ -66,7 +69,7 @@ export function Footer() {
- +
); } diff --git a/website/src/components/Header/Header.tsx b/website/src/components/Header/Header.tsx index b1d5c219..bc70478c 100644 --- a/website/src/components/Header/Header.tsx +++ b/website/src/components/Header/Header.tsx @@ -1,4 +1,4 @@ -import { Button, Container, Box } from "@chakra-ui/react"; +import { Button, Box } from "@chakra-ui/react"; import { Popover } from "@headlessui/react"; import { AnimatePresence, motion } from "framer-motion"; import Image from "next/image"; @@ -56,8 +56,7 @@ function AccountButton() { export function Header(props) { const borderClass = props.transparent ? "" : props.borderClass ?? "border-b border-gray-100"; return ( -