Browse Source

website: added right gumroad button

pull/5/head
remorses 1 year ago
parent
commit
3292da33dc
3 changed files with 8 additions and 24 deletions
  1. +4
    -1
      website/constants.tsx
  2. +2
    -22
      website/pages/_app.tsx
  3. +2
    -1
      website/pages/index.tsx

+ 4
- 1
website/constants.tsx View File

@ -3,11 +3,14 @@ import React from 'react'
import { MyLink } from './pages/_app'
import { GithubLink } from 'dokz'
export const GUMROAD_PRODUCT_ID = 'XJbw'
export const headingNavLinks = [
<MyLink href='/#components'>Components</MyLink>,
<MyLink href='/docs'>Docs</MyLink>,
<MyLink href='/#demos'>Demos</MyLink>,
<MyLink href='/#newsletter'>Newsletter</MyLink>,
<GithubLink key='0' url='https://github.com/remorses/landing-blocks' />,
<GithubLink url='https://github.com/remorses/landing-blocks' />,
]
const BASE_PATH = '/docs/components/'

+ 2
- 22
website/pages/_app.tsx View File

@ -1,5 +1,5 @@
import { Link, useColorMode } from '@chakra-ui/core'
import { DokzProvider, GithubLink } from 'dokz'
import { DokzProvider, GithubLink, ColorModeSwitch } from 'dokz'
import { Footer } from 'landing-blocks/src/Footer'
import { useMyColorMode } from 'landing-blocks/src/hooks'
import { Box, Stack } from 'layout-kit-react'
@ -18,8 +18,8 @@ export default function App(props) {
docsRootPath='pages/docs'
headerItems={[
...headingNavLinks,
<ColorModeSwitch />,
// <ColorModeSwitch key='1' />,
,
]}
headerLogo={<HeadingLogoIcon width='36px' opacity={0.8} />}
mdxComponents={{
@ -42,7 +42,6 @@ export default function App(props) {
return <Component {...pageProps} />
}
export function MyLink({ href, ...rest }) {
const { colorMode } = useMyColorMode(rest)
return (
@ -57,25 +56,6 @@ export function MyLink({ href, ...rest }) {
)
}
function MyBreadcrumbs({ items, ...rest }) {
return (
<Stack direction='row' spacing='10px' align='center' {...rest}>
{items.map((x, i) => (
<Stack
opacity={0.6}
fontWeight='medium'
direction='row'
align='center'
spacing='10px'
>
<Box>{x}</Box>
{i !== items.length - 1 && <Box>></Box>}
</Stack>
))}
</Stack>
)
}
export const HeadingLogoIcon = ({ long = false, ...props }) => {
const { colorMode } = useColorMode()
const dark = colorMode === 'dark'

+ 2
- 1
website/pages/index.tsx View File

@ -23,6 +23,7 @@ import {
IndexCardsPaths,
headingNavLinks,
MAILCHIMP_URL,
GUMROAD_PRODUCT_ID,
} from '../constants'
import { HeroIllustration } from '../svgs'
import { HeadingLogoIcon } from './_app'
@ -196,7 +197,7 @@ export const BuyDemosButton = ({ ...rest }) => {
// TODO add the right productId
return (
<Box w='auto' shadow='lg' {...rest}>
<GumroadButton productId='demo'>
<GumroadButton productId={GUMROAD_PRODUCT_ID}>
Download the demos code
</GumroadButton>
</Box>

Loading…
Cancel
Save