diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index d6903d5c..00000000 --- a/.eslintrc +++ /dev/null @@ -1,119 +0,0 @@ -{ - "root": true, - "parser": "@typescript-eslint/parser", - "parserOptions": { - // TODO: Enable type-aware linting (https://typescript-eslint.io/docs/linting/type-linting) - // "tsconfigRootDir": ".", - // "project": ["./packages/*/tsconfig.json"], - "sourceType": "module", - "ecmaFeatures": { - "jsx": true - }, - "warnOnUnsupportedTypeScriptVersion": true - }, - "env": { - "browser": true, - "node": true - }, - "plugins": [ - "@typescript-eslint", - "import", - "simple-import-sort", - "react", - "jsx-a11y" - ], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - // "plugin:@typescript-eslint/recommended-requiring-type-checking", - "plugin:eslint-comments/recommended", - "plugin:import/recommended", - "plugin:import/typescript", - "plugin:jsx-a11y/recommended", - "plugin:react/recommended", - "plugin:react-hooks/recommended", - "plugin:react/jsx-runtime", - "prettier" - ], - "overrides": [ - { - "files": ["examples/**/*.tsx"], - "rules": { - "react/jsx-uses-react": "off", - "react/react-in-jsx-scope": "off" - } - }, - { - // TODO: add https://github.com/francoismassart/eslint-plugin-tailwindcss - "files": ["./apps/website/"], - "extends": ["next", "next/core-web-vitals"] - // "settings": { - // "import/resolver": { - // "typescript": { - // "extensions": [".js", ".jsx", ".ts", ".tsx"], - // "project": ["tsconfig.json", "apps/website/tsconfig.json"] - // } - // } - // } - } - ], - "rules": { - "react/prop-types": 0, - // "@typescript-eslint/consistent-type-definitions": ["error", "interface"], - "@typescript-eslint/consistent-type-imports": "error", - // TODO: turn on this rul - "@typescript-eslint/no-non-null-assertion": "off", - // "@typescript-eslint/consistent-type-exports": "error", - "simple-import-sort/imports": [ - "error", - { - "groups": [ - // Side effect imports. - ["^\\u0000"], - // `react` related packages come first. - ["^react$", "^react-dom$"], - // Things that start with a letter (or digit or underscore), or `@` followed by a letter. - ["^@?\\w"], - // Absolute imports and other imports such as Vue-style `@/foo`. - // Anything not matched in another group. - ["^"], - // Relative imports. - // Anything that starts with a dot. - ["^\\."], - // type imports last as a separate group - ["^.+\\u0000$"] - ] - } - ], - "simple-import-sort/exports": "error", - "import/first": "error", - "import/newline-after-import": "error", - "import/no-duplicates": "error" - }, - "settings": { - "react": { - "version": "detect" - }, - "import/resolver": { - "node": { - "extensions": [".js", ".jsx", ".ts", ".tsx"], - "project": [ - "tsconfig.base.json", - "packages/*/tsconfig.json", - "apps/*/tsconfig.json" - ] - }, - "typescript": { - "alwaysTryTypes": true, - "project": [ - "tsconfig.base.json", - "packages/*/tsconfig.json", - "apps/*/tsconfig.json" - ] - } - }, - "import/ignore": ["react-native"] - } -} - -// appp/website; extend eslint-config-next diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2677bae..d9fd83f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,11 @@ on: pull_request: types: [opened, synchronize] +env: + NEXT_PUBLIC_GHOST_API_KEY: '' + INFURA_API_KEY: '' + TAMAGUI_TARGET: 'web' + jobs: build: name: Build and Test diff --git a/.vscode/settings.json b/.vscode/settings.json index 36c53bbc..a7375cd5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,11 @@ { "typescript.tsdk": "node_modules/typescript/lib", "eslint.packageManager": "yarn", - "npm.packageManager": "yarn" + "npm.packageManager": "yarn", + "eslint.workingDirectories": [ + { + "mode": "auto", + "#comment": "See https://github.com/microsoft/vscode-eslint/issues/1161 for reason (i.e. multiple .eslintrc config files)" + } + ] } diff --git a/apps/mobile/.eslintrc b/apps/mobile/.eslintrc new file mode 100644 index 00000000..bef97c7d --- /dev/null +++ b/apps/mobile/.eslintrc @@ -0,0 +1,4 @@ +{ + "root": true, + "extends": ["@status-im/eslint-config"] +} diff --git a/apps/mobile/package.json b/apps/mobile/package.json index 54966df6..a8a7c5c7 100644 --- a/apps/mobile/package.json +++ b/apps/mobile/package.json @@ -38,6 +38,7 @@ "@types/react-native": "~0.70.6", "babel-plugin-module-resolver": "^4.1.0", "babel-plugin-transform-inline-environment-variables": "^0.4.4", + "@status-im/eslint-config": "*", "typescript": "^5.0.3" } } diff --git a/apps/web/.eslintrc b/apps/web/.eslintrc new file mode 100644 index 00000000..51442486 --- /dev/null +++ b/apps/web/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + "extends": [ + "@status-im/eslint-config", + "plugin:tailwindcss/recommended", + "next", + "next/core-web-vitals" + ] +} diff --git a/apps/web/package.json b/apps/web/package.json index dd2f98fa..a02f5923 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -24,6 +24,7 @@ "@types/react": "^18.0.33", "@types/react-dom": "^18.0.11", "@vitejs/plugin-react-swc": "^3.2.0", + "@status-im/eslint-config": "*", "typescript": "^5.0.3", "vite": "^4.2.1" } diff --git a/apps/website/.eslintrc b/apps/website/.eslintrc new file mode 100644 index 00000000..51442486 --- /dev/null +++ b/apps/website/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + "extends": [ + "@status-im/eslint-config", + "plugin:tailwindcss/recommended", + "next", + "next/core-web-vitals" + ] +} diff --git a/apps/website/.prettierrc b/apps/website/.prettierrc new file mode 100644 index 00000000..2ec5b2fc --- /dev/null +++ b/apps/website/.prettierrc @@ -0,0 +1,6 @@ +{ + "semi": false, + "singleQuote": true, + "arrowParens": "avoid", + "tailwindConfig": "./tailwind.config.cjs" +} diff --git a/apps/website/env.d.ts b/apps/website/env.d.ts new file mode 100644 index 00000000..0bd9db58 --- /dev/null +++ b/apps/website/env.d.ts @@ -0,0 +1,12 @@ +import type { clientEnv } from './src/config/env.client.mjs' +import type { serverEnv } from './src/config/env.server.mjs' + +type Env = typeof clientEnv & typeof serverEnv + +declare global { + namespace NodeJS { + /* eslint-disable @typescript-eslint/no-empty-interface */ + interface ProcessEnv extends Env {} + /* eslint-enable @typescript-eslint/no-empty-interface */ + } +} diff --git a/apps/website/next.config.js b/apps/website/next.config.mjs similarity index 82% rename from apps/website/next.config.js rename to apps/website/next.config.mjs index aa85ba48..fe30adab 100644 --- a/apps/website/next.config.js +++ b/apps/website/next.config.mjs @@ -1,9 +1,13 @@ /* eslint-disable eslint-comments/disable-enable-pair */ -/* eslint-disable @typescript-eslint/no-var-requires */ +/* eslint-disable import/default */ -/** @type {import('next').NextConfig} */ -const { withTamagui } = require('@tamagui/next-plugin') -const { join } = require('path') +import './src/config/env.server.mjs' +import './src/config/env.client.mjs' + +import tamagui_next_plugin from '@tamagui/next-plugin' +import { join } from 'node:path' + +const { withTamagui } = tamagui_next_plugin /** @type {import('next').NextConfig} */ let config = { @@ -26,6 +30,7 @@ let config = { experimental: { legacyBrowsers: false, // esmExternals: 'loose', + scrollRestoration: true, }, } @@ -59,7 +64,7 @@ const plugins = [ }), ] -module.exports = () => { +export default () => { for (const plugin of plugins) { config = { ...config, diff --git a/apps/website/package.json b/apps/website/package.json index 6c288006..4e7f873c 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -8,7 +8,7 @@ "start": "next start", "lint": "next lint", "typecheck": "tsc", - "clean": "rimraf .next .tamagui .vercel/output node_modules .turbo", + "clean": "rimraf .next .tamagui .turbo .vercel/output node_modules", "preview": "next start --port 8151" }, "dependencies": { @@ -21,9 +21,11 @@ "@status-im/icons": "*", "@status-im/js": "*", "@tamagui/next-theme": "1.11.1", + "@tanstack/react-query": "^4.29.7", "@vercel/og": "^0.5.4", - "class-variance-authority": "^0.6.0", + "@tryghost/content-api": "^1.11.13", "@visx/visx": "^2.18.0", + "class-variance-authority": "^0.6.0", "d3-array": "^3.2.3", "d3-time-format": "^4.1.0", "next": "13.2.4", @@ -31,22 +33,29 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-native-web": "^0.18.12", - "@tanstack/react-query": "^4.29.7", - "ts-pattern": "^4.3.0" + "ts-pattern": "^4.3.0", + "zod": "^3.21.4" }, "devDependencies": { "@achingbrain/ssdp": "^4.0.1", + "@tailwindcss/typography": "^0.5.9", "@tamagui/next-plugin": "1.11.1", "@types/d3-array": "^3.0.4", "@types/d3-time-format": "^4.0.0", "@types/node": "^18.11.11", "@types/react": "^18.0.33", "@types/react-dom": "^18.0.11", + "@types/tryghost__content-api": "^1.3.11", "autoprefixer": "^10.4.14", + "@status-im/eslint-config": "*", "postcss": "^8.4.21", + "rehype-parse": "^8.0.4", + "rehype-react": "^7.2.0", + "rehype-stringify": "^9.0.3", "tailwindcss": "^3.3.1", "tailwindcss-animate": "^1.0.5", - "typescript": "^5.0.3" + "typescript": "^5.0.3", + "unified": "^10.1.2" }, "engines": { "node": "^18.x" diff --git a/apps/website/public/assets/favicon/blog.png b/apps/website/public/assets/favicon/blog.png new file mode 100644 index 00000000..2f8ffe74 Binary files /dev/null and b/apps/website/public/assets/favicon/blog.png differ diff --git a/apps/website/public/assets/favicon/default.png b/apps/website/public/assets/favicon/default.png new file mode 100644 index 00000000..2f8ffe74 Binary files /dev/null and b/apps/website/public/assets/favicon/default.png differ diff --git a/apps/website/public/assets/favicon/dev.png b/apps/website/public/assets/favicon/dev.png new file mode 100644 index 00000000..7e42a30d Binary files /dev/null and b/apps/website/public/assets/favicon/dev.png differ diff --git a/apps/website/public/assets/favicon/learn.png b/apps/website/public/assets/favicon/learn.png new file mode 100644 index 00000000..1ea7d020 Binary files /dev/null and b/apps/website/public/assets/favicon/learn.png differ diff --git a/apps/website/public/assets/wallet/1.png b/apps/website/public/assets/wallet/1.png new file mode 100644 index 00000000..153e84b6 Binary files /dev/null and b/apps/website/public/assets/wallet/1.png differ diff --git a/apps/website/public/assets/wallet/2.png b/apps/website/public/assets/wallet/2.png new file mode 100644 index 00000000..5f9ecf0c Binary files /dev/null and b/apps/website/public/assets/wallet/2.png differ diff --git a/apps/website/public/assets/wallet/3.png b/apps/website/public/assets/wallet/3.png new file mode 100644 index 00000000..5177ebb5 Binary files /dev/null and b/apps/website/public/assets/wallet/3.png differ diff --git a/apps/website/public/assets/wallet/4.png b/apps/website/public/assets/wallet/4.png new file mode 100644 index 00000000..86232d4f Binary files /dev/null and b/apps/website/public/assets/wallet/4.png differ diff --git a/apps/website/public/assets/wallet/5.png b/apps/website/public/assets/wallet/5.png new file mode 100644 index 00000000..bcaca385 Binary files /dev/null and b/apps/website/public/assets/wallet/5.png differ diff --git a/apps/website/public/assets/wallet/6.png b/apps/website/public/assets/wallet/6.png new file mode 100644 index 00000000..2e47bbb8 Binary files /dev/null and b/apps/website/public/assets/wallet/6.png differ diff --git a/apps/website/public/assets/wallet/7.png b/apps/website/public/assets/wallet/7.png new file mode 100644 index 00000000..98580675 Binary files /dev/null and b/apps/website/public/assets/wallet/7.png differ diff --git a/apps/website/public/assets/wallet/8.png b/apps/website/public/assets/wallet/8.png new file mode 100644 index 00000000..1d2a2f45 Binary files /dev/null and b/apps/website/public/assets/wallet/8.png differ diff --git a/apps/website/public/assets/wallet/arbitrum.png b/apps/website/public/assets/wallet/arbitrum.png new file mode 100644 index 00000000..a255d7bb Binary files /dev/null and b/apps/website/public/assets/wallet/arbitrum.png differ diff --git a/apps/website/public/assets/wallet/background-pattern.png b/apps/website/public/assets/wallet/background-pattern.png new file mode 100644 index 00000000..729e7cf5 Binary files /dev/null and b/apps/website/public/assets/wallet/background-pattern.png differ diff --git a/apps/website/public/assets/wallet/border.png b/apps/website/public/assets/wallet/border.png new file mode 100644 index 00000000..160458a3 Binary files /dev/null and b/apps/website/public/assets/wallet/border.png differ diff --git a/apps/website/public/assets/wallet/cube.png b/apps/website/public/assets/wallet/cube.png new file mode 100644 index 00000000..756afbdf Binary files /dev/null and b/apps/website/public/assets/wallet/cube.png differ diff --git a/apps/website/public/assets/wallet/duck.png b/apps/website/public/assets/wallet/duck.png new file mode 100644 index 00000000..5136af82 Binary files /dev/null and b/apps/website/public/assets/wallet/duck.png differ diff --git a/apps/website/public/assets/wallet/ethereum.png b/apps/website/public/assets/wallet/ethereum.png new file mode 100644 index 00000000..8c5703dd Binary files /dev/null and b/apps/website/public/assets/wallet/ethereum.png differ diff --git a/apps/website/public/assets/wallet/gentleman.png b/apps/website/public/assets/wallet/gentleman.png new file mode 100644 index 00000000..6ea5b3fc Binary files /dev/null and b/apps/website/public/assets/wallet/gentleman.png differ diff --git a/apps/website/public/assets/wallet/hands.png b/apps/website/public/assets/wallet/hands.png new file mode 100644 index 00000000..d1da4ba6 Binary files /dev/null and b/apps/website/public/assets/wallet/hands.png differ diff --git a/apps/website/public/assets/wallet/megaphone.png b/apps/website/public/assets/wallet/megaphone.png new file mode 100644 index 00000000..68e3af90 Binary files /dev/null and b/apps/website/public/assets/wallet/megaphone.png differ diff --git a/apps/website/public/assets/wallet/nft.png b/apps/website/public/assets/wallet/nft.png new file mode 100644 index 00000000..1f2247f9 Binary files /dev/null and b/apps/website/public/assets/wallet/nft.png differ diff --git a/apps/website/public/assets/wallet/optimism.png b/apps/website/public/assets/wallet/optimism.png new file mode 100644 index 00000000..ff2ae2d8 Binary files /dev/null and b/apps/website/public/assets/wallet/optimism.png differ diff --git a/apps/website/public/assets/wallet/pizza.png b/apps/website/public/assets/wallet/pizza.png new file mode 100644 index 00000000..3fc25108 Binary files /dev/null and b/apps/website/public/assets/wallet/pizza.png differ diff --git a/apps/website/public/assets/wallet/skull.png b/apps/website/public/assets/wallet/skull.png new file mode 100644 index 00000000..7df64018 Binary files /dev/null and b/apps/website/public/assets/wallet/skull.png differ diff --git a/apps/website/public/assets/wallet/texture.png b/apps/website/public/assets/wallet/texture.png new file mode 100644 index 00000000..26e70ff0 Binary files /dev/null and b/apps/website/public/assets/wallet/texture.png differ diff --git a/apps/website/public/assets/wallet/vegas.png b/apps/website/public/assets/wallet/vegas.png new file mode 100644 index 00000000..92fb9e11 Binary files /dev/null and b/apps/website/public/assets/wallet/vegas.png differ diff --git a/apps/website/public/assets/wallet/vitalik.mp4 b/apps/website/public/assets/wallet/vitalik.mp4 new file mode 100644 index 00000000..1b23224f Binary files /dev/null and b/apps/website/public/assets/wallet/vitalik.mp4 differ diff --git a/apps/website/public/assets/wallet/vitalik.webm b/apps/website/public/assets/wallet/vitalik.webm new file mode 100644 index 00000000..57100a12 Binary files /dev/null and b/apps/website/public/assets/wallet/vitalik.webm differ diff --git a/apps/website/public/favicon.ico b/apps/website/public/favicon.ico deleted file mode 100644 index e6bb1a61..00000000 Binary files a/apps/website/public/favicon.ico and /dev/null differ diff --git a/apps/website/public/images/social/facebook.svg b/apps/website/public/images/social/facebook.svg new file mode 100644 index 00000000..2a5125f9 --- /dev/null +++ b/apps/website/public/images/social/facebook.svg @@ -0,0 +1,22 @@ + diff --git a/apps/website/public/images/social/reddit.svg b/apps/website/public/images/social/reddit.svg new file mode 100644 index 00000000..2d747800 --- /dev/null +++ b/apps/website/public/images/social/reddit.svg @@ -0,0 +1,19 @@ + diff --git a/apps/website/public/images/social/status.svg b/apps/website/public/images/social/status.svg new file mode 100644 index 00000000..dcb755fb --- /dev/null +++ b/apps/website/public/images/social/status.svg @@ -0,0 +1,108 @@ + diff --git a/apps/website/public/images/social/twitter.svg b/apps/website/public/images/social/twitter.svg new file mode 100644 index 00000000..ef0369d1 --- /dev/null +++ b/apps/website/public/images/social/twitter.svg @@ -0,0 +1,12 @@ + diff --git a/apps/website/public/images/tags/community-20x20.png b/apps/website/public/images/tags/community-20x20.png new file mode 100644 index 00000000..2deefa8d Binary files /dev/null and b/apps/website/public/images/tags/community-20x20.png differ diff --git a/apps/website/public/images/tags/dapps-20x20.png b/apps/website/public/images/tags/dapps-20x20.png new file mode 100644 index 00000000..245b3cfa Binary files /dev/null and b/apps/website/public/images/tags/dapps-20x20.png differ diff --git a/apps/website/public/images/tags/developers-20x20.png b/apps/website/public/images/tags/developers-20x20.png new file mode 100644 index 00000000..216ba590 Binary files /dev/null and b/apps/website/public/images/tags/developers-20x20.png differ diff --git a/apps/website/public/images/tags/news-and-announcements-20x20.png b/apps/website/public/images/tags/news-and-announcements-20x20.png new file mode 100644 index 00000000..1d87e2a9 Binary files /dev/null and b/apps/website/public/images/tags/news-and-announcements-20x20.png differ diff --git a/apps/website/public/images/tags/privacy-security-20x20.png b/apps/website/public/images/tags/privacy-security-20x20.png new file mode 100644 index 00000000..ae1a70f3 Binary files /dev/null and b/apps/website/public/images/tags/privacy-security-20x20.png differ diff --git a/apps/website/public/images/tags/product-20x20.png b/apps/website/public/images/tags/product-20x20.png new file mode 100644 index 00000000..f59e74b6 Binary files /dev/null and b/apps/website/public/images/tags/product-20x20.png differ diff --git a/apps/website/src/components/cards/border.tsx b/apps/website/src/components/cards/border.tsx new file mode 100644 index 00000000..00fc49f4 --- /dev/null +++ b/apps/website/src/components/cards/border.tsx @@ -0,0 +1,17 @@ +export const Border = () => { + return ( + + ) +} diff --git a/apps/website/src/components/cards/grid-hero.tsx b/apps/website/src/components/cards/grid-hero.tsx new file mode 100644 index 00000000..2b3dda33 --- /dev/null +++ b/apps/website/src/components/cards/grid-hero.tsx @@ -0,0 +1,161 @@ +import { cva } from 'class-variance-authority' +import Image from 'next/image' + +import type { StaticImageData } from 'next/image' + +// Variants for the grid hero class names +const biggerCardClassNames = cva( + [ + 'min-w-[350px] rounded-[40px]', + 'px-[22px] py-6 sm:min-w-0 sm:px-[35px] sm:py-[48px] lg:px-5 xl:px-[34px] xl:py-[68px] 2xl:px-[73px]', + ], + { + variants: { + color: { + yellow: ['bg-customisation-yellow/10'], + turquoise: ['bg-customisation-turquoise/10'], + purple: ['bg-customisation-purple/10'], + }, + }, + } +) + +const imagesWithBorders = cva(['border-4', 'rounded-3xl'], { + variants: { + color: { + yellow: ['border-customisation-yellow/5'], + turquoise: ['border-customisation-turquoise/5'], + purple: ['border-customisation-purple/5'], + }, + }, +}) + +const imagesWithBordersTopOrBottom = cva(['border-4', 'rounded-3xl'], { + variants: { + color: { + yellow: ['border-customisation-yellow/5'], + turquoise: ['border-customisation-turquoise/5'], + purple: ['border-customisation-purple/5'], + }, + alignment: { + top: ['border-t-0'], + bottom: ['border-b-0'], + }, + }, +}) + +const thirdCardClassNames = cva( + [ + 'flex min-w-[calc(50%-10px)] rounded-[40px]', + 'px-[22px] sm:min-w-0 sm:px-[35px] lg:px-5 xl:px-[34px] 2xl:px-[73px]', + ], + { + variants: { + color: { + yellow: ['bg-customisation-yellow/10'], + turquoise: ['bg-customisation-turquoise/10'], + purple: ['bg-customisation-purple/10'], + }, + alignment: { + top: [ + 'pt-0', + 'pb-6 sm:pb-[48px] xl:pb-[68px]', + 'items-start', + 'justify-start', + ], + bottom: [ + 'pb-0', + 'pt-6 sm:pt-[48px] xl:pt-[68px]', + 'items-end', + 'justify-end', + ], + }, + }, + } +) + +const fourthCardClassNames = cva( + [ + 'flex min-w-[calc(50%-10px)] rounded-[40px]', + 'grow items-center justify-center px-0 sm:px-5 md:px-10 lg:px-5 2xl:px-10', + ], + { + variants: { + color: { + yellow: ['bg-customisation-yellow/10'], + turquoise: ['bg-customisation-turquoise/10'], + purple: ['bg-customisation-purple/10'], + }, + }, + } +) + +type Props = { + color: 'yellow' | 'turquoise' | 'purple' + cardOne: { + image: StaticImageData + alt: string + } + cardTwo: { + image: StaticImageData + alt: string + } + cardThree: { + image: StaticImageData + alt: string + alignment?: 'top' | 'bottom' + } + cardFour: { + image: StaticImageData + alt: string + } +} + +const GridHero = (props: Props) => { + const { color, cardOne, cardTwo, cardThree, cardFour } = props + + return ( +