diff --git a/.stylelintrc b/.stylelintrc
index 780972d9..16e24aff 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -1,7 +1,6 @@
{
"extends": "stylelint-config-standard",
"customSyntax": "postcss-styled-syntax",
- "plugins": ["stylelint-order"],
"rules": {
"number-max-precision": 8,
"selector-class-pattern": [
@@ -10,7 +9,6 @@
"message": "Class selectors should be in camelCase (e.g., myClassName)"
}
],
- "order/order": ["custom-properties", "declarations", "rules", "at-rules"],
"custom-property-empty-line-before": null,
"no-empty-source": null
}
diff --git a/package.json b/package.json
index 07e1eb94..b28ae981 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,7 @@
"@tanstack/react-query": "^5.36.0",
"@tanstack/react-router": "^1.32.5",
"connectkit": "^1.7.3",
- "db-ui-toolkit": "github:BootNodeDev/db-ui-toolkit#0.0.7",
+ "db-ui-toolkit": "github:BootNodeDev/db-ui-toolkit",
"modern-normalize": "^2.0.0",
"next-themes": "^0.3.0",
"react": "^18.3.1",
@@ -79,7 +79,6 @@
"prettier": "^3.2.5",
"stylelint": "^16.5.0",
"stylelint-config-standard": "^36.0.0",
- "stylelint-order": "^6.0.4",
"typescript": "^5.4.5",
"vite": "^5.2.11",
"vitest": "^1.6.0"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d317476c..2488b80f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -21,8 +21,8 @@ importers:
specifier: ^1.7.3
version: 1.7.3(@babel/core@7.24.5)(@tanstack/react-query@5.36.2(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(viem@2.10.11(bufferutil@4.0.8)(typescript@5.4.5)(zod@3.23.8))(wagmi@2.9.2(@tanstack/query-core@5.36.1)(@tanstack/react-query@5.36.2(react@18.3.1))(@types/react@18.3.2)(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-i18next@13.5.0(i18next@22.5.1)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.5)(@babel/preset-env@7.24.5(@babel/core@7.24.5))(@types/react@18.3.2)(bufferutil@4.0.8)(react@18.3.1))(react@18.3.1))(react-native@0.74.1(@babel/core@7.24.5)(@babel/preset-env@7.24.5(@babel/core@7.24.5))(@types/react@18.3.2)(bufferutil@4.0.8)(react@18.3.1))(react@18.3.1)(rollup@4.17.2)(typescript@5.4.5)(viem@2.10.11(bufferutil@4.0.8)(typescript@5.4.5)(zod@3.23.8))(zod@3.23.8))
db-ui-toolkit:
- specifier: github:BootNodeDev/db-ui-toolkit#0.0.7
- version: https://codeload.github.com/BootNodeDev/db-ui-toolkit/tar.gz/5aef8f3852f19fb36f00447d034b58f5fdeee80b
+ specifier: github:BootNodeDev/db-ui-toolkit
+ version: https://codeload.github.com/BootNodeDev/db-ui-toolkit/tar.gz/68c9cb96bc22e1087b795072cf1c5cbb71823e1d
modern-normalize:
specifier: ^2.0.0
version: 2.0.0
@@ -147,9 +147,6 @@ importers:
stylelint-config-standard:
specifier: ^36.0.0
version: 36.0.0(stylelint@16.5.0(typescript@5.4.5))
- stylelint-order:
- specifier: ^6.0.4
- version: 6.0.4(stylelint@16.5.0(typescript@5.4.5))
typescript:
specifier: ^5.4.5
version: 5.4.5
@@ -2848,8 +2845,8 @@ packages:
dayjs@1.11.11:
resolution: {integrity: sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==}
- db-ui-toolkit@https://codeload.github.com/BootNodeDev/db-ui-toolkit/tar.gz/5aef8f3852f19fb36f00447d034b58f5fdeee80b:
- resolution: {tarball: https://codeload.github.com/BootNodeDev/db-ui-toolkit/tar.gz/5aef8f3852f19fb36f00447d034b58f5fdeee80b}
+ db-ui-toolkit@https://codeload.github.com/BootNodeDev/db-ui-toolkit/tar.gz/68c9cb96bc22e1087b795072cf1c5cbb71823e1d:
+ resolution: {tarball: https://codeload.github.com/BootNodeDev/db-ui-toolkit/tar.gz/68c9cb96bc22e1087b795072cf1c5cbb71823e1d}
version: 0.1.0
engines: {node: '>=20.0.0'}
@@ -4761,11 +4758,6 @@ packages:
resolution: {integrity: sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw==}
engines: {node: '>=4'}
- postcss-sorting@8.0.2:
- resolution: {integrity: sha512-M9dkSrmU00t/jK7rF6BZSZauA5MAaBW4i5EnJXspMwt4iqTh/L9j6fgMnbElEOfyRyfLfVbIHj/R52zHzAPe1Q==}
- peerDependencies:
- postcss: ^8.4.20
-
postcss-styled-syntax@0.6.4:
resolution: {integrity: sha512-uWiLn+9rKgIghUYmTHvXMR6MnyPULMe9Gv3bV537Fg4FH6CA6cn21WMjKss2Qb98LUhT847tKfnRGG3FhSOgUQ==}
engines: {node: '>=14.17'}
@@ -5410,11 +5402,6 @@ packages:
peerDependencies:
stylelint: ^16.1.0
- stylelint-order@6.0.4:
- resolution: {integrity: sha512-0UuKo4+s1hgQ/uAxlYU4h0o0HS4NiQDud0NAUNI0aa8FJdmYHA5ZZTFHiV5FpmE3071e9pZx5j0QpVJW5zOCUA==}
- peerDependencies:
- stylelint: ^14.0.0 || ^15.0.0 || ^16.0.1
-
stylelint@16.5.0:
resolution: {integrity: sha512-IlCBtVrG+qTy3v+tZTk50W8BIomjY/RUuzdrDqdnlCYwVuzXtPbiGfxYqtyYAyOMcb+195zRsuHn6tgfPmFfbw==}
engines: {node: '>=18.12.0'}
@@ -9576,7 +9563,7 @@ snapshots:
dayjs@1.11.11: {}
- db-ui-toolkit@https://codeload.github.com/BootNodeDev/db-ui-toolkit/tar.gz/5aef8f3852f19fb36f00447d034b58f5fdeee80b:
+ db-ui-toolkit@https://codeload.github.com/BootNodeDev/db-ui-toolkit/tar.gz/68c9cb96bc22e1087b795072cf1c5cbb71823e1d:
dependencies:
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
@@ -11772,10 +11759,6 @@ snapshots:
cssesc: 3.0.0
util-deprecate: 1.0.2
- postcss-sorting@8.0.2(postcss@8.4.38):
- dependencies:
- postcss: 8.4.38
-
postcss-styled-syntax@0.6.4(postcss@8.4.38):
dependencies:
postcss: 8.4.38
@@ -12521,12 +12504,6 @@ snapshots:
stylelint: 16.5.0(typescript@5.4.5)
stylelint-config-recommended: 14.0.0(stylelint@16.5.0(typescript@5.4.5))
- stylelint-order@6.0.4(stylelint@16.5.0(typescript@5.4.5)):
- dependencies:
- postcss: 8.4.38
- postcss-sorting: 8.0.2(postcss@8.4.38)
- stylelint: 16.5.0(typescript@5.4.5)
-
stylelint@16.5.0(typescript@5.4.5):
dependencies:
'@csstools/css-parser-algorithms': 2.6.3(@csstools/css-tokenizer@2.3.1)
diff --git a/public/images/bg-body.svg b/public/images/bg-body.svg
deleted file mode 100644
index bd41bd2b..00000000
--- a/public/images/bg-body.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/constants/menuItems.ts b/src/constants/menuItems.ts
new file mode 100644
index 00000000..0e45a6c7
--- /dev/null
+++ b/src/constants/menuItems.ts
@@ -0,0 +1,20 @@
+type MenuItem = {
+ href?: string
+ label: string
+ to?: string
+}
+
+export const menuItems: MenuItem[] = [
+ {
+ label: 'Home',
+ to: '/#top',
+ },
+ {
+ label: 'Documentation',
+ href: 'https://docs.dappboster.io',
+ },
+ {
+ label: 'Examples',
+ to: '/#examples',
+ },
+]
diff --git a/src/lib/wallets/connectkit.config.tsx b/src/lib/wallets/connectkit.config.tsx
index d934db1b..c3a735c2 100644
--- a/src/lib/wallets/connectkit.config.tsx
+++ b/src/lib/wallets/connectkit.config.tsx
@@ -1,17 +1,33 @@
+import React from 'react'
+
import { getDefaultConfig, ConnectKitProvider, ConnectKitButton, Types } from 'connectkit'
-import { createConfig } from 'wagmi'
+import { Address } from 'viem'
+import { normalize } from 'viem/ens'
+import { createConfig, useEnsName, useEnsAvatar } from 'wagmi'
import { env } from '@/src/env'
import { chains, transports } from '@/src/lib/networks.config'
-import CustomAvatar from '@/src/sharedComponents/ui/Avatar'
-import ConnectButton from '@/src/sharedComponents/ui/ConnectButton'
-import Avatar from '@/src/sharedComponents/web3/Avatar'
+import Avatar from '@/src/sharedComponents/Avatar'
+import ConnectButton from '@/src/sharedComponents/ConnectButton'
+
+const UserAvatar: React.FC<{
+ address: Address
+ size: number
+}> = ({ address, size }) => {
+ const { data: ensName } = useEnsName({ address })
+
+ const { data: avatarImg } = useEnsAvatar({
+ name: ensName ? normalize(ensName) : undefined,
+ })
+
+ return
+}
export const WalletProvider = ({ children }: { children: React.ReactNode }) => {
return (
,
+ customAvatar: Avatar as React.FC,
}}
>
{children}
@@ -27,7 +43,7 @@ export const ConnectWalletButton = () => {
{isConnected ? (
<>
- {address && }
+ {address && }
{truncatedAddress}
>
) : (
diff --git a/src/pageComponents/about/index.tsx b/src/pageComponents/about/index.tsx
deleted file mode 100644
index 8059336b..00000000
--- a/src/pageComponents/about/index.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import styled from 'styled-components'
-
-const Wrapper = styled.div`
- display: flex;
- flex-grow: 1;
- justify-content: center;
- flex-direction: column;
- align-items: center;
-`
-
-export const About = () => {
- return (
-
- Hello from About!
-
- )
-}
diff --git a/src/pageComponents/contact/index.tsx b/src/pageComponents/contact/index.tsx
deleted file mode 100644
index e78dc6cf..00000000
--- a/src/pageComponents/contact/index.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import styled from 'styled-components'
-
-const Wrapper = styled.div`
- display: flex;
- flex-grow: 1;
- justify-content: center;
- flex-direction: column;
- align-items: center;
-`
-
-export const Contact = () => {
- return (
-
- Hello from Contact!
-
- )
-}
diff --git a/src/sharedComponents/web3/Avatar.test.tsx b/src/pageComponents/home/Examples/Items/Avatar.test.tsx
similarity index 95%
rename from src/sharedComponents/web3/Avatar.test.tsx
rename to src/pageComponents/home/Examples/Items/Avatar.test.tsx
index b74b33dd..5026ce5a 100644
--- a/src/sharedComponents/web3/Avatar.test.tsx
+++ b/src/pageComponents/home/Examples/Items/Avatar.test.tsx
@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'
import { Mock, describe, expect, it, vi } from 'vitest'
import { useEnsName, useEnsAvatar } from 'wagmi'
-import Avatar from '@/src/sharedComponents/web3/Avatar'
+import Avatar from '@/src/pageComponents/home/Examples/Items/Avatar'
// Mock wagmi hooks
vi.mock('wagmi', () => ({
diff --git a/src/sharedComponents/web3/Avatar.tsx b/src/pageComponents/home/Examples/Items/Avatar.tsx
similarity index 61%
rename from src/sharedComponents/web3/Avatar.tsx
rename to src/pageComponents/home/Examples/Items/Avatar.tsx
index 1cb4e296..be4b8b7c 100644
--- a/src/sharedComponents/web3/Avatar.tsx
+++ b/src/pageComponents/home/Examples/Items/Avatar.tsx
@@ -2,28 +2,28 @@ import { Address } from 'viem'
import { normalize } from 'viem/ens'
import { useEnsName, useEnsAvatar } from 'wagmi'
-import CustomAvatar from '@/src/sharedComponents/ui/Avatar'
+import BaseAvatar from '@/src/sharedComponents/Avatar'
-interface AvatarProps {
+interface Props {
address: Address
size: number
}
/**
- * Avatar WEB3 component using wagmi hooks to fetch ENS name and avatar image for the provided address.
+ * Avatar component using wagmi hooks to fetch ENS name and avatar image for the provided address.
*
* @param {string} props.address - The address
* @param {number} props.size - The size of the avatar
* @example
*/
-const Avatar = ({ address, size }: AvatarProps) => {
+const Avatar = ({ address, size }: Props) => {
const { data: ensName } = useEnsName({ address })
const { data: avatarImg } = useEnsAvatar({
name: ensName ? normalize(ensName) : undefined,
})
- return
+ return
}
export default Avatar
diff --git a/src/pageComponents/tokens/ADemoInput.tsx b/src/pageComponents/home/Examples/Items/BigNumberInput.tsx
similarity index 93%
rename from src/pageComponents/tokens/ADemoInput.tsx
rename to src/pageComponents/home/Examples/Items/BigNumberInput.tsx
index 3e645e48..351cce14 100644
--- a/src/pageComponents/tokens/ADemoInput.tsx
+++ b/src/pageComponents/home/Examples/Items/BigNumberInput.tsx
@@ -3,7 +3,7 @@ import styled from 'styled-components'
import { Button } from 'db-ui-toolkit'
-import { BigNumberInput } from '@/src/sharedComponents/web3/BigNumberInput'
+import { BigNumberInput } from '@/src/sharedComponents/BigNumberInput'
const Wrapper = styled.div`
display: flex;
@@ -24,7 +24,7 @@ const decimals = 6
const max = '1.999998'
const min = '0.000001'
-export const ADemoInput = () => {
+const DemoInput = () => {
const [value, setValue] = useState('1.123')
const [disabled, setDisabled] = useState(false)
const [error, setError] = useState<{ value: string; message: string } | null>()
@@ -79,3 +79,5 @@ export const ADemoInput = () => {
)
}
+
+export default DemoInput
diff --git a/src/pageComponents/home/Examples/Items/EnsName.tsx b/src/pageComponents/home/Examples/Items/EnsName.tsx
new file mode 100644
index 00000000..bf8ba092
--- /dev/null
+++ b/src/pageComponents/home/Examples/Items/EnsName.tsx
@@ -0,0 +1,31 @@
+import { Text } from 'db-ui-toolkit'
+import { Address } from 'viem'
+import { useEnsName } from 'wagmi'
+import { mainnet } from 'wagmi/chains'
+
+interface Props {
+ address: Address
+}
+
+const EnsName = ({ address }: Props) => {
+ const { data, error, status } = useEnsName({
+ address: address,
+ chainId: mainnet.id,
+ })
+
+ return (
+
+ {status === 'pending' ? (
+ <>Loading ENS name>
+ ) : status === 'error' ? (
+ <>Error fetching ENS name: {error.message}>
+ ) : (
+ <>
+ ENS name: {data}
+ >
+ )}
+
+ )
+}
+
+export default EnsName
diff --git a/src/pageComponents/home/Examples/Items/Hash.tsx b/src/pageComponents/home/Examples/Items/Hash.tsx
new file mode 100644
index 00000000..839df2cd
--- /dev/null
+++ b/src/pageComponents/home/Examples/Items/Hash.tsx
@@ -0,0 +1,20 @@
+import { Address } from 'viem'
+
+import BaseHash from '@/src/sharedComponents/Hash'
+
+interface Props {
+ hash: Address
+}
+
+const Hash = ({ hash }: Props) => {
+ return (
+ console.log('Copied!')}
+ showCopyButton
+ />
+ )
+}
+
+export default Hash
diff --git a/src/pageComponents/home/Examples/index.tsx b/src/pageComponents/home/Examples/index.tsx
new file mode 100644
index 00000000..9b6c94af
--- /dev/null
+++ b/src/pageComponents/home/Examples/index.tsx
@@ -0,0 +1,41 @@
+import React from 'react'
+import styled from 'styled-components'
+
+import { InnerContainer as Inner, ContainerPadding } from 'db-ui-toolkit'
+import { useAccount } from 'wagmi'
+
+import Avatar from '@/src/pageComponents/home/Examples/Items/Avatar'
+import BigNumberInput from '@/src/pageComponents/home/Examples/Items/BigNumberInput'
+import EnsName from '@/src/pageComponents/home/Examples/Items/EnsName'
+import Hash from '@/src/pageComponents/home/Examples/Items/Hash'
+
+const Wrapper = styled.section`
+ background-color: var(--landing-page-main-background-color);
+ flex-grow: 1;
+`
+
+const InnerContainer = styled(Inner)`
+ align-items: center;
+ flex-direction: column;
+ padding-bottom: 100px;
+ padding-top: 100px;
+
+ ${ContainerPadding}
+`
+
+const Examples: React.FC = ({ ...restProps }) => {
+ const { address = '0x87885AaEEdED51C7e3858a782644F5d89759f245' } = useAccount()
+
+ return (
+
+
+
+
+
+
+
+
+ )
+}
+
+export default Examples
diff --git a/src/pageComponents/home/Welcome/ButtonCSS.tsx b/src/pageComponents/home/Welcome/ButtonCSS.tsx
new file mode 100644
index 00000000..66e36ac6
--- /dev/null
+++ b/src/pageComponents/home/Welcome/ButtonCSS.tsx
@@ -0,0 +1,11 @@
+import { css } from 'styled-components'
+
+export const ButtonCSS = css`
+ column-gap: calc(var(--base-gap) * 2);
+ font-size: 1.8rem;
+ height: 50px;
+ padding-left: calc(var(--base-gap) * 4);
+ padding-right: calc(var(--base-gap) * 4);
+ min-width: 156px;
+ justify-content: start;
+`
diff --git a/src/pageComponents/home/Welcome/Clouds/assets/img-clouds-dark.svg b/src/pageComponents/home/Welcome/Clouds/assets/img-clouds-dark.svg
new file mode 100644
index 00000000..5077f657
--- /dev/null
+++ b/src/pageComponents/home/Welcome/Clouds/assets/img-clouds-dark.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/pageComponents/home/Welcome/Clouds/assets/img-clouds-light.svg b/src/pageComponents/home/Welcome/Clouds/assets/img-clouds-light.svg
new file mode 100644
index 00000000..08107b49
--- /dev/null
+++ b/src/pageComponents/home/Welcome/Clouds/assets/img-clouds-light.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/pageComponents/home/Welcome/Clouds/index.tsx b/src/pageComponents/home/Welcome/Clouds/index.tsx
new file mode 100644
index 00000000..34fc1a1f
--- /dev/null
+++ b/src/pageComponents/home/Welcome/Clouds/index.tsx
@@ -0,0 +1,37 @@
+import styled from 'styled-components'
+
+import ImgCloudsDark from '@/src/pageComponents/home/Welcome/Clouds/assets/img-clouds-dark.svg'
+import ImgCloudsLight from '@/src/pageComponents/home/Welcome/Clouds/assets/img-clouds-light.svg'
+
+const Clouds = styled.img`
+ display: none;
+ object-fit: cover;
+ object-position: center;
+ min-width: fit-content;
+ flex-grow: 0;
+ flex-shrink: 0;
+`
+
+Clouds.defaultProps = {
+ alt: '',
+}
+
+export const DarkClouds = styled(Clouds)`
+ [data-theme='dark'] & {
+ display: block;
+ }
+`
+
+DarkClouds.defaultProps = {
+ src: ImgCloudsDark,
+}
+
+export const LightClouds = styled(Clouds)`
+ [data-theme='light'] & {
+ display: block;
+ }
+`
+
+LightClouds.defaultProps = {
+ src: ImgCloudsLight,
+}
diff --git a/src/pageComponents/home/Welcome/DocsButton.tsx b/src/pageComponents/home/Welcome/DocsButton.tsx
new file mode 100644
index 00000000..3dab2c30
--- /dev/null
+++ b/src/pageComponents/home/Welcome/DocsButton.tsx
@@ -0,0 +1,28 @@
+import styled from 'styled-components'
+
+import { ButtonCSS } from '@/src/pageComponents/home/Welcome/ButtonCSS'
+import { SecondaryButton } from '@/src/sharedComponents/Buttons'
+
+const Icon = () => (
+
+)
+
+const Wrapper = styled(SecondaryButton)`
+ ${ButtonCSS}
+`
+
+const DocsButton = ({ ...restProps }) => {
+ return (
+
+
+ Docs
+
+ )
+}
+
+export default DocsButton
diff --git a/src/pageComponents/home/Welcome/Ghost/assets/img-ghost-dark.svg b/src/pageComponents/home/Welcome/Ghost/assets/img-ghost-dark.svg
new file mode 100644
index 00000000..1bcca592
--- /dev/null
+++ b/src/pageComponents/home/Welcome/Ghost/assets/img-ghost-dark.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/pageComponents/home/Welcome/Ghost/assets/img-ghost-light.svg b/src/pageComponents/home/Welcome/Ghost/assets/img-ghost-light.svg
new file mode 100644
index 00000000..85239e41
--- /dev/null
+++ b/src/pageComponents/home/Welcome/Ghost/assets/img-ghost-light.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/pageComponents/home/Welcome/Ghost/index.tsx b/src/pageComponents/home/Welcome/Ghost/index.tsx
new file mode 100644
index 00000000..87ebcaa9
--- /dev/null
+++ b/src/pageComponents/home/Welcome/Ghost/index.tsx
@@ -0,0 +1,19 @@
+import styled from 'styled-components'
+
+import ImgGhostDark from '@/src/pageComponents/home/Welcome/Ghost/assets/img-ghost-dark.svg'
+import ImgGhostLight from '@/src/pageComponents/home/Welcome/Ghost/assets/img-ghost-light.svg'
+
+const Ghost = styled.img`
+ --ghost-image: url(${ImgGhostLight});
+
+ [data-theme='dark'] & {
+ --ghost-image: url(${ImgGhostDark});
+ }
+
+ content: var(--ghost-image);
+ object-fit: none;
+ flex-grow: 0;
+ flex-shrink: 0;
+`
+
+export default Ghost
diff --git a/src/pageComponents/home/Welcome/GitClone.tsx b/src/pageComponents/home/Welcome/GitClone.tsx
new file mode 100644
index 00000000..2fd55ef4
--- /dev/null
+++ b/src/pageComponents/home/Welcome/GitClone.tsx
@@ -0,0 +1,93 @@
+import { useState } from 'react'
+import styled from 'styled-components'
+
+import { CopyButton } from 'db-ui-toolkit'
+
+const CopyIcon = () => (
+
+)
+
+const OkIcon = () => (
+
+)
+
+const Wrapper = styled.section`
+ --git-clone-background-color: #e2e0e7;
+
+ [data-theme='dark'] & {
+ --git-clone-background-color: #292b43;
+ }
+
+ align-items: center;
+ background-color: var(--git-clone-background-color);
+ border-radius: 80px;
+ column-gap: calc(var(--base-gap) * 2);
+ display: flex;
+ height: 50px;
+ max-width: 100%;
+ padding: 0 calc(var(--base-gap) * 3);
+`
+
+const Value = styled.span`
+ flex-shrink: 1;
+ font-size: 1.6rem;
+ line-height: 1.2;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+`
+
+const IconWrapper = styled.div`
+ align-items: center;
+ display: flex;
+ justify-content: center;
+ width: 17px;
+`
+
+const GitClone = ({ ...restProps }) => {
+ const [copied, setCopied] = useState(false)
+ const cloneString = 'git clone git@github.com:BootNodeDev/db-ui-toolkit.git'
+
+ const handleCopy = () => {
+ setCopied(true)
+ setTimeout(() => {
+ setCopied(false)
+ }, 3000)
+ }
+
+ return (
+
+ {cloneString}
+
+
+ {copied ? : }
+
+
+
+ )
+}
+
+export default GitClone
diff --git a/src/pageComponents/home/Welcome/GithubButton.tsx b/src/pageComponents/home/Welcome/GithubButton.tsx
new file mode 100644
index 00000000..253c6dbf
--- /dev/null
+++ b/src/pageComponents/home/Welcome/GithubButton.tsx
@@ -0,0 +1,33 @@
+import styled from 'styled-components'
+
+import { ButtonCSS } from '@/src/pageComponents/home/Welcome/ButtonCSS'
+import { PrimaryButton } from '@/src/sharedComponents/Buttons'
+
+const Icon = () => (
+
+)
+
+const Wrapper = styled(PrimaryButton)`
+ ${ButtonCSS}
+`
+
+const GithubButton = ({ ...restProps }) => {
+ return (
+
+
+ Github
+
+ )
+}
+
+export default GithubButton
diff --git a/src/pageComponents/home/Welcome/index.tsx b/src/pageComponents/home/Welcome/index.tsx
new file mode 100644
index 00000000..aa9268f6
--- /dev/null
+++ b/src/pageComponents/home/Welcome/index.tsx
@@ -0,0 +1,117 @@
+import React from 'react'
+import styled from 'styled-components'
+
+import {
+ Title as BasetTitle,
+ Text as BaseText,
+ InnerContainer as Inner,
+ ContainerPadding,
+} from 'db-ui-toolkit'
+
+import { LightClouds, DarkClouds } from '@/src/pageComponents/home/Welcome/Clouds'
+import DocsButton from '@/src/pageComponents/home/Welcome/DocsButton'
+import BaseGhost from '@/src/pageComponents/home/Welcome/Ghost'
+import GitClone from '@/src/pageComponents/home/Welcome/GitClone'
+import GithubButton from '@/src/pageComponents/home/Welcome/GithubButton'
+
+const Wrapper = styled.section`
+ display: flex;
+ flex-direction: column;
+ max-height: 1080px;
+ min-height: 100vh;
+ position: relative;
+ z-index: 0;
+`
+
+const Clouds = styled.div`
+ display: flex;
+ justify-content: center;
+ overflow: hidden;
+ position: relative;
+ width: 100%;
+
+ &::before,
+ &::after {
+ content: '';
+ background-color: var(--landing-page-main-background-color);
+ display: block;
+ flex-grow: 1;
+ flex-shrink: 1;
+ min-width: 0;
+ }
+`
+
+const Ghost = styled(BaseGhost)`
+ bottom: 70px;
+ left: 50%;
+ position: absolute;
+ transform: translateX(-50%);
+ z-index: 1;
+`
+
+const Contents = styled.div`
+ flex-grow: 1;
+ background-color: var(--landing-page-main-background-color);
+`
+
+const InnerContainer = styled(Inner)`
+ align-items: center;
+ flex-direction: column;
+
+ ${ContainerPadding}
+`
+
+const Title = styled(BasetTitle)`
+ font-size: 4.8rem;
+ font-weight: 800;
+ line-height: 1.2;
+ margin-bottom: var(--base-gap);
+ text-align: center;
+`
+
+const Text = styled(BaseText)`
+ font-size: 1.8rem;
+ line-height: 1.5;
+ margin-bottom: calc(var(--base-gap) * 4);
+ text-align: center;
+`
+
+const Buttons = styled.div`
+ display: flex;
+ gap: calc(var(--base-gap) + var(--base-gap) / 2);
+ justify-content: center;
+ margin-bottom: calc(var(--base-gap) * 4);
+`
+
+const Welcome: React.FC = ({ ...restProps }) => {
+ return (
+
+
+
+
+
+
+
+
+
+ Boost dApp
+
+ development on the
+
blockchain
+
+
+ A modern blockchain boilerplate built to quickly get
+
you started with your next project.
+
+
+
+
+
+
+
+
+
+ )
+}
+
+export default Welcome
diff --git a/src/pageComponents/home/index.tsx b/src/pageComponents/home/index.tsx
index c450fa0b..644f3fbb 100644
--- a/src/pageComponents/home/index.tsx
+++ b/src/pageComponents/home/index.tsx
@@ -1,59 +1,22 @@
import styled from 'styled-components'
-import { Title, Text } from 'db-ui-toolkit'
-import { useAccount, useEnsName } from 'wagmi'
-import { mainnet } from 'wagmi/chains'
-
-import Hash from '@/src/sharedComponents/ui/Hash'
-import Avatar from '@/src/sharedComponents/web3/Avatar'
+import Examples from '@/src/pageComponents/home/Examples'
+import Welcome from '@/src/pageComponents/home/Welcome'
const Wrapper = styled.div`
display: flex;
- flex-grow: 1;
- justify-content: center;
flex-direction: column;
- align-items: center;
-`
-
-const Grid = styled.div`
- display: flex;
- gap: 16px;
- justify-content: center;
- align-items: center;
+ flex-grow: 1;
+ margin-top: calc(var(--base-header-height) * -1);
+ position: relative;
+ width: 100%;
`
-export const Home = () => {
- const { address } = useAccount()
- const { data, error, status } = useEnsName({
- address: '0x87885AaEEdED51C7e3858a782644F5d89759f245',
- chainId: mainnet.id,
- })
-
+export const Home = ({ ...restProps }) => {
return (
-
- Welcome to dApp👻ster!
-
- {status === 'pending' ? (
- <>Loading ENS name>
- ) : status === 'error' ? (
- <>Error fetching ENS name: {error.message}>
- ) : (
- <>
- ENS name: {data}
- >
- )}
-
-
- Avatar:
-
-
-
- console.log('Copied!')}
- showCopyButton
- />
+
+
+
)
}
diff --git a/src/pageComponents/tokens/index.tsx b/src/pageComponents/tokens/index.tsx
deleted file mode 100644
index 80576623..00000000
--- a/src/pageComponents/tokens/index.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import styled from 'styled-components'
-
-import { ADemoInput } from '@/src/pageComponents/tokens/ADemoInput'
-
-const Wrapper = styled.div`
- display: flex;
- flex-grow: 1;
- justify-content: center;
- flex-direction: column;
- align-items: center;
-`
-
-export const Tokens = () => {
- return (
-
- Hello from Tokens!
-
-
- )
-}
diff --git a/src/routeTree.gen.ts b/src/routeTree.gen.ts
index 765df778..1837943b 100644
--- a/src/routeTree.gen.ts
+++ b/src/routeTree.gen.ts
@@ -16,28 +16,10 @@ import { Route as rootRoute } from './routes/__root'
// Create Virtual Routes
-const TokensLazyImport = createFileRoute('/tokens')()
-const ContactLazyImport = createFileRoute('/contact')()
-const AboutLazyImport = createFileRoute('/about')()
const IndexLazyImport = createFileRoute('/')()
// Create/Update Routes
-const TokensLazyRoute = TokensLazyImport.update({
- path: '/tokens',
- getParentRoute: () => rootRoute,
-} as any).lazy(() => import('./routes/tokens.lazy').then((d) => d.Route))
-
-const ContactLazyRoute = ContactLazyImport.update({
- path: '/contact',
- getParentRoute: () => rootRoute,
-} as any).lazy(() => import('./routes/contact.lazy').then((d) => d.Route))
-
-const AboutLazyRoute = AboutLazyImport.update({
- path: '/about',
- getParentRoute: () => rootRoute,
-} as any).lazy(() => import('./routes/about.lazy').then((d) => d.Route))
-
const IndexLazyRoute = IndexLazyImport.update({
path: '/',
getParentRoute: () => rootRoute,
@@ -54,37 +36,11 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof IndexLazyImport
parentRoute: typeof rootRoute
}
- '/about': {
- id: '/about'
- path: '/about'
- fullPath: '/about'
- preLoaderRoute: typeof AboutLazyImport
- parentRoute: typeof rootRoute
- }
- '/contact': {
- id: '/contact'
- path: '/contact'
- fullPath: '/contact'
- preLoaderRoute: typeof ContactLazyImport
- parentRoute: typeof rootRoute
- }
- '/tokens': {
- id: '/tokens'
- path: '/tokens'
- fullPath: '/tokens'
- preLoaderRoute: typeof TokensLazyImport
- parentRoute: typeof rootRoute
- }
}
}
// Create and export the route tree
-export const routeTree = rootRoute.addChildren({
- IndexLazyRoute,
- AboutLazyRoute,
- ContactLazyRoute,
- TokensLazyRoute,
-})
+export const routeTree = rootRoute.addChildren({ IndexLazyRoute })
/* prettier-ignore-end */
diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx
index b9f9e9fe..4692ef87 100644
--- a/src/routes/__root.tsx
+++ b/src/routes/__root.tsx
@@ -1,14 +1,12 @@
-import styled from 'styled-components'
-
import { createRootRoute, Outlet } from '@tanstack/react-router'
-import { Wrapper, InnerContainer as Inner, Main, ContainerPadding } from 'db-ui-toolkit'
+import { Wrapper, Main } from 'db-ui-toolkit'
import { ThemeProvider } from 'next-themes'
-import { TanStackReactQueryDevtools } from '@/src/sharedComponents/helpers/TanStackReactQueryDevtools'
-import { TanStackRouterDevtools } from '@/src/sharedComponents/helpers/TanStackRouterDevtools'
-import { Footer } from '@/src/sharedComponents/ui/Footer'
-import { Header } from '@/src/sharedComponents/ui/Header'
-import { Web3Provider } from '@/src/sharedComponents/web3/Web3Provider'
+import { Footer } from '@/src/sharedComponents/Footer'
+import { Header } from '@/src/sharedComponents/Header'
+import { TanStackReactQueryDevtools } from '@/src/sharedComponents/TanStackReactQueryDevtools'
+import { TanStackRouterDevtools } from '@/src/sharedComponents/TanStackRouterDevtools'
+import { Web3Provider } from '@/src/sharedComponents/Web3Provider'
import { GlobalStyles } from '@/src/styles/globalStyles'
import 'modern-normalize/modern-normalize.css'
@@ -17,13 +15,6 @@ export const Route = createRootRoute({
component: Root,
})
-const InnerContainer = styled(Inner)`
- flex-direction: column;
- min-height: 100%;
-
- ${ContainerPadding}
-`
-
function Root() {
return (
@@ -32,9 +23,7 @@ function Root() {
-
-
-
+
diff --git a/src/routes/about.lazy.tsx b/src/routes/about.lazy.tsx
deleted file mode 100644
index efa88bd1..00000000
--- a/src/routes/about.lazy.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-import { createLazyFileRoute } from '@tanstack/react-router'
-
-import { About } from '@/src/pageComponents/about'
-
-export const Route = createLazyFileRoute('/about')({
- component: About,
-})
diff --git a/src/routes/contact.lazy.tsx b/src/routes/contact.lazy.tsx
deleted file mode 100644
index 8d8094b2..00000000
--- a/src/routes/contact.lazy.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-import { createLazyFileRoute } from '@tanstack/react-router'
-
-import { Contact } from '@/src/pageComponents/contact'
-
-export const Route = createLazyFileRoute('/contact')({
- component: Contact,
-})
diff --git a/src/routes/tokens.lazy.tsx b/src/routes/tokens.lazy.tsx
deleted file mode 100644
index f9886208..00000000
--- a/src/routes/tokens.lazy.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-import { createLazyFileRoute } from '@tanstack/react-router'
-
-import { Tokens } from '@/src/pageComponents/tokens'
-
-export const Route = createLazyFileRoute('/tokens')({
- component: Tokens,
-})
diff --git a/src/sharedComponents/ui/Avatar.tsx b/src/sharedComponents/Avatar.tsx
similarity index 74%
rename from src/sharedComponents/ui/Avatar.tsx
rename to src/sharedComponents/Avatar.tsx
index a5ad2049..a86bfff3 100644
--- a/src/sharedComponents/ui/Avatar.tsx
+++ b/src/sharedComponents/Avatar.tsx
@@ -2,13 +2,6 @@ import styled from 'styled-components'
import Jazzicon, { jsNumberForAddress } from 'react-jazzicon'
-interface CustomAvatarProps {
- address: string
- ensImage: string | null | undefined
- ensName: string | null | undefined
- size?: number
-}
-
const ImageWrapper = styled.div<{
size: number
}>`
@@ -18,8 +11,15 @@ const ImageWrapper = styled.div<{
height: ${(props) => `${props.size}px`};
`
+interface AvatarProps {
+ address: string
+ ensImage: string | null | undefined
+ ensName: string | null | undefined
+ size?: number
+}
+
/**
- * CustomAvatar component, displays an avatar with an ENS image or Jazzicon based on the provided props.
+ * Avatar component, displays an avatar with an ENS image or Jazzicon based on the provided props.
* If an ENS image is provided, it will be displayed, otherwise a Jazzicon will be displayed based on the address.
* This component is used as a custom avatar for the WalletProvider.
*
@@ -27,10 +27,10 @@ const ImageWrapper = styled.div<{
* @param {string | null | undefined} props.ensImage - The ENS image URL for the avatar.
* @param {string | null | undefined} props.ensName - The ENS name.
* @param {number} [props.size=100] - The size of the avatar.
- * @example
+ * @example
*/
-const CustomAvatar = ({ address, ensImage, ensName, size = 100 }: CustomAvatarProps) => {
+const Avatar = ({ address, ensImage, ensName, size = 100 }: AvatarProps) => {
return (
{ensImage ? (
@@ -44,4 +44,4 @@ const CustomAvatar = ({ address, ensImage, ensName, size = 100 }: CustomAvatarPr
)
}
-export default CustomAvatar
+export default Avatar
diff --git a/src/sharedComponents/web3/BigNumberInput.test.tsx b/src/sharedComponents/BigNumberInput.test.tsx
similarity index 99%
rename from src/sharedComponents/web3/BigNumberInput.test.tsx
rename to src/sharedComponents/BigNumberInput.test.tsx
index 0503019c..5a2c681a 100644
--- a/src/sharedComponents/web3/BigNumberInput.test.tsx
+++ b/src/sharedComponents/BigNumberInput.test.tsx
@@ -5,7 +5,7 @@ import { userEvent } from '@testing-library/user-event'
import '@testing-library/jest-dom'
import { describe, it, expect, vi } from 'vitest'
-import { BigNumberInput, BigNumberInputProps } from '@/src/sharedComponents/web3/BigNumberInput'
+import { BigNumberInput, BigNumberInputProps } from '@/src/sharedComponents/BigNumberInput'
// Mocking viem's parseUnits and formatUnits functions
vi.mock('viem', () => ({
diff --git a/src/sharedComponents/web3/BigNumberInput.tsx b/src/sharedComponents/BigNumberInput.tsx
similarity index 100%
rename from src/sharedComponents/web3/BigNumberInput.tsx
rename to src/sharedComponents/BigNumberInput.tsx
diff --git a/src/sharedComponents/ui/Buttons.tsx b/src/sharedComponents/Buttons.tsx
similarity index 71%
rename from src/sharedComponents/ui/Buttons.tsx
rename to src/sharedComponents/Buttons.tsx
index c35b349d..51a266a7 100644
--- a/src/sharedComponents/ui/Buttons.tsx
+++ b/src/sharedComponents/Buttons.tsx
@@ -11,3 +11,9 @@ export const PrimaryButton = styled(ThemedButton)``
PrimaryButton.defaultProps = {
$cssVarRoot: '--theme-button-primary',
}
+
+export const SecondaryButton = styled(ThemedButton)``
+
+SecondaryButton.defaultProps = {
+ $cssVarRoot: '--theme-button-secondary',
+}
diff --git a/src/sharedComponents/ui/ConnectButton.tsx b/src/sharedComponents/ConnectButton.tsx
similarity index 100%
rename from src/sharedComponents/ui/ConnectButton.tsx
rename to src/sharedComponents/ConnectButton.tsx
diff --git a/src/sharedComponents/ui/Footer.tsx b/src/sharedComponents/Footer.tsx
similarity index 100%
rename from src/sharedComponents/ui/Footer.tsx
rename to src/sharedComponents/Footer.tsx
diff --git a/src/sharedComponents/ui/Hash.tsx b/src/sharedComponents/Hash.tsx
similarity index 100%
rename from src/sharedComponents/ui/Hash.tsx
rename to src/sharedComponents/Hash.tsx
diff --git a/src/sharedComponents/ui/Header.tsx b/src/sharedComponents/Header.tsx
similarity index 72%
rename from src/sharedComponents/ui/Header.tsx
rename to src/sharedComponents/Header.tsx
index d8a69f37..13ba3c7d 100644
--- a/src/sharedComponents/ui/Header.tsx
+++ b/src/sharedComponents/Header.tsx
@@ -11,12 +11,18 @@ import {
} from 'db-ui-toolkit'
import { useTheme } from 'next-themes'
-import { MainMenu } from '@/src/sharedComponents/ui/MainMenu'
-import { ConnectWalletButton } from '@/src/sharedComponents/web3/Web3Provider'
+import { MainMenu } from '@/src/sharedComponents/MainMenu'
+import { ConnectWalletButton } from '@/src/sharedComponents/Web3Provider'
+/**
+ * Note: you can remove all the custom styles and just use the default Header
+ * component from db-ui-toolkit (or just create your own)
+ */
const Wrapper = styled(BaseHeader)`
- height: 48px;
- margin-top: 48px;
+ height: var(--base-header-height);
+ padding-top: 14px;
+ position: relative;
+ z-index: 10;
`
const Inner = styled(InnerContainer)`
@@ -65,10 +71,7 @@ export const Header: React.FC = ({ ...restProps }) => {
- setTheme(theme === 'light' ? 'dark' : 'light')}
- theme={theme}
- />
+ setTheme(theme === 'light' ? 'dark' : 'light')} />
diff --git a/src/sharedComponents/MainMenu.tsx b/src/sharedComponents/MainMenu.tsx
new file mode 100644
index 00000000..7544df09
--- /dev/null
+++ b/src/sharedComponents/MainMenu.tsx
@@ -0,0 +1,58 @@
+import styled, { css } from 'styled-components'
+
+import { Link } from '@tanstack/react-router'
+
+import { menuItems } from '@/src/constants/menuItems'
+
+const Wrapper = styled.nav`
+ align-items: center;
+ column-gap: calc(var(--base-gap) * 5);
+ display: flex;
+ height: 100%;
+`
+
+const LinkCSS = css`
+ color: var(--theme-main-menu-item-color);
+ font-size: 1.6rem;
+ font-weight: 500;
+ line-height: 1.2;
+ text-decoration: none;
+
+ &:hover {
+ text-decoration: underline;
+ }
+
+ &:active {
+ opacity: 0.7;
+ }
+`
+
+const Item = styled(Link)`
+ ${LinkCSS}
+`
+
+const ExternalItem = styled.a`
+ ${LinkCSS}
+`
+
+export const MainMenu = ({ ...restProps }) => {
+ return (
+
+ {menuItems.map(({ href, label, to }, index) => {
+ const key = `menuItem_${index}`
+
+ return to ? (
+ -
+ {label}
+
+ ) : href ? (
+
+ {label}
+
+ ) : (
+ <>>
+ )
+ })}
+
+ )
+}
diff --git a/src/sharedComponents/helpers/TanStackReactQueryDevtools.tsx b/src/sharedComponents/TanStackReactQueryDevtools.tsx
similarity index 100%
rename from src/sharedComponents/helpers/TanStackReactQueryDevtools.tsx
rename to src/sharedComponents/TanStackReactQueryDevtools.tsx
diff --git a/src/sharedComponents/helpers/TanStackRouterDevtools.tsx b/src/sharedComponents/TanStackRouterDevtools.tsx
similarity index 100%
rename from src/sharedComponents/helpers/TanStackRouterDevtools.tsx
rename to src/sharedComponents/TanStackRouterDevtools.tsx
diff --git a/src/sharedComponents/web3/Web3Provider.tsx b/src/sharedComponents/Web3Provider.tsx
similarity index 100%
rename from src/sharedComponents/web3/Web3Provider.tsx
rename to src/sharedComponents/Web3Provider.tsx
diff --git a/src/sharedComponents/ui/MainMenu.tsx b/src/sharedComponents/ui/MainMenu.tsx
deleted file mode 100644
index 86569d3d..00000000
--- a/src/sharedComponents/ui/MainMenu.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import styled from 'styled-components'
-
-import { Link } from '@tanstack/react-router'
-
-const Wrapper = styled.nav`
- align-items: center;
- display: flex;
- column-gap: calc(var(--base-gap) * 5);
- height: 100%;
-`
-
-const Item = styled(Link)`
- color: var(--theme-main-menu-item-color);
- font-size: 1.6rem;
- font-weight: 500;
- line-height: 1.2;
- text-decoration: none;
-
- &:hover {
- text-decoration: underline;
- }
-
- &:active {
- opacity: 0.7;
- }
-`
-
-export const MainMenu = ({ ...restProps }) => {
- return (
-
- - Home
- - Tokens
- - About
- - Contact
-
- )
-}
diff --git a/src/styles/base.tsx b/src/styles/base.tsx
index db579f4a..62c2c158 100644
--- a/src/styles/base.tsx
+++ b/src/styles/base.tsx
@@ -13,6 +13,13 @@ export const base = css`
--base-border-radius: 8px;
--base-border-radius-xl: 16px;
+ /* Animation times */
+ --base-animation-time-xs: 0.1s;
+ --base-animation-time-sm: 0.2s;
+ --base-animation-time: 0.3s;
+ --base-animation-time-xl: 0.4s;
+ --base-animation-time-xxl: 0.5s;
+
/* Grid / flex gap */
--base-gap-sm: 4px;
--base-gap: 8px;
@@ -26,6 +33,9 @@ export const base = css`
--base-title-font-size: 2.4rem;
--base-text-font-size: 1.6rem;
+ /* Header */
+ --base-header-height: 90px;
+
/* Padding */
--base-common-padding-sm: 4px;
--base-common-padding: 8px;
diff --git a/src/styles/globalStyles.tsx b/src/styles/globalStyles.tsx
index a5645a00..2fe584ee 100644
--- a/src/styles/globalStyles.tsx
+++ b/src/styles/globalStyles.tsx
@@ -7,8 +7,19 @@ import { lightTheme } from '@/src/styles/themes/light'
export const GlobalStyles = createGlobalStyle`
:root {
${base}
+
+ /**
+ * Landing page exclusive, can be removed if not needed
+ */
+ --landing-page-main-background-color: #f7f7f7;
+
+ &[data-theme='dark'] {
+ --landing-page-main-background-color: #2e3048;
+ }
}
+
+
${lightTheme}
${darkTheme}
@@ -20,8 +31,7 @@ export const GlobalStyles = createGlobalStyle`
body {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
- background: var(--theme-body-background, #fff);
- background-image: url('/images/bg-body.svg');
+ background-color: var(--theme-body-background-color, #fff);
background-position: 100% 0;
background-repeat: no-repeat;
color: var(--theme-color-text, #000);
diff --git a/src/styles/themes/dark.tsx b/src/styles/themes/dark.tsx
index cd523512..92a14a5b 100644
--- a/src/styles/themes/dark.tsx
+++ b/src/styles/themes/dark.tsx
@@ -10,82 +10,75 @@ import { css } from 'styled-components'
*/
export const darkTheme = css`
&[data-theme='dark'] {
- /**
- * Colors.
- *
- * Numbered-named vars. Don't use them directly in your CSS.
- *
- * I think that using numbered names doesn't look great, but it ends up
- * being very practical. Use these values to create properly named variables
- * below.
- */
- --theme-color-0: #fff;
- --theme-color-1: #2e3048;
- --theme-color-2: #692581;
- --theme-color-3: #4b4d60;
- --theme-color-4: #8b46a4;
- --theme-color-5: #f7f7f7;
- --theme-color-6: #e2e0e7;
- --theme-color-7: #c5c2cb;
- --theme-color-8: #800;
- --theme-color-9: #080;
- --theme-color-10: #cc0;
- --theme-color-11: #c670e5;
- --theme-color-12: #292b43;
-
- /**
- * From here on put the variables that you will use in your CSS elsewhere.
- */
- --theme-color-primary: var(--theme-color-11);
- --theme-color-secondary: var(--theme-color-4);
- --theme-color-text: var(--theme-color-6);
+ /* Few basic colors */
+ --theme-color-primary: #8b46a4;
+
+ /* Text color */
+ --theme-color-text-primary: #fff;
+ --theme-color-text: #e2e0e7;
+ --theme-color-light: #4b4d60;
+ --theme-color-dark: #4b4d60;
/* Danger / OK / warning */
- --theme-color-danger: var(--theme-color-8);
- --theme-color-ok: var(--theme-color-9);
- --theme-color-warning: var(--theme-color-10);
+ --theme-color-danger: #800;
+ --theme-color-ok: #080;
+ --theme-color-warning: #cc0;
/* Main body */
- --theme-body-background: var(--theme-color-1);
+ --theme-body-background-color: #292b43;
/* Header */
--theme-header-background-color: transparent;
- --theme-header-text-color: var(--theme-color-0);
+ --theme-header-text-color: #fff;
/* Main Menu */
- --theme-main-menu-item-color: var(--theme-color-0);
+ --theme-main-menu-item-color: #fff;
/* Button Primary */
- --theme-button-primary-background-color: var(--theme-color-4);
- --theme-button-primary-background-color-hover: var(--theme-color-1);
+ --theme-button-primary-background-color: #8b46a4;
+ --theme-button-primary-background-color-hover: #9a4eb5;
+
+ --theme-button-primary-border-color: #8b46a4;
+ --theme-button-primary-border-color-hover: #9a4eb5;
+
+ --theme-button-primary-color: #fff;
+ --theme-button-primary-color-hover: #fff;
+
+ --theme-button-primary-background-color-disabled: #8b46a4;
+ --theme-button-primary-border-color-disabled: #8b46a4;
+ --theme-button-primary-color-disabled: #fff;
+
+ /* Secondary Button */
+ --theme-button-secondary-background-color: #5f6178;
+ --theme-button-secondary-background-color-hover: #4a4c5f;
- --theme-button-primary-border-color: var(--theme-color-4);
- --theme-button-primary-border-color-hover: var(--theme-color-1);
+ --theme-button-secondary-border-color: #5f6178;
+ --theme-button-secondary-border-color-hover: #4a4c5f;
- --theme-button-primary-color: var(--theme-color-0);
- --theme-button-primary-color-hover: var(--theme-color-0);
+ --theme-button-secondary-color: #fff;
+ --theme-button-secondary-color-hover: #fff;
- --theme-button-primary-background-color-disabled: var(--theme-color-5);
- --theme-button-primary-border-color-disabled: var(--theme-color-6);
- --theme-button-primary-color-disabled: var(--theme-color-7);
+ --theme-button-secondary-background-color-disabled: #5f6178;
+ --theme-button-secondary-border-color-disabled: #5f6178;
+ --theme-button-secondary-color-disabled: #fff;
/* Connect Button */
- --theme-button-connect-background-color: var(--theme-color-0);
- --theme-button-connect-background-color-hover: var(--theme-color-0);
+ --theme-button-connect-background-color: #8b46a4;
+ --theme-button-connect-background-color-hover: #5f6178;
- --theme-button-connect-border-color: var(--theme-color-0);
- --theme-button-connect-border-color-hover: var(--theme-color-0);
+ --theme-button-connect-border-color: #8b46a4;
+ --theme-button-connect-border-color-hover: #5f6178;
- --theme-button-connect-color: var(--theme-color-1);
- --theme-button-connect-color-hover: var(--theme-color-4);
+ --theme-button-connect-color: #fff;
+ --theme-button-connect-color-hover: #fff;
- --theme-button-connect-background-color-disabled: var(--theme-color-0);
- --theme-button-connect-border-color-disabled: var(--theme-color-0);
- --theme-button-connect-color-disabled: var(--theme-color-7);
+ --theme-button-connect-background-color-disabled: #8b46a4;
+ --theme-button-connect-border-color-disabled: #8b46a4;
+ --theme-button-connect-color-disabled: #c5c2cb;
/* Dropdown */
- --theme-dropdown-background-color: var(--theme-color-12);
- --theme-dropdown-border-color: var(--theme-color-12);
+ --theme-dropdown-background-color: #292b43;
+ --theme-dropdown-border-color: #292b43;
--theme-dropdown-box-shadow: 0 9.6px 13px 0 rgb(0 0 0 / 8%);
@@ -93,25 +86,25 @@ export const darkTheme = css`
--theme-dropdown-item-background-color-hover: transparent;
--theme-dropdown-item-background-color-active: rgb(0 0 0 / 10%);
- --theme-dropdown-item-color: var(--theme-color-0);
- --theme-dropdown-item-color-hover: var(--theme-color-0);
- --theme-dropdown-item-color-active: var(--theme-color-0);
+ --theme-dropdown-item-color: #fff;
+ --theme-dropdown-item-color-hover: #fff;
+ --theme-dropdown-item-color-active: #fff;
- --theme-dropdown-item-border-color: var(--theme-color-3);
- --theme-dropdown-item-border-color-hover: var(--theme-color-3);
- --theme-dropdown-item-border-color-active: var(--theme-color-3);
+ --theme-dropdown-item-border-color: #4b4d60;
+ --theme-dropdown-item-border-color-hover: #4b4d60;
+ --theme-dropdown-item-border-color-active: #4b4d60;
/* Card */
- --theme-card-background-color: var(--theme-color-12);
- --theme-card-border-color: var(--theme-color-12);
+ --theme-card-background-color: #292b43;
+ --theme-card-border-color: #292b43;
--theme-card-box-shadow: 0 9.6px 13px 0 rgb(0 0 0 / 8%);
/* Copy button */
- --copy-button-color: var(--theme-color-text);
- --copy-button-color-hover: var(--theme-color-11);
+ --copy-button-color: #e2e0e7;
+ --copy-button-color-hover: #c670e5;
/* External link button */
- --external-link-button-color: var(--theme-color-text);
- --external-link-button-color-hover: var(--theme-color-11);
+ --external-link-button-color: #e2e0e7;
+ --external-link-button-color-hover: #c670e5;
}
`
diff --git a/src/styles/themes/light.tsx b/src/styles/themes/light.tsx
index 76d4ea41..ee94f8db 100644
--- a/src/styles/themes/light.tsx
+++ b/src/styles/themes/light.tsx
@@ -10,88 +10,75 @@ import { css } from 'styled-components'
*/
export const lightTheme = css`
[data-theme='light'] {
- /**
- * Colors.
- *
- * Numbered-named vars. Don't use them directly in your CSS.
- *
- * I think that using numbered names doesn't look great, but it ends up
- * being very practical. Use these values to create properly named variables
- * below.
- */
- --theme-color-0: #fff;
- --theme-color-1: #2e3048;
- --theme-color-2: #692581;
- --theme-color-3: #4b4d60;
- --theme-color-4: #8b46a4;
- --theme-color-5: #f7f7f7;
- --theme-color-6: #e2e0e7;
- --theme-color-7: #c5c2cb;
- --theme-color-8: #f6f6f6;
- --theme-color-9: #f8f8f8;
- --theme-color-10: #800;
- --theme-color-11: #080;
- --theme-color-12: #cc0;
- --theme-color-13: #f0f0f0;
- --theme-color-14: #000;
-
- /**
- * From here on put the variables that you will use in your CSS elsewhere.
- */
- --theme-color-primary: var(--theme-color-1);
- --theme-color-secondary: var(--theme-color-2);
- --theme-color-text: var(--theme-color-3);
+ /* Few basic colors */
+ --theme-color-primary: #692581;
+
+ /* Text color */
+ --theme-color-text-primary: #2e3048;
+ --theme-color-text: #4b4d60;
+ --theme-color-light: #4b4d60;
+ --theme-color-dark: #4b4d60;
/* Danger / OK / warning */
- --theme-color-danger: var(--theme-color-10);
- --theme-color-ok: var(--theme-color-11);
- --theme-color-warning: var(--theme-color-12);
+ --theme-color-danger: #800;
+ --theme-color-ok: #080;
+ --theme-color-warning: #cc0;
/* Main body */
- --theme-body-background: linear-gradient(
- 257deg,
- var(--theme-color-8) 0%,
- var(--theme-color-9) 100%
- );
+ --theme-body-background-color: #e2e0e7;
- /* Header */
+ /* Hlightr */
--theme-header-background-color: transparent;
- --theme-header-text-color: var(--theme-color-1);
+ --theme-header-text-color: #2e3048;
/* Main Menu */
- --theme-main-menu-item-color: var(--theme-color-1);
+ --theme-main-menu-item-color: #2e3048;
/* Primary Button */
- --theme-button-primary-background-color: var(--theme-color-4);
- --theme-button-primary-background-color-hover: var(--theme-color-1);
+ --theme-button-primary-background-color: #692581;
+ --theme-button-primary-background-color-hover: #892fa9;
+
+ --theme-button-primary-border-color: #692581;
+ --theme-button-primary-border-color-hover: #892fa9;
+
+ --theme-button-primary-color: #fff;
+ --theme-button-primary-color-hover: #fff;
+
+ --theme-button-primary-background-color-disabled: #692581;
+ --theme-button-primary-border-color-disabled: #692581;
+ --theme-button-primary-color-disabled: #fff;
+
+ /* Secondary Button */
+ --theme-button-secondary-background-color: #2e3048;
+ --theme-button-secondary-background-color-hover: #3d405f;
- --theme-button-primary-border-color: var(--theme-color-4);
- --theme-button-primary-border-color-hover: var(--theme-color-1);
+ --theme-button-secondary-border-color: #2e3048;
+ --theme-button-secondary-border-color-hover: #3d405f;
- --theme-button-primary-color: var(--theme-color-0);
- --theme-button-primary-color-hover: var(--theme-color-0);
+ --theme-button-secondary-color: #fff;
+ --theme-button-secondary-color-hover: #fff;
- --theme-button-primary-background-color-disabled: var(--theme-color-5);
- --theme-button-primary-border-color-disabled: var(--theme-color-6);
- --theme-button-primary-color-disabled: var(--theme-color-7);
+ --theme-button-secondary-background-color-disabled: #2e3048;
+ --theme-button-secondary-border-color-disabled: #2e3048;
+ --theme-button-secondary-color-disabled: #fff;
/* Connect Button */
- --theme-button-connect-background-color: var(--theme-color-0);
- --theme-button-connect-background-color-hover: var(--theme-color-0);
+ --theme-button-connect-background-color: #fff;
+ --theme-button-connect-background-color-hover: #fff;
- --theme-button-connect-border-color: var(--theme-color-0);
- --theme-button-connect-border-color-hover: var(--theme-color-0);
+ --theme-button-connect-border-color: #fff;
+ --theme-button-connect-border-color-hover: #fff;
- --theme-button-connect-color: var(--theme-color-1);
- --theme-button-connect-color-hover: var(--theme-color-4);
+ --theme-button-connect-color: #2e3048;
+ --theme-button-connect-color-hover: #8b46a4;
- --theme-button-connect-background-color-disabled: var(--theme-color-0);
- --theme-button-connect-border-color-disabled: var(--theme-color-0);
- --theme-button-connect-color-disabled: var(--theme-color-7);
+ --theme-button-connect-background-color-disabled: #fff;
+ --theme-button-connect-border-color-disabled: #fff;
+ --theme-button-connect-color-disabled: #c5c2cb;
/* Dropdown */
- --theme-dropdown-background-color: var(--theme-color-0);
- --theme-dropdown-border-color: var(--theme-color-0);
+ --theme-dropdown-background-color: #fff;
+ --theme-dropdown-border-color: #fff;
--theme-dropdown-box-shadow: 0 9.6px 13px 0 rgb(0 0 0 / 8%);
@@ -99,25 +86,25 @@ export const lightTheme = css`
--theme-dropdown-item-background-color-hover: transparent;
--theme-dropdown-item-background-color-active: rgb(0 0 0 / 10%);
- --theme-dropdown-item-color: var(--theme-color-1);
- --theme-dropdown-item-color-hover: var(--theme-color-1);
- --theme-dropdown-item-color-active: var(--theme-color-1);
+ --theme-dropdown-item-color: #2e3048;
+ --theme-dropdown-item-color-hover: #2e3048;
+ --theme-dropdown-item-color-active: #2e3048;
- --theme-dropdown-item-border-color: var(--theme-color-13);
- --theme-dropdown-item-border-color-hover: var(--theme-color-13);
- --theme-dropdown-item-border-color-active: var(--theme-color-13);
+ --theme-dropdown-item-border-color: #f0f0f0;
+ --theme-dropdown-item-border-color-hover: #f0f0f0;
+ --theme-dropdown-item-border-color-active: #f0f0f0;
/* Card */
- --theme-card-background-color: var(--theme-color-0);
- --theme-card-border-color: var(--theme-color-0);
+ --theme-card-background-color: #fff;
+ --theme-card-border-color: #fff;
--theme-card-box-shadow: 0 9.6px 13px 0 rgb(0 0 0 / 8%);
/* Copy button */
- --copy-button-color: var(--theme-color-14);
- --copy-button-color-hover: var(--theme-color-4);
+ --copy-button-color: #000;
+ --copy-button-color-hover: #8b46a4;
/* External link button */
- --external-link-button-color: var(--theme-color-14);
- --external-link-button-color-hover: var(--theme-color-4);
+ --external-link-button-color: #000;
+ --external-link-button-color-hover: #8b46a4;
}
`