Skip to content

Commit c8e92e5

Browse files
committed
first commit
0 parents  commit c8e92e5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+6203
-0
lines changed

Diff for: .eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
.next

Diff for: .eslintrc

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaFeatures": {
6+
"jsx": true
7+
}
8+
},
9+
"env": {
10+
"browser": true,
11+
"node": true
12+
},
13+
"extends": [
14+
"eslint:recommended",
15+
"plugin:@typescript-eslint/eslint-recommended",
16+
"plugin:@typescript-eslint/recommended",
17+
"plugin:react/recommended",
18+
"plugin:react-hooks/recommended",
19+
"plugin:jsx-a11y/recommended"
20+
],
21+
"rules": {
22+
"@typescript-eslint/explicit-module-boundary-types": "off",
23+
"react/prop-types": "off",
24+
"react/react-in-jsx-scope": "off",
25+
"@typescript-eslint/explicit-function-return-type": "off",
26+
"@typescript-eslint/ban-ts-ignore": "off",
27+
"jsx-a11y/label-has-associated-control": [
28+
"error",
29+
{
30+
"labelComponents": [],
31+
"labelAttributes": [],
32+
"controlComponents": [],
33+
"assert": "either",
34+
"depth": 25
35+
}
36+
],
37+
"@typescript-eslint/no-explicit-any": "off"
38+
},
39+
"settings": {
40+
"react": {
41+
"version": "detect"
42+
}
43+
}
44+
}

Diff for: .gitignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// .gitnignore
2+
# next.js build output
3+
.next
4+
# dotenv environment variables file
5+
.env
6+
.env.build
7+
# Dependency directories
8+
node_modules/
9+
# Logs
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
14+
.DS_Store

Diff for: .pretterrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"proseWrap": "always",
3+
"jsxBracketSameLine": true
4+
}

Diff for: .prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
.next

Diff for: README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# The Web3 Index
2+
3+
The Web3 Index provides usage data across the web3 stack with an initial focus on middleware network revenue.
4+
5+
## Getting Started
6+
7+
First, run the development server:
8+
9+
```bash
10+
npm run dev
11+
# or
12+
yarn dev
13+
```
14+
15+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
16+
17+
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
18+
19+
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
20+
21+
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

Diff for: components/Box/index.tsx

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { styled } from "../../stitches.config";
2+
3+
const Box = styled("div", {
4+
// Reset
5+
boxSizing: "border-box",
6+
});
7+
8+
export default Box;

Diff for: components/Button/index.tsx

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { styled } from "../../stitches.config";
2+
3+
const StyledButton = styled("button", {
4+
// Reset
5+
boxSizing: "border-box",
6+
border: 0,
7+
borderRadius: "$round",
8+
fontWeight: 700,
9+
fontSize: "$1",
10+
backgroundColor: "$hiContrast",
11+
color: "$loContrast",
12+
py: "$3",
13+
px: "$4",
14+
cursor: "pointer",
15+
});
16+
17+
const Button = ({ children, ...props }) => (
18+
<StyledButton {...props}>{children}</StyledButton>
19+
);
20+
21+
export default Button;

Diff for: components/CallToAction/index.tsx

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import Box from "../Box";
2+
import Button from "../Button";
3+
import { PlusCircledIcon } from "@modulz/radix-icons";
4+
import { styled } from "../../stitches.config";
5+
6+
const StyledIcon = styled(PlusCircledIcon, {
7+
ml: "$2",
8+
});
9+
10+
const CallToAction = ({ ...props }) => {
11+
return (
12+
<Box {...props}>
13+
<Box as="h2" css={{ fontSize: "$9", mb: "$3", fontFamily: "$heading" }}>
14+
Help Grow the Index
15+
</Box>
16+
<Button css={{ mx: "auto", display: "flex", alignItems: "center" }}>
17+
Submit a Project{" "}
18+
<StyledIcon css={{ width: 15, height: 15, color: "$lowContrast" }} />
19+
</Button>
20+
</Box>
21+
);
22+
};
23+
24+
export default CallToAction;

Diff for: components/Container/index.tsx

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { styled, StitchesCss, StitchesVariants } from "../../stitches.config";
2+
3+
export type ContainerProps = StitchesCss<typeof Container>;
4+
export type ContainerVariants = StitchesVariants<typeof Container>;
5+
6+
const Container = styled("div", {
7+
// Reset
8+
boxSizing: "border-box",
9+
flexShrink: 0,
10+
11+
// Custom
12+
mx: "auto",
13+
px: "$4",
14+
15+
variants: {
16+
size: {
17+
"1": {
18+
maxWidth: "430px",
19+
},
20+
"2": {
21+
maxWidth: "715px",
22+
},
23+
"3": {
24+
maxWidth: "1145px",
25+
},
26+
"4": {
27+
maxWidth: "1400px",
28+
},
29+
"5": {
30+
maxWidth: "none",
31+
},
32+
},
33+
},
34+
});
35+
36+
export default Container;

Diff for: components/Faq/index.tsx

+137
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
import Box from "../Box";
2+
import * as Accordion from "@radix-ui/react-accordion";
3+
import { ChevronDownIcon } from "@modulz/radix-icons";
4+
import { styled } from "../../stitches.config";
5+
import { filterCssFromProps } from "../../lib/utils";
6+
7+
const AccordionChevron = styled(ChevronDownIcon, {
8+
transition: "transform 300ms",
9+
"[data-state=open] &": {
10+
transform: "rotate(180deg)",
11+
},
12+
});
13+
14+
const Item = ({ emoji, question, answer }) => (
15+
<Box
16+
as={Accordion.Item}
17+
value={emoji}
18+
css={{
19+
borderBottom: "1px solid",
20+
borderColor: "$border",
21+
h3: {
22+
m: 0,
23+
},
24+
"&:last-child": {
25+
borderBottom: 0,
26+
},
27+
}}
28+
>
29+
<Box as={Accordion.Header} css={{ margin: 0 }}>
30+
<Box
31+
as={Accordion.Button}
32+
css={{
33+
display: "flex",
34+
alignItems: "center",
35+
backgroundColor: "transparent",
36+
border: "none",
37+
py: "$4",
38+
outline: "none",
39+
flex: 1,
40+
textAlign: "left",
41+
background: "transparent",
42+
my: 0,
43+
width: "100%",
44+
fontSize: "$4",
45+
cursor: "pointer",
46+
fontWeight: 600,
47+
}}
48+
>
49+
<Box css={{ display: "flex", alignItems: "center", mr: "auto" }}>
50+
<Box css={{ mr: "$3" }}>
51+
<Box role="img" aria-label="What is Web3">
52+
{emoji}
53+
</Box>
54+
</Box>
55+
{question}
56+
</Box>
57+
<AccordionChevron />
58+
</Box>
59+
</Box>
60+
<Box
61+
as={Accordion.Panel}
62+
css={{ pb: "$3", mb: 0, fontSize: "$2", lineHeight: "$3" }}
63+
>
64+
{answer}
65+
</Box>
66+
</Box>
67+
);
68+
69+
const items = [
70+
{
71+
emoji: "🌐",
72+
question: "What is Web3?",
73+
answer: `Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
74+
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
75+
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
76+
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
77+
velit esse cillum dolore eu fugiat nulla pariatur.`,
78+
},
79+
{
80+
emoji: "🤙🏻",
81+
question: "What’s the purpose of The Web3 Index?",
82+
answer: `Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
83+
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
84+
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
85+
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
86+
velit esse cillum dolore eu fugiat nulla pariatur.`,
87+
},
88+
89+
{
90+
emoji: "🔢",
91+
question: "How do we calculate total participant revenue (TPR)?",
92+
answer: `Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
93+
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
94+
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
95+
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
96+
velit esse cillum dolore eu fugiat nulla pariatur.`,
97+
},
98+
{
99+
emoji: "🤘🏻",
100+
question: "How do I get involved in Web3?",
101+
answer: `Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
102+
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
103+
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
104+
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
105+
velit esse cillum dolore eu fugiat nulla pariatur.`,
106+
},
107+
{
108+
emoji: "✅",
109+
question: "How do I get my project listed on The Web3 Index?",
110+
answer: `Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
111+
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
112+
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
113+
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
114+
velit esse cillum dolore eu fugiat nulla pariatur.`,
115+
},
116+
];
117+
const Faq = ({ ...props }) => {
118+
return (
119+
<Box
120+
css={{ maxWidth: 600, mx: "auto", ...props?.css }}
121+
{...filterCssFromProps(props)}
122+
>
123+
<Accordion.Root type="single" defaultValue="🌐">
124+
{items.map((item, i) => (
125+
<Item
126+
key={i}
127+
emoji={item.emoji}
128+
question={item.question}
129+
answer={item.answer}
130+
/>
131+
))}
132+
</Accordion.Root>
133+
</Box>
134+
);
135+
};
136+
137+
export default Faq;

Diff for: components/Footer/index.tsx

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import Box from "../Box";
2+
import { TwitterLogoIcon, GitHubLogoIcon } from "@modulz/radix-icons";
3+
import ThemeToggle from "../ThemeToggle";
4+
5+
const Footer = ({ ...props }) => {
6+
return (
7+
<Box
8+
css={{
9+
borderTop: "1px solid",
10+
borderColor: "$border",
11+
py: "$4",
12+
display: "grid",
13+
gridTemplateColumns: "repeat(3, minmax(0, 1fr))",
14+
margin: "0 auto",
15+
fontSize: "$1",
16+
}}
17+
{...props}
18+
>
19+
<Box css={{ textAlign: "left", display: "flex", alignItems: "center" }}>
20+
<Box css={{ display: "flex", alignItems: "center", mr: "$3" }}>
21+
<TwitterLogoIcon />
22+
<Box css={{ ml: "$2" }}>Twitter</Box>
23+
</Box>
24+
<Box css={{ display: "flex", alignItems: "center", mr: "$3" }}>
25+
<GitHubLogoIcon />
26+
<Box css={{ ml: "$2" }}>Github</Box>
27+
</Box>
28+
<Box css={{ display: "flex", alignItems: "center" }}>
29+
<TwitterLogoIcon />
30+
<Box css={{ ml: "$2" }}>Discord</Box>
31+
</Box>
32+
</Box>
33+
<Box css={{ textAlign: "center" }}>
34+
The Web3 Index™. All rights reserved
35+
</Box>
36+
<Box
37+
css={{
38+
display: "flex",
39+
justifyContent: "flex-end",
40+
}}
41+
>
42+
<ThemeToggle />
43+
</Box>
44+
</Box>
45+
);
46+
};
47+
48+
export default Footer;

0 commit comments

Comments
 (0)