Skip to content

Commit

Permalink
feat: πŸŽ‰ 🚧 web part [WIP] (#7)
Browse files Browse the repository at this point in the history
* ✨ feat: add module collection snippets

* feat: πŸŽ‰ init nextjs with chakra ui

* feat: ✨ header and hero section done

* chore: 🚧 working section
  • Loading branch information
anuraglol committed Mar 13, 2022
1 parent da75d5b commit 6f762ac
Show file tree
Hide file tree
Showing 20 changed files with 3,539 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .prettierignore
@@ -1,2 +1,3 @@
*/node_modules
*/husky
*/husky
*/.next
3 changes: 3 additions & 0 deletions web/.eslintrc.json
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
38 changes: 38 additions & 0 deletions web/.gitignore
@@ -0,0 +1,38 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

# typescript
*.tsbuildinfo
34 changes: 34 additions & 0 deletions web/README.md
@@ -0,0 +1,34 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.

[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.ts`.

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.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
46 changes: 46 additions & 0 deletions web/components/Navigation/Header.component.tsx
@@ -0,0 +1,46 @@
import { FC } from "react";

import { Box, Text, Flex } from "@chakra-ui/react";

const Header: FC = () => {
return (
<>
<Box
px="10"
py="8"
display="flex"
flexDir="row"
alignItems="center"
justifyContent="space-between"
>
<Box
display="flex"
flexDir="row"
alignItems="center"
fontFamily="jost"
fontSize="2xl"
fontWeight="600"
>
<Text>✨third</Text>
<Text fontWeight="400">snips</Text>
</Box>

<Box
display="flex"
flexDir="row"
alignItems="center"
fontFamily="sen"
fontSize="xl"
fontWeight="700"
gap="8"
>
<Text>github.</Text>

<Text>early access.</Text>
</Box>
</Box>
</>
);
};

export default Header;
73 changes: 73 additions & 0 deletions web/components/Sections/Hero.section.tsx
@@ -0,0 +1,73 @@
import { FC } from "react";

import { Box, Text, Button } from "@chakra-ui/react";
import Typed from "react-typed";
import { BsArrowRightShort } from "react-icons/bs";

const Hero: FC = () => {
return (
<>
<Box
display="flex"
flexDir="column"
textAlign="center"
justifyContent="center"
fontFamily="syncopate"
fontWeight="700"
fontSize="5xl"
textColor="gray.700"
mt="16"
>
<Typed
strings={["stop writing thirdweb snippets"]}
typeSpeed={40}
loop={false}
/>

<Text textColor="gray.600">
<Typed
strings={["use thirdsnips to make it all snap!"]}
typeSpeed={40}
loop={false}
/>
</Text>

<Text
fontFamily="sen"
fontSize="xl"
textColor="gray.500"
fontWeight="400"
>
all the code snippets from thirdweb portal, packed in an vscode
extension
</Text>

<Box>
<Button
fontFamily="jost"
marginTop="12"
fontSize="2xl"
bgColor="#010101"
textColor="white"
transition="all"
shadow="xl"
p="6"
_focus={{
backgroundColor: "#010101",
}}
_hover={{
backgroundColor: "#010101",
marginLeft: "4",
transitionDuration: "100ms",
}}
>
get started
<BsArrowRightShort size="25" />
</Button>
</Box>
</Box>
</>
);
};

export default Hero;
63 changes: 63 additions & 0 deletions web/components/Sections/Working.section.tsx
@@ -0,0 +1,63 @@
import { FC } from "react";

import { Box, Text } from "@chakra-ui/react";

const Working: FC = () => {
return (
<Box
display="flex"
flexDir="column"
textAlign="center"
justifyContent="center"
fontFamily="syncopate"
fontWeight="700"
fontSize="5xl"
textColor="gray.700"
my="4"
>
<Box
display="flex"
flexDir="row"
justifyContent="center"
alignItems="center"
my="16"
fontSize="3xl"
>
<Text>how it&nbsp;</Text>
<Text bgGradient="linear(to-r, #7f00ff, #e100ff)" bgClip="text">
works
</Text>
</Box>

<Box
display="flex"
flexDir="row"
justifyContent="center"
alignItems="center"
gap="20"
>
<Box py="16" px="12" rounded="md" bgColor="#010101" textColor="white">
<Text fontSize="xl">1. installation</Text>

<Text fontSize="lg" fontFamily="sen" fontWeight="400">
You can install our <br />
extension through VSCode <br />
Marketplace
</Text>
</Box>

<Box py="16" px="12" rounded="md" bgColor="#010101" textColor="white">
<Text fontSize="xl">2. usage</Text>

<Text fontSize="lg" fontFamily="sen" fontWeight="400">
once installed, reload your <br />
IDE and you're good to
<br /> go!
</Text>
</Box>
</Box>
</Box>
);
};

export default Working;
3 changes: 3 additions & 0 deletions web/components/index.ts
@@ -0,0 +1,3 @@
export { default as Header } from "./Navigation/Header.component";
export { default as Hero } from "./Sections/Hero.section";
export { default as Working } from "./Sections/Working.section";
5 changes: 5 additions & 0 deletions web/next-env.d.ts
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
6 changes: 6 additions & 0 deletions web/next.config.js
@@ -0,0 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
};

module.exports = nextConfig;
32 changes: 32 additions & 0 deletions web/package.json
@@ -0,0 +1,32 @@
{
"name": "web",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@chakra-ui/react": "^1.8.6",
"@emotion/react": "^11",
"@emotion/styled": "^11",
"@fontsource/jost": "^4.5.4",
"@fontsource/sen": "^4.5.3",
"@fontsource/syncopate": "^4.5.3",
"framer-motion": "^6",
"next": "12.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-icons": "^4.3.1",
"react-typed": "^1.2.0"
},
"devDependencies": {
"@types/node": "17.0.21",
"@types/react": "17.0.40",
"eslint": "8.11.0",
"eslint-config-next": "12.1.0",
"typescript": "4.6.2"
}
}
26 changes: 26 additions & 0 deletions web/pages/_app.tsx
@@ -0,0 +1,26 @@
import type { AppProps } from "next/app";

import { ChakraProvider } from "@chakra-ui/react";
import theme from "../styles/theme";

import "@fontsource/jost/400.css";
import "@fontsource/jost/500.css";
import "@fontsource/jost/600.css";

import "@fontsource/syncopate/400.css";
import "@fontsource/syncopate/700.css";

import "@fontsource/sen/400.css";
import "@fontsource/sen/700.css";

function MyApp({ Component, pageProps }: AppProps) {
return (
<>
<ChakraProvider theme={theme}>
<Component {...pageProps} />
</ChakraProvider>
</>
);
}

export default MyApp;
13 changes: 13 additions & 0 deletions web/pages/api/hello.ts
@@ -0,0 +1,13 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextApiRequest, NextApiResponse } from "next";

type Data = {
name: string;
};

export default function handler(
req: NextApiRequest,
res: NextApiResponse<Data>
) {
res.status(200).json({ name: "John Doe" });
}
24 changes: 24 additions & 0 deletions web/pages/index.tsx
@@ -0,0 +1,24 @@
import type { NextPage } from "next";

import { Box } from "@chakra-ui/react";
import { Header, Hero, Working } from "../components";

const Home: NextPage = () => {
return (
<>
<Box
h="100vh"
w="100vw"
overflowX="hidden"
bgImage="https://www.buildspacein.xyz/section1/background_gradient.svg"
backgroundSize="cover"
>
<Header />
<Hero />
<Working />
</Box>
</>
);
};

export default Home;

0 comments on commit 6f762ac

Please sign in to comment.