Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
Begin conversion to Chakra and Gatsby 3
Browse files Browse the repository at this point in the history
  • Loading branch information
rossng committed Mar 10, 2021
1 parent 96984c2 commit 16b6ceb
Show file tree
Hide file tree
Showing 13 changed files with 11,581 additions and 10,038 deletions.
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"plugins": ["./node_modules/prettier-plugin-organize-imports"],
"arrowParens": "avoid",
"semi": false,
"printWidth": 100
Expand Down
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"prettier.prettierPath": "./node_modules/prettier/"
}
9 changes: 5 additions & 4 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ module.exports = {
siteUrl: "https://clowdr.org/",
},
plugins: [
`gatsby-plugin-typescript`,
`gatsby-plugin-react-helmet`,
`gatsby-plugin-scss-typescript`,
`gatsby-plugin-cname`,
"gatsby-plugin-typescript",
"gatsby-plugin-react-helmet-async",
"gatsby-plugin-scss-typescript",
"gatsby-plugin-cname",
"@chakra-ui/gatsby-plugin"
],
}
21,129 changes: 11,242 additions & 9,887 deletions package-lock.json

Large diffs are not rendered by default.

31 changes: 19 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,39 @@
},
"dependencies": {
"@artsy/fresnel": "^1.3.1",
"gatsby": "^2.31.1",
"@chakra-ui/gatsby-plugin": "^1.0.1",
"@chakra-ui/react": "^1.3.3",
"@emotion/react": "^11.1.5",
"@emotion/styled": "^11.1.5",
"framer-motion": "^3.10.0",
"gatsby": "^3.0.0",
"gatsby-plugin-cname": "^1.0.0",
"gatsby-plugin-react-helmet": "^3.3.14",
"gatsby-plugin-typescript": "^2.5.0",
"gatsby-plugin-react-helmet-async": "^1.1.1",
"gatsby-plugin-typescript": "^3.0.0",
"prettier-plugin-organize-imports": "^1.1.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-helmet": "^6.1.0",
"react-helmet-async": "^1.0.9",
"react-icons": "^4.2.0",
"semantic-ui-css": "^2.4.1",
"semantic-ui-react": "^2.0.1"
"semantic-ui-react": "^2.0.3"
},
"devDependencies": {
"@hot-loader/react-dom": "^17.0.1",
"@types/react-helmet": "^6.1.0",
"@typescript-eslint/eslint-plugin": "^4.6.1",
"@typescript-eslint/parser": "^4.6.1",
"@typescript-eslint/eslint-plugin": "^4.16.1",
"@typescript-eslint/parser": "^4.16.1",
"babel-eslint": "^10.0.0",
"eslint": "^7.5.0",
"eslint": "^7.21.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-flowtype": "^5.2.0",
"eslint-plugin-flowtype": "^5.3.1",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.20.3",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.0.8",
"gatsby-plugin-scss-typescript": "^4.0.13",
"node-sass": "^4.14.1",
"prettier": "2.1.2",
"node-sass": "^5.0.0",
"prettier": "2.2.1",
"typescript": "^4.2.2"
},
"repository": {
Expand Down
184 changes: 184 additions & 0 deletions src/components/Layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
import {
Box,
chakra,
ChakraProvider,
CloseButton,
extendTheme,
Flex,
HStack,
IconButton,
Link,
PortalManager,
useColorModeValue,
useDisclosure,
VStack,
} from "@chakra-ui/react"
import { Link as GatsbyLink } from "gatsby"
import React from "react"
import { AiOutlineMenu } from "react-icons/ai"
import Footer from "./Footer"

export function Layout({
children,
}: {
children: JSX.Element[] | JSX.Element | string | string[]
}) {
const theme = extendTheme({
config: {
initialColorMode: "light",
},
colors: {
brand: {
"50": "#f1f9f7",
"100": "#e1f8ee",
"200": "#bdf3d6",
"300": "#86e9b6",
"400": "#35d783",
"500": "#12bf53",
"600": "#0fa43a",
"700": "#148535",
"800": "#16703f",
"900": "#14522b",
},
},
fonts: {
heading: "Lato,Helvetica Neue,Arial,Helvetica,sans-serif",
},
layerStyles: {
header: {
color: "#ffffff",
_hover: {
color: "#ffffff",
},
},
},
components: {
Link: {
variants: {
header: {
color: "#ffffff",
_hover: {
color: "#ffffff",
},
},
},
},
a: {
variants: {
header: {
color: "#ffffff",
_hover: {
color: "#ffffff",
},
},
},
},
},
})
const headerBg = useColorModeValue("brand.800", "brand.800")
const mobileNav = useDisclosure()

return (
<ChakraProvider theme={theme}>
<PortalManager>
<chakra.header
bg={headerBg}
layerStyle="header"
w="full"
px={{ base: 2, sm: 4 }}
py={4}
shadow="md"
>
<Flex alignItems="center" justifyContent="space-between" mx="auto">
<Flex>
<chakra.a
_hover={{ color: "white" }}
href="/"
title="Clowdr Home Page"
display="flex"
alignItems="center"
>
<chakra.h1 fontSize="3xl" fontWeight="400">
Clowdr
</chakra.h1>
</chakra.a>
</Flex>
<HStack display="flex" alignItems="center" spacing={1}>
<HStack
spacing={6}
mr={4}
fontSize="large"
color="brand.500"
display={{ base: "none", md: "inline-flex" }}
>
<Link as={GatsbyLink} to="/features" variant="header">
Features
</Link>
<Link as={GatsbyLink} to="/pricing" variant="header">
Pricing
</Link>
<Link as={GatsbyLink} to="/about" variant="header">
About
</Link>
<Link as={GatsbyLink} to="/jobs" variant="header">
Jobs
</Link>
<Link as={GatsbyLink} to="/feedback" variant="header">
Feedback
</Link>
</HStack>
<Box display={{ base: "inline-flex", md: "none" }}>
<IconButton
display={{ base: "flex", md: "none" }}
aria-label="Open menu"
fontSize="20px"
color={useColorModeValue("gray.800", "inherit")}
variant="ghost"
icon={<AiOutlineMenu />}
onClick={mobileNav.onOpen}
/>

<VStack
pos="absolute"
top={0}
left={0}
right={0}
display={mobileNav.isOpen ? "flex" : "none"}
flexDirection="column"
p={2}
pb={4}
m={2}
bg={headerBg}
spacing={3}
rounded="sm"
shadow="sm"
textAlign="center"
>
<CloseButton aria-label="Close menu" onClick={mobileNav.onClose} />

<Link as={GatsbyLink} to="/features" w="full">
Features
</Link>
<Link as={GatsbyLink} to="/pricing" w="full">
Pricing
</Link>
<Link as={GatsbyLink} to="/about" w="full">
About
</Link>
<Link as={GatsbyLink} to="/jobs" w="full">
Jobs
</Link>
<Link as={GatsbyLink} to="/feedback" w="full">
Feedback
</Link>
</VStack>
</Box>
</HStack>
</Flex>
</chakra.header>
<Box>{children}</Box>
<Footer />
</PortalManager>
</ChakraProvider>
)
}
8 changes: 2 additions & 6 deletions src/components/ResponsiveContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@ interface Props {
export default function ResponsiveContainer(props: Props) {
return (
<MediaContextProvider>
<DesktopContainer heading={props.heading}>
{props.children}
</DesktopContainer>
<MobileContainer heading={props.heading}>
{props.children}
</MobileContainer>
<DesktopContainer heading={props.heading}>{props.children}</DesktopContainer>
<MobileContainer heading={props.heading}>{props.children}</MobileContainer>
</MediaContextProvider>
)
}
2 changes: 1 addition & 1 deletion src/components/Title.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react"
import { Helmet } from "react-helmet"
import { Helmet } from "react-helmet-async"

export default function Title(props: { title: string }) {
return (
Expand Down
30 changes: 11 additions & 19 deletions src/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
import { Box, Heading } from "@chakra-ui/react"
import React from "react"
import { Helmet } from "react-helmet"
import { Container, Header } from "semantic-ui-react"
import "semantic-ui-css/semantic.min.css"
import ResponsiveContainer from "../components/ResponsiveContainer"
import { Helmet } from "react-helmet-async"
import { Layout } from "../components/Layout"

export default function About() {
export default function PageNotFound() {
return (
<ResponsiveContainer>
<Layout>
<Helmet>
<meta charSet="utf-8" />
<title>
Page not found | Clowdr - Virtual conferences that bring people together
emissions
</title>
<title>Page not found | Clowdr - Virtual conferences that bring people together</title>
</Helmet>
<Container text style={{ padding: "4em 0" }}>
<Header
as="h2"
style={{ fontSize: "2em", padding: "1em 0" }}
textAlign="center"
>
<Box text p={4}>
<Heading as="h2" textAlign="center">
Sorry, we couldn't find that page.
</Header>
</Container>
</ResponsiveContainer>
</Heading>
</Box>
</Layout>
)
}
20 changes: 11 additions & 9 deletions src/pages/features.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Link } from "gatsby"
import React from "react"
import { Helmet } from "react-helmet"
import { Helmet } from "react-helmet-async"
import { Button, Card, Container, Grid, Header, List, Segment, Statistic } from "semantic-ui-react"
import "semantic-ui-css/semantic.min.css"
import ResponsiveContainer from "../components/ResponsiveContainer"
Expand Down Expand Up @@ -302,25 +302,27 @@ export default function Solution() {
Interested in using Clowdr?
</Header>
<p style={{ fontSize: "1.33em" }}>We can provide:</p>
<List
divided
relaxed
>
<List divided relaxed>
<List.Item>
<List.Header>Click-and-go</List.Header>
<List.Content>We worry about the technology; you organize the conference. Recommended for events with a simple, single-track program.</List.Content>
<List.Content>
We worry about the technology; you organize the conference. Recommended for events
with a simple, single-track program.
</List.Content>
</List.Item>
<List.Item>
<List.Header>Expert support</List.Header>
<List.Content>
You organize, we help. We'll advise you on how to plan and set up your conference and provide virtual on-site support to make
sure everything runs smoothly. Recommended for more complex events, especially ones with multiple tracks.
You organize, we help. We'll advise you on how to plan and set up your conference and
provide virtual on-site support to make sure everything runs smoothly. Recommended for
more complex events, especially ones with multiple tracks.
</List.Content>
</List.Item>
<List.Item>
<List.Header>Hands-on support</List.Header>
<List.Content>
We organize, you help. We'll take your requirements and deliver a successful event from start to finish.
We organize, you help. We'll take your requirements and deliver a successful event
from start to finish.
</List.Content>
</List.Item>
<List.Item>
Expand Down
Loading

0 comments on commit 16b6ceb

Please sign in to comment.