kopia lustrzana https://github.com/bugout-dev/moonstream
landing page in progress
rodzic
d7f768814d
commit
ac3a53afe2
|
@ -30,6 +30,7 @@
|
|||
"react-query": "^3.18.1",
|
||||
"react-showdown": "^2.3.0",
|
||||
"react-split-pane": "^0.1.92",
|
||||
"react-xarrows": "^2.0.2",
|
||||
"showdown": "^1.9.1",
|
||||
"showdown-highlight": "^2.1.8",
|
||||
"uuid": "^8.3.2"
|
||||
|
|
|
@ -0,0 +1,524 @@
|
|||
import React, { useState, useEffect, Suspense, useContext } from "react";
|
||||
import {
|
||||
Flex,
|
||||
Heading,
|
||||
Text,
|
||||
Box,
|
||||
Image,
|
||||
Button,
|
||||
useBreakpointValue,
|
||||
Center,
|
||||
Fade,
|
||||
chakra,
|
||||
Stack,
|
||||
} from "@chakra-ui/react";
|
||||
import { Grid, GridItem } from "@chakra-ui/react";
|
||||
import { useUser, useAnalytics, useModals, useRouter } from "../src/core/hooks";
|
||||
import { getLayout } from "../src/layouts";
|
||||
import SplitWithImage from "../src/components/SplitWithImage";
|
||||
import {
|
||||
IoAnalyticsSharp,
|
||||
IoLogoBitcoin,
|
||||
IoSearchSharp,
|
||||
} from "react-icons/io5";
|
||||
import ConnectedButtons from "../src/components/ConnectedButtons";
|
||||
import UIContext from "../src/core/providers/UIProvider/context";
|
||||
|
||||
const HEADING_PROPS = {
|
||||
fontWeight: "700",
|
||||
fontSize: ["4xl", "5xl", "4xl", "5xl", "6xl", "7xl"],
|
||||
};
|
||||
|
||||
const TRIPLE_PICS_PROPS = {
|
||||
fontSize: ["1xl", "2xl", "2xl", "2xl", "3xl", "3xl"],
|
||||
textAlign: "center",
|
||||
fontWeight: "600",
|
||||
py: 4,
|
||||
};
|
||||
|
||||
const TRIPLE_PICS_TEXT = {
|
||||
fontSize: ["lg", "xl", "xl", "xl", "2xl", "3xl"],
|
||||
textAlign: "center",
|
||||
fontWeight: "400",
|
||||
mb: ["2rem", "2rem", "0", null, "0"],
|
||||
};
|
||||
|
||||
const CARD_CONTAINER = {
|
||||
className: "CardContainer",
|
||||
w: "100%",
|
||||
mx: [0, 0, "2rem", null, "4rem"],
|
||||
|
||||
alignSelf: ["center", null, "flex-start"],
|
||||
};
|
||||
|
||||
const IMAGE_CONTAINER = {
|
||||
className: "ImageContainer",
|
||||
// objectFit: "contain",
|
||||
h: ["10rem", null],
|
||||
// h: ["10rem", "14rem", "14rem", "15rem", "18rem", "20rem"],
|
||||
justifyContent: "center",
|
||||
};
|
||||
|
||||
const AWS_PATH =
|
||||
"https://s3.amazonaws.com/static.simiotics.com/moonstream/assets";
|
||||
|
||||
const assets = {
|
||||
background: `https://s3.amazonaws.com/static.simiotics.com/landing/landing-background-2.png`,
|
||||
aviator: `https://s3.amazonaws.com/static.simiotics.com/landing/aviator-2.svg`,
|
||||
icon1: `${AWS_PATH}/Image+1.png`,
|
||||
icon2: `${AWS_PATH}/Image+2.png`,
|
||||
icon3: `${AWS_PATH}/Image+3.png`,
|
||||
icon4: `${AWS_PATH}/Image+4.png`,
|
||||
icon5: `${AWS_PATH}/Image+5.png`,
|
||||
icon6: `${AWS_PATH}/Image+6.png`,
|
||||
};
|
||||
const Homepage = () => {
|
||||
const ui = useContext(UIContext);
|
||||
const router = useRouter();
|
||||
const buttonSize = useBreakpointValue({
|
||||
base: "md",
|
||||
sm: "md",
|
||||
md: "md",
|
||||
lg: "lg",
|
||||
xl: "xl",
|
||||
"2xl": "xl",
|
||||
});
|
||||
|
||||
const ButtonRadius = "2xl";
|
||||
const buttonWidth = ["100%", "100%", "40%", "45%", "45%", "45%"];
|
||||
const buttonMinWidth = "10rem";
|
||||
const { isInit } = useUser();
|
||||
const { withTracking, MIXPANEL_EVENTS } = useAnalytics();
|
||||
|
||||
const { toggleModal } = useModals();
|
||||
const [scrollDepth, setScrollDepth] = useState(0);
|
||||
|
||||
const getScrollPrecent = ({ currentTarget }) => {
|
||||
const scroll_level =
|
||||
(100 * (currentTarget.scrollTop + currentTarget.clientHeight)) /
|
||||
currentTarget.scrollHeight;
|
||||
return scroll_level;
|
||||
};
|
||||
|
||||
const handleScroll = (e) => {
|
||||
const currentScroll = Math.ceil(getScrollPrecent(e) / 10);
|
||||
|
||||
if (currentScroll > scrollDepth) {
|
||||
withTracking(
|
||||
setScrollDepth(currentScroll),
|
||||
MIXPANEL_EVENTS.HOMEPAGE_SCROLL_DEPTH,
|
||||
scrollDepth
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (
|
||||
router.nextRouter.asPath !== "/" &&
|
||||
router.nextRouter.asPath.slice(0, 2) !== "/?" &&
|
||||
router.nextRouter.asPath.slice(0, 2) !== "/#"
|
||||
) {
|
||||
router.replace(router.nextRouter.asPath, undefined, {
|
||||
shallow: true,
|
||||
});
|
||||
}
|
||||
}, [isInit, router]);
|
||||
|
||||
return (
|
||||
<Fade in>
|
||||
<Box
|
||||
width="100%"
|
||||
flexDirection="column"
|
||||
onScroll={(e) => handleScroll(e)}
|
||||
sx={{ scrollBehavior: "smooth" }}
|
||||
>
|
||||
<Flex
|
||||
direction="column"
|
||||
h="auto"
|
||||
position="relative"
|
||||
w="100%"
|
||||
overflow="initial"
|
||||
>
|
||||
<Suspense fallback={""}></Suspense>
|
||||
|
||||
<Grid templateColumns="repeat(12,1fr)">
|
||||
<GridItem px="0" colSpan="12" pb={[1, 2, null, 8]}>
|
||||
<chakra.header>
|
||||
<Box
|
||||
w="full"
|
||||
h="container.sm"
|
||||
backgroundImage={`url(${assets["background"]})`}
|
||||
bgPos="center"
|
||||
bgSize="cover"
|
||||
>
|
||||
<Flex
|
||||
align="center"
|
||||
pos="relative"
|
||||
justify="center"
|
||||
boxSize="full"
|
||||
// bg="blackAlpha.700"
|
||||
>
|
||||
<Stack
|
||||
textAlign="center"
|
||||
alignItems="center"
|
||||
spacing={6}
|
||||
maxW="1220px"
|
||||
px="7%"
|
||||
>
|
||||
<Heading
|
||||
size="xl"
|
||||
fontWeight="semibold"
|
||||
color="white"
|
||||
textTransform="uppercase"
|
||||
>
|
||||
{/* <LoadingDots isActive> */}
|
||||
All the crypto data you care about in a single stream
|
||||
{/* </LoadingDots> */}
|
||||
</Heading>
|
||||
<chakra.span
|
||||
my={12}
|
||||
display="inline-block"
|
||||
color="primary.200"
|
||||
textDecor="underline"
|
||||
>
|
||||
Get all the crypto data you need in a single stream.
|
||||
From pending transactions in the Ethereum transaction
|
||||
pool to Elon Musk’s latest tweets.
|
||||
</chakra.span>
|
||||
<chakra.span
|
||||
display="inline-block"
|
||||
color="primary.300"
|
||||
textDecor="underline"
|
||||
>
|
||||
Access this data through the Moonstream dashboard or API
|
||||
</chakra.span>
|
||||
</Stack>
|
||||
</Flex>
|
||||
</Box>
|
||||
</chakra.header>
|
||||
</GridItem>
|
||||
|
||||
<GridItem
|
||||
px="7%"
|
||||
colSpan="12"
|
||||
pt={["20px", "20px", "100px", null, "120px"]}
|
||||
pb={["20px", "56px", null, "184px"]}
|
||||
bgSize="cover"
|
||||
bgImage={`url(${assets["background"]})`}
|
||||
>
|
||||
<Heading
|
||||
{...HEADING_PROPS}
|
||||
textAlign="center"
|
||||
pb={[12, 12, 12, null, 48]}
|
||||
>
|
||||
Data you can add to your stream:
|
||||
</Heading>
|
||||
|
||||
<Flex
|
||||
direction={["column", null, "row"]}
|
||||
flexWrap="nowrap"
|
||||
justifyContent={["center", null, "space-evenly"]}
|
||||
>
|
||||
<Box {...CARD_CONTAINER}>
|
||||
<Flex {...IMAGE_CONTAINER}>
|
||||
<Image
|
||||
objectFit="contain"
|
||||
src={assets["icon2"]}
|
||||
alt="privacy is our prioriy"
|
||||
/>
|
||||
</Flex>
|
||||
<Heading {...TRIPLE_PICS_PROPS}>
|
||||
Ethereum mined transactions
|
||||
</Heading>
|
||||
<Text {...TRIPLE_PICS_TEXT}></Text>
|
||||
</Box>
|
||||
<Box {...CARD_CONTAINER}>
|
||||
<Flex {...IMAGE_CONTAINER}>
|
||||
<Image
|
||||
objectFit="contain"
|
||||
src={assets["icon1"]}
|
||||
alt="live metrics"
|
||||
/>
|
||||
</Flex>
|
||||
<Heading {...TRIPLE_PICS_PROPS}>
|
||||
Ethereum pending transactions
|
||||
</Heading>
|
||||
<Text {...TRIPLE_PICS_TEXT}></Text>
|
||||
</Box>
|
||||
<Box {...CARD_CONTAINER}>
|
||||
<Flex {...IMAGE_CONTAINER}>
|
||||
<Image
|
||||
objectFit="contain"
|
||||
src={assets["icon1"]}
|
||||
alt="live metrics"
|
||||
/>
|
||||
</Flex>
|
||||
<Heading {...TRIPLE_PICS_PROPS}>
|
||||
Centralized exchanges
|
||||
</Heading>
|
||||
<Text {...TRIPLE_PICS_TEXT}></Text>
|
||||
</Box>
|
||||
|
||||
<Box {...CARD_CONTAINER}>
|
||||
<Flex {...IMAGE_CONTAINER}>
|
||||
<Image
|
||||
objectFit="contain"
|
||||
src={assets["icon3"]}
|
||||
alt="we make it simple for user"
|
||||
/>
|
||||
</Flex>
|
||||
<Heading {...TRIPLE_PICS_PROPS}>Social media posts</Heading>
|
||||
<Text {...TRIPLE_PICS_TEXT}></Text>
|
||||
</Box>
|
||||
</Flex>
|
||||
{/* <Text
|
||||
textAlign="center"
|
||||
fontSize={["xl", "2xl", "2xl", "3xl", "4xl", "5xl"]}
|
||||
fontWeight="600"
|
||||
pt={[4, null, 12]}
|
||||
>
|
||||
We currently support Python, Javascript and Go!
|
||||
<br />
|
||||
Want us to support other programming languages?{" "}
|
||||
<Button
|
||||
size="2xl"
|
||||
colorScheme="primary"
|
||||
variant="link"
|
||||
onClick={() => toggleModal("Integration")}
|
||||
>
|
||||
Let us know
|
||||
</Button>
|
||||
</Text> */}
|
||||
</GridItem>
|
||||
<GridItem
|
||||
px={["7%", "12px", "7%", null, "7%"]}
|
||||
colSpan="12"
|
||||
pb={[1, 2, null, 8]}
|
||||
pt="5.125rem"
|
||||
mb="66px"
|
||||
bgGradient="linear-gradient(to bottom, #e9eaf4, #efeff7, #f4f4f9, #fafafc, #ffffff)"
|
||||
borderRadius="md"
|
||||
>
|
||||
<Flex
|
||||
w="100%"
|
||||
direction={["column", "row", "column", null, "column"]}
|
||||
flexWrap={["nowrap", "nowrap", "nowrap", null, "nowrap"]}
|
||||
// justifyContent="center"
|
||||
pb="66px"
|
||||
>
|
||||
<ConnectedButtons
|
||||
// title={"Are you a..."}
|
||||
title={"You are..."}
|
||||
button1={{
|
||||
label: "Crypto trader",
|
||||
link: "/#cryptoTrader",
|
||||
onClick: null,
|
||||
}}
|
||||
button2={{
|
||||
label: "Algorithmic Fund",
|
||||
link: "/#algoFund",
|
||||
onClick: null,
|
||||
}}
|
||||
button3={{
|
||||
label: "Developer",
|
||||
link: "/#smartDeveloper",
|
||||
onClick: null,
|
||||
}}
|
||||
/>
|
||||
</Flex>
|
||||
</GridItem>
|
||||
<GridItem
|
||||
px="7%"
|
||||
colSpan="12"
|
||||
pt={["1rem", "1rem", "5.125rem", null, "5.125rem"]}
|
||||
pb={["0", "66px", null, "66px"]}
|
||||
id="cryptoTrader"
|
||||
minH={ui.isMobileView ? "100vh" : null}
|
||||
>
|
||||
<SplitWithImage
|
||||
// cta={"Trader early access"}
|
||||
cta={"I want early access!"}
|
||||
elementName={"element1"}
|
||||
colorScheme="suggested"
|
||||
badge={`For crypto traders`}
|
||||
title={``}
|
||||
body={``}
|
||||
bullets={[
|
||||
{
|
||||
text: `Subscribe to the defi contracts you care about`,
|
||||
icon: IoLogoBitcoin,
|
||||
color: "suggested.50",
|
||||
bgColor: "suggested.900",
|
||||
},
|
||||
{
|
||||
text: `Make sense of how others are calling these contracts using Moonstream dashboards.
|
||||
`,
|
||||
icon: IoAnalyticsSharp,
|
||||
color: "suggested.50",
|
||||
bgColor: "suggested.900",
|
||||
},
|
||||
{
|
||||
text: `Get data directly from the transaction pool through our global network of Ethereum nodes`,
|
||||
icon: IoSearchSharp,
|
||||
color: "suggested.50",
|
||||
bgColor: "suggested.900",
|
||||
},
|
||||
]}
|
||||
imgURL={assets["icon2"]}
|
||||
/>
|
||||
</GridItem>
|
||||
<GridItem
|
||||
px="7%"
|
||||
colSpan="12"
|
||||
pt={["1rem", "1rem", "5.125rem", null, "5.125rem"]}
|
||||
pb={["0", "66px", null, "66px"]}
|
||||
id="algoFund"
|
||||
minH={ui.isMobileView ? "100vh" : null}
|
||||
>
|
||||
<SplitWithImage
|
||||
// cta={"Algoritmic fund early access"}
|
||||
cta={"I want early access!"}
|
||||
elementName={"element2"}
|
||||
mirror={true}
|
||||
colorScheme="secondary"
|
||||
badge={`For algorithmic funds`}
|
||||
// title={`Get API access to your stream`}
|
||||
// body={`Specify actions.
|
||||
// Something happens on blockchain and we automatically execute for them.
|
||||
// Algorithmic trading on the blockchain`}
|
||||
bullets={[
|
||||
{
|
||||
text: `Get API access to your stream`,
|
||||
icon: IoLogoBitcoin,
|
||||
color: "secondary.50",
|
||||
bgColor: "secondary.900",
|
||||
},
|
||||
{
|
||||
text: `Set conditions that trigger predefined actions`,
|
||||
icon: IoAnalyticsSharp,
|
||||
color: "secondary.50",
|
||||
bgColor: "secondary.900",
|
||||
},
|
||||
{
|
||||
text: `Execute transactions directly on Moonstream nodes`,
|
||||
icon: IoSearchSharp,
|
||||
color: "secondary.50",
|
||||
bgColor: "secondary.900",
|
||||
},
|
||||
]}
|
||||
imgURL={assets["icon3"]}
|
||||
/>
|
||||
</GridItem>
|
||||
<GridItem
|
||||
px="7%"
|
||||
colSpan="12"
|
||||
pt={["1rem", "1rem", "5.125rem", null, "5.125rem"]}
|
||||
pb={["0", "66px", null, "66px"]}
|
||||
id="smartDeveloper"
|
||||
minH={ui.isMobileView ? "100vh" : null}
|
||||
>
|
||||
<SplitWithImage
|
||||
// cta={"Developer early access"}
|
||||
cta={"I want early access!"}
|
||||
elementName={"element3"}
|
||||
colorScheme="primary"
|
||||
badge={`For smart contract developers`}
|
||||
// title={`Learn how people use your smart contracts`}
|
||||
// body={`
|
||||
// Connect decentralized application with centralized application
|
||||
// Creat Blockchain based web hooks and get full visibility of your smart contracts`}
|
||||
bullets={[
|
||||
{
|
||||
text: `See how people use your smart contracts`,
|
||||
icon: IoLogoBitcoin,
|
||||
color: "primary.50",
|
||||
bgColor: "primary.900",
|
||||
},
|
||||
{
|
||||
text: `Set up alerts on suspicious activity`,
|
||||
icon: IoAnalyticsSharp,
|
||||
color: "primary.50",
|
||||
bgColor: "primary.900",
|
||||
},
|
||||
{
|
||||
text: `Register webhooks to connect your off-chain infrastructure`,
|
||||
icon: IoSearchSharp,
|
||||
color: "primary.50",
|
||||
bgColor: "primary.900",
|
||||
},
|
||||
]}
|
||||
imgURL={assets["icon6"]}
|
||||
/>
|
||||
</GridItem>
|
||||
<GridItem
|
||||
placeItems="center"
|
||||
w="100%"
|
||||
colSpan="12"
|
||||
pt={["0", "0", "5.125rem", null, "5.125rem"]}
|
||||
pb="120px"
|
||||
>
|
||||
<Center>
|
||||
<Button
|
||||
size="lg"
|
||||
variant="solid"
|
||||
colorScheme="suggested"
|
||||
id="test"
|
||||
>
|
||||
Join our waitlist
|
||||
</Button>
|
||||
</Center>
|
||||
</GridItem>
|
||||
</Grid>
|
||||
</Flex>
|
||||
{/* <ConnectElements
|
||||
selector=".MoonBadge"
|
||||
overlay={100}
|
||||
elements={[
|
||||
{ from: ".element1", to: ".element2" },
|
||||
{ from: ".element2", to: ".element3" },
|
||||
// { from: ".element3", to: ".element4" },
|
||||
// { from: ".element5", to: ".element4" },
|
||||
// { from: ".element6", to: ".element4" },
|
||||
// { from: ".element7", to: ".element4" },
|
||||
]}
|
||||
/> */}
|
||||
</Box>
|
||||
</Fade>
|
||||
);
|
||||
};
|
||||
|
||||
export async function getStaticProps() {
|
||||
const metaTags = {
|
||||
title: "Bugout: Measure the success of your dev tool",
|
||||
description:
|
||||
"Get usage metrics and crash reports. Improve your users' experience",
|
||||
keywords:
|
||||
"bugout, bugout-dev, bugout.dev, usage-metrics, analytics, dev-tool ,knowledge, docs, journal, entry, find-anything",
|
||||
url: "https://bugout.dev",
|
||||
image:
|
||||
"https://s3.amazonaws.com/static.simiotics.com/landing/aviator-2.svg",
|
||||
};
|
||||
|
||||
const assetPreload = Object.keys(assets).map((key) => {
|
||||
return {
|
||||
rel: "preload",
|
||||
href: assets[key],
|
||||
as: "image",
|
||||
};
|
||||
});
|
||||
const preconnects = [
|
||||
{ rel: "preconnect", href: "https://s3.amazonaws.com" },
|
||||
{ rel: "preconnect", href: "https://assets.calendly.com/" },
|
||||
];
|
||||
|
||||
const preloads = assetPreload.concat(preconnects);
|
||||
|
||||
return {
|
||||
props: { metaTags, preloads },
|
||||
};
|
||||
}
|
||||
|
||||
Homepage.layout = "default";
|
||||
Homepage.getLayout = getLayout;
|
||||
|
||||
export default Homepage;
|
|
@ -1,597 +0,0 @@
|
|||
import React, { useState, useEffect, Suspense } from "react";
|
||||
import {
|
||||
Flex,
|
||||
Heading,
|
||||
Text,
|
||||
Box,
|
||||
Image,
|
||||
ListItem,
|
||||
Button,
|
||||
Link,
|
||||
ListIcon,
|
||||
List,
|
||||
useBreakpointValue,
|
||||
Center,
|
||||
Fade,
|
||||
} from "@chakra-ui/react";
|
||||
import { Grid, GridItem } from "@chakra-ui/react";
|
||||
import { useUser, useAnalytics, useModals, useRouter } from "../src/core/hooks";
|
||||
import { openPopupWidget, InlineWidget } from "react-calendly";
|
||||
import TrustedBadge from "../src/components/TrustedBadge"
|
||||
import { getLayout } from "../src/layouts";
|
||||
|
||||
const TEXT_PROPS = {
|
||||
fontSize: ["lg", null, "xl"],
|
||||
fontWeight: "600",
|
||||
};
|
||||
|
||||
const HEADING_PROPS = {
|
||||
fontWeight: "700",
|
||||
fontSize: ["4xl", "5xl", "4xl", "5xl", "6xl", "7xl"],
|
||||
};
|
||||
|
||||
const TITLE_PROPS = {
|
||||
fontWeight: "700",
|
||||
fontSize: ["4xl", "5xl", "5xl", "5xl", "6xl", "120px"],
|
||||
};
|
||||
|
||||
const TRIPLE_PICS_PROPS = {
|
||||
fontSize: ["2xl", "3xl", "3xl", "3xl", "4xl", "4xl"],
|
||||
textAlign: "center",
|
||||
fontWeight: "500",
|
||||
py: 4,
|
||||
};
|
||||
|
||||
const TRIPLE_PICS_TEXT = {
|
||||
fontSize: ["lg", "xl", "xl", "xl", "2xl", "3xl"],
|
||||
textAlign: "center",
|
||||
fontWeight: "400",
|
||||
mb: ["2rem", "2rem", "0", null, "0"],
|
||||
};
|
||||
|
||||
const CARD_CONTAINER = {
|
||||
className: "CardContainer",
|
||||
w: "100%",
|
||||
mx: [0, 0, "2rem", null, "4rem"],
|
||||
|
||||
alignSelf: ["center", null, "flex-start"],
|
||||
};
|
||||
|
||||
const IMAGE_CONTAINER = {
|
||||
className: "ImageContainer",
|
||||
h: ["10rem", "14rem", "14rem", "15rem", "18rem", "20rem"],
|
||||
justifyContent: "center",
|
||||
};
|
||||
|
||||
const AWS_PATH = "https://s3.amazonaws.com/static.simiotics.com/landing";
|
||||
|
||||
const assets = {
|
||||
background: `${AWS_PATH}/landing-background-2.png`,
|
||||
aviator: `${AWS_PATH}/aviator-2.svg`,
|
||||
icon1: `${AWS_PATH}/v2/Icon+1.svg`,
|
||||
icon2: `${AWS_PATH}/v2/Icon+2.svg`,
|
||||
icon3: `${AWS_PATH}/v2/Icon+3.svg`,
|
||||
icon4: `${AWS_PATH}/v2/Icon+4.svg`,
|
||||
icon5: `${AWS_PATH}/v2/Icon+5.svg`,
|
||||
icon6: `${AWS_PATH}/v2/Icon+6.svg`,
|
||||
activeloopLogo: `${AWS_PATH}/activeloop.svg`,
|
||||
aiIncubeLogo: `${AWS_PATH}/ai incube.svg`,
|
||||
b612Logo: `${AWS_PATH}/b612.svg`,
|
||||
harvardLogo: `${AWS_PATH}/harvard.svg`,
|
||||
mattermarkLogo: `${AWS_PATH}/mattermark.svg`,
|
||||
mixrankLogo: `${AWS_PATH}/mixrank.svg`,
|
||||
toolchainLogo: `${AWS_PATH}/toolchain.svg`,
|
||||
};
|
||||
const Homepage = () => {
|
||||
const router = useRouter();
|
||||
const buttonSize = useBreakpointValue({
|
||||
base: "md",
|
||||
sm: "md",
|
||||
md: "md",
|
||||
lg: "lg",
|
||||
xl: "xl",
|
||||
"2xl": "xl",
|
||||
});
|
||||
|
||||
const ButtonRadius = "2xl";
|
||||
const buttonWidth = ["100%", "100%", "40%", "45%", "45%", "45%"];
|
||||
const buttonMinWidth = "10rem";
|
||||
const { isInit } = useUser();
|
||||
const { withTracking, MIXPANEL_EVENTS } = useAnalytics();
|
||||
|
||||
const { toggleModal } = useModals();
|
||||
const [scrollDepth, setScrollDepth] = useState(0);
|
||||
|
||||
const getScrollPrecent = ({ currentTarget }) => {
|
||||
const scroll_level =
|
||||
(100 * (currentTarget.scrollTop + currentTarget.clientHeight)) /
|
||||
currentTarget.scrollHeight;
|
||||
return scroll_level;
|
||||
};
|
||||
|
||||
const handleScroll = (e) => {
|
||||
const currentScroll = Math.ceil(getScrollPrecent(e) / 10);
|
||||
|
||||
if (currentScroll > scrollDepth) {
|
||||
withTracking(
|
||||
setScrollDepth(currentScroll),
|
||||
MIXPANEL_EVENTS.HOMEPAGE_SCROLL_DEPTH,
|
||||
scrollDepth
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const DoubleCTAButton = () => (
|
||||
<Flex
|
||||
justifyContent="flex-start"
|
||||
// mt={20}
|
||||
flexWrap="wrap"
|
||||
width="100%"
|
||||
>
|
||||
<Button
|
||||
variant="solid"
|
||||
w={buttonWidth}
|
||||
minW={buttonMinWidth}
|
||||
borderRadius={ButtonRadius}
|
||||
colorScheme="secondary"
|
||||
size={buttonSize}
|
||||
onClick={() => toggleModal("register")}
|
||||
mr="1.25rem"
|
||||
color="white"
|
||||
border="2px solid #D35725"
|
||||
fontWeight="400"
|
||||
>
|
||||
Sign up for free
|
||||
</Button>
|
||||
|
||||
<Suspense fallback={""}>
|
||||
<Button
|
||||
variant="outline"
|
||||
colorScheme="gray"
|
||||
color="black"
|
||||
borderRadius={ButtonRadius}
|
||||
w={buttonWidth}
|
||||
minW={buttonMinWidth}
|
||||
mr="1.25rem"
|
||||
size={buttonSize}
|
||||
fontWeight="400"
|
||||
onClick={() => {
|
||||
openPopupWidget({
|
||||
url: "https://calendly.com/neeraj-simiotics/bugout-30",
|
||||
});
|
||||
}}
|
||||
>
|
||||
Book office hours
|
||||
</Button>
|
||||
</Suspense>
|
||||
</Flex>
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (
|
||||
router.nextRouter.asPath !== "/" &&
|
||||
router.nextRouter.asPath.slice(0, 2) !== "/?"
|
||||
) {
|
||||
router.replace(router.nextRouter.asPath, undefined, {
|
||||
shallow: true,
|
||||
});
|
||||
}
|
||||
}, [isInit, router]);
|
||||
|
||||
return (
|
||||
<Fade in>
|
||||
<Box
|
||||
width="100%"
|
||||
flexDirection="column"
|
||||
onScroll={(e) => handleScroll(e)}
|
||||
>
|
||||
<Flex
|
||||
direction="column"
|
||||
h="auto"
|
||||
position="relative"
|
||||
w="100%"
|
||||
overflow="initial"
|
||||
>
|
||||
<Suspense fallback={""}></Suspense>
|
||||
|
||||
<Grid templateColumns="repeat(12,1fr)">
|
||||
<GridItem px="7%" colSpan="12" pb={[1, 2, null, 8]}>
|
||||
<Flex w="100%" wrap="wrap">
|
||||
<Flex
|
||||
direction="column"
|
||||
alignItems="left"
|
||||
pr={[0, null, 24]}
|
||||
flexBasis="300px"
|
||||
flexGrow={1}
|
||||
>
|
||||
<Heading
|
||||
pt={["2rem", "3rem", "3rem", "10rem", "12rem", "14rem"]}
|
||||
{...TITLE_PROPS}
|
||||
mb={3}
|
||||
fontWeight="700"
|
||||
>
|
||||
Measure the success of your dev tool
|
||||
</Heading>
|
||||
<Text
|
||||
fontSize={["3xl", "4xl", "3xl", "4xl", "5xl", "6xl"]}
|
||||
pb={[0, 0, 0, 0, 0, "3rem"]}
|
||||
mb={20}
|
||||
fontWeight="600"
|
||||
color="primary.1000"
|
||||
lineHeight="100%"
|
||||
>
|
||||
Get usage metrics and crash reports <br />{" "}
|
||||
{`Improve your
|
||||
users' experience`}
|
||||
</Text>
|
||||
<DoubleCTAButton />
|
||||
</Flex>
|
||||
<Flex flexBasis="200px" flexGrow={1} flexShrink={1}>
|
||||
<Image
|
||||
rel="preconnect"
|
||||
src={assets["aviator"]}
|
||||
alt="Bugout is on the fly to report your crashes"
|
||||
/>
|
||||
</Flex>
|
||||
</Flex>
|
||||
</GridItem>
|
||||
<GridItem
|
||||
px="7%"
|
||||
colSpan="12"
|
||||
pt={["20px", "20px", "100px", null, "120px"]}
|
||||
pb={["20px", "56px", null, "184px"]}
|
||||
bgSize="cover"
|
||||
bgImage={`url(${assets["background"]})`}
|
||||
>
|
||||
<Heading
|
||||
{...HEADING_PROPS}
|
||||
textAlign="center"
|
||||
pb={[12, 12, 12, null, 48]}
|
||||
>
|
||||
See what your users are experiencing with your library, API, or
|
||||
command line tool
|
||||
</Heading>
|
||||
|
||||
<Flex
|
||||
direction={["column", null, "row"]}
|
||||
flexWrap="nowrap"
|
||||
justifyContent={["center", null, "space-evenly"]}
|
||||
>
|
||||
<Box {...CARD_CONTAINER}>
|
||||
<Flex {...IMAGE_CONTAINER}>
|
||||
<Image
|
||||
w="100%"
|
||||
src={assets["icon2"]}
|
||||
alt="privacy is our prioriy"
|
||||
/>
|
||||
</Flex>
|
||||
<Heading {...TRIPLE_PICS_PROPS}>
|
||||
Catch and fix bugs faster
|
||||
</Heading>
|
||||
<Text {...TRIPLE_PICS_TEXT}>
|
||||
Learn about errors as they occur, with full stack traces.
|
||||
</Text>
|
||||
</Box>
|
||||
<Box {...CARD_CONTAINER}>
|
||||
<Flex {...IMAGE_CONTAINER}>
|
||||
<Image w="100%" src={assets["icon1"]} alt="live metrics" />
|
||||
</Flex>
|
||||
<Heading {...TRIPLE_PICS_PROPS}>
|
||||
Understand your user engagement and retention
|
||||
</Heading>
|
||||
<Text {...TRIPLE_PICS_TEXT}>
|
||||
Learn how users are using your tool, and how frequently.
|
||||
</Text>
|
||||
</Box>
|
||||
|
||||
<Box {...CARD_CONTAINER}>
|
||||
<Flex {...IMAGE_CONTAINER}>
|
||||
<Image
|
||||
w="100%"
|
||||
src={assets["icon3"]}
|
||||
alt="we make it simple for user"
|
||||
/>
|
||||
</Flex>
|
||||
<Heading {...TRIPLE_PICS_PROPS}>
|
||||
Inform your product roadmap
|
||||
</Heading>
|
||||
<Text {...TRIPLE_PICS_TEXT}>
|
||||
Understand which features people are actually using.
|
||||
</Text>
|
||||
</Box>
|
||||
</Flex>
|
||||
<Text
|
||||
textAlign="center"
|
||||
fontSize={["xl", "2xl", "2xl", "3xl", "4xl", "5xl"]}
|
||||
fontWeight="600"
|
||||
pt={[4, null, 12]}
|
||||
>
|
||||
We currently support Python, Javascript and Go!
|
||||
<br />
|
||||
Want us to support other programming languages?{" "}
|
||||
<Button
|
||||
size="2xl"
|
||||
colorScheme="primary"
|
||||
variant="link"
|
||||
onClick={() => toggleModal("Integration")}
|
||||
>
|
||||
Let us know
|
||||
</Button>
|
||||
</Text>
|
||||
</GridItem>
|
||||
<GridItem px="7%" colSpan="12" pt="5.125rem" pb="66px">
|
||||
<Heading {...HEADING_PROPS} textAlign="center" pb={12}>
|
||||
Engage with your users on a deeper level
|
||||
</Heading>
|
||||
|
||||
<Flex
|
||||
direction={["column", null, "row"]}
|
||||
flexWrap="nowrap"
|
||||
justifyContent={["center", null, "space-evenly"]}
|
||||
>
|
||||
<Box {...CARD_CONTAINER}>
|
||||
<Flex {...IMAGE_CONTAINER}>
|
||||
<Image w="100%" src={assets["icon4"]} alt="live metrics" />
|
||||
</Flex>
|
||||
<Heading {...TRIPLE_PICS_PROPS}>Live dashboards</Heading>
|
||||
<Text {...TRIPLE_PICS_TEXT}>
|
||||
See your users’ journeys as they happen
|
||||
</Text>
|
||||
</Box>
|
||||
<Box {...CARD_CONTAINER}>
|
||||
<Flex {...IMAGE_CONTAINER}>
|
||||
<Image
|
||||
w="100%"
|
||||
src={assets["icon5"]}
|
||||
alt="privacy is our prioriy"
|
||||
/>
|
||||
</Flex>
|
||||
<Heading {...TRIPLE_PICS_PROPS}>GDPR compliance</Heading>
|
||||
<Text {...TRIPLE_PICS_TEXT}>
|
||||
Automatically handle GDPR-related user requests
|
||||
</Text>
|
||||
</Box>
|
||||
<Box {...CARD_CONTAINER}>
|
||||
<Flex {...IMAGE_CONTAINER}>
|
||||
<Image
|
||||
w="100%"
|
||||
src={assets["icon6"]}
|
||||
alt="we make it simple for user"
|
||||
/>
|
||||
</Flex>
|
||||
<Heading {...TRIPLE_PICS_PROPS}>
|
||||
Simple user consent flows
|
||||
</Heading>
|
||||
<Text {...TRIPLE_PICS_TEXT}>
|
||||
Define principled user consent flows in only a few lines of
|
||||
code.
|
||||
</Text>
|
||||
</Box>
|
||||
</Flex>
|
||||
<Center>
|
||||
<Flex
|
||||
m={0}
|
||||
mt="120px"
|
||||
flexWrap="wrap"
|
||||
width="100%"
|
||||
w={["360px", "360px", "500px", null, "800px"]}
|
||||
>
|
||||
<Button
|
||||
variant="solid"
|
||||
w={buttonWidth}
|
||||
minW="14rem"
|
||||
borderRadius={ButtonRadius}
|
||||
colorScheme="secondary"
|
||||
size={buttonSize}
|
||||
onClick={() => toggleModal("register")}
|
||||
mr="1.25rem"
|
||||
color="white"
|
||||
border="2px solid #D35725"
|
||||
fontWeight="400"
|
||||
>
|
||||
Sign up for free
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
variant="outline"
|
||||
colorScheme="gray"
|
||||
color="black"
|
||||
borderRadius={ButtonRadius}
|
||||
w={buttonWidth}
|
||||
minW="14rem"
|
||||
mr="1.25rem"
|
||||
size={buttonSize}
|
||||
fontWeight="400"
|
||||
onClick={() => {
|
||||
openPopupWidget({
|
||||
url: "https://calendly.com/neeraj-simiotics/bugout-30",
|
||||
});
|
||||
}}
|
||||
>
|
||||
Book office hours
|
||||
</Button>
|
||||
</Flex>
|
||||
</Center>
|
||||
</GridItem>
|
||||
<GridItem
|
||||
px="7%"
|
||||
colSpan="12"
|
||||
pt="66px"
|
||||
bgColor="primary.50"
|
||||
pb={["20px", "30px", "92px", null, "92px", "196px"]}
|
||||
>
|
||||
<Heading {...HEADING_PROPS} textAlign="center" pb={14} pt={0}>
|
||||
Loved by proactive teams{" "}
|
||||
<span role="img" aria-label="heart">
|
||||
💙
|
||||
</span>
|
||||
</Heading>
|
||||
<Flex wrap="wrap" direction="row" justifyContent="center">
|
||||
<Suspense fallback={""}>
|
||||
<TrustedBadge
|
||||
name="activeloop"
|
||||
caseURL="/case-studies/activeloop"
|
||||
ImgURL={assets["activeloopLogo"]}
|
||||
/>
|
||||
<TrustedBadge
|
||||
name="ai incube"
|
||||
ImgURL={assets["aiIncubeLogo"]}
|
||||
/>
|
||||
<TrustedBadge name="b612" ImgURL={assets["b612Logo"]} />
|
||||
<TrustedBadge name="harvard" ImgURL={assets["harvardLogo"]} />
|
||||
<TrustedBadge
|
||||
name="mattermark"
|
||||
ImgURL={assets["mattermarkLogo"]}
|
||||
/>
|
||||
<TrustedBadge name="mixrank" ImgURL={assets["mixrankLogo"]} />
|
||||
<TrustedBadge
|
||||
name="toolchain"
|
||||
ImgURL={assets["toolchainLogo"]}
|
||||
/>
|
||||
</Suspense>
|
||||
</Flex>
|
||||
</GridItem>
|
||||
<GridItem px="7%" colSpan="12" py={24}>
|
||||
<Heading textAlign="center" {...HEADING_PROPS} pb={8}>
|
||||
Ready to learn more?
|
||||
</Heading>
|
||||
<Text textAlign="center" {...TEXT_PROPS}>
|
||||
Book office hours with Neeraj Kashyap (
|
||||
<Link
|
||||
color="primary.500"
|
||||
isExternal
|
||||
href="https://github.com/zomglings"
|
||||
>
|
||||
@zomglings
|
||||
</Link>
|
||||
), CEO of Bugout
|
||||
</Text>
|
||||
</GridItem>
|
||||
|
||||
<GridItem px="7%" colSpan="12"></GridItem>
|
||||
</Grid>
|
||||
<Flex
|
||||
bg="primary.1200"
|
||||
direction={["column", null, "row"]}
|
||||
w="100%"
|
||||
py="2rem"
|
||||
px="7%"
|
||||
h="100%"
|
||||
>
|
||||
<Flex
|
||||
w={["100%", null, "50%"]}
|
||||
textColor="white.200"
|
||||
direction="column"
|
||||
pr={[0, 0, 12, null, 12]}
|
||||
>
|
||||
<Heading
|
||||
fontSize={["xl", "3xl", null, "3xl", "5xl", "5xl"]}
|
||||
fontWeight="500"
|
||||
alignSelf="left"
|
||||
pt={[4, 4, 24, null, 24]}
|
||||
pb={[6, 6, 12, null, 16]}
|
||||
>
|
||||
{`Let's talk about:`}
|
||||
</Heading>
|
||||
<List
|
||||
fontWeight="400"
|
||||
fontSize={["md", null, "2xl", "2xl", "3xl", "4xl"]}
|
||||
alignSelf="center"
|
||||
spacing={[4, 4, 8, null, 8]}
|
||||
>
|
||||
<ListItem>
|
||||
<ListIcon as={() => "- "} />
|
||||
How to measure and improve the quality of your users’
|
||||
experience
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<ListIcon as={() => "- "} />
|
||||
Ethical data collection
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<ListIcon as={() => "- "} />
|
||||
Developer tools best practices, pulling from our experience at
|
||||
OpenAI and Google (TensorFlow, Kubeflow, Google Cloud)
|
||||
</ListItem>
|
||||
</List>
|
||||
<Heading
|
||||
fontSize={["xl", "3xl", null, "3xl", "5xl", "5xl"]}
|
||||
fontWeight="500"
|
||||
pt={[4, null, 8, 16, 24]}
|
||||
>
|
||||
Book now →
|
||||
</Heading>
|
||||
</Flex>
|
||||
<Flex className="CalendlyWrapper" w={["100%", null, "45%"]}>
|
||||
<InlineWidget
|
||||
styles={{
|
||||
width: "100%",
|
||||
height: "720px",
|
||||
}}
|
||||
hid
|
||||
url="https://calendly.com/neeraj-simiotics/bugout-30?hide_event_type_details=1"
|
||||
/>
|
||||
</Flex>
|
||||
</Flex>
|
||||
|
||||
<Grid px="7%" templateColumns="repeat(12,1fr)">
|
||||
<GridItem colSpan="4" py={2}>
|
||||
|
||||
</GridItem>
|
||||
<GridItem colSpan="4" py={2}>
|
||||
<Center>
|
||||
<iframe
|
||||
title="substack"
|
||||
src="https://bugout.substack.com/embed"
|
||||
width="480"
|
||||
height="320"
|
||||
frameBorder="0"
|
||||
scrolling="no"
|
||||
></iframe>
|
||||
</Center>
|
||||
</GridItem>
|
||||
<GridItem colSpan="4" py={2}>
|
||||
|
||||
</GridItem>
|
||||
</Grid>
|
||||
</Flex>
|
||||
</Box>
|
||||
</Fade>
|
||||
);
|
||||
};
|
||||
|
||||
export async function getStaticProps() {
|
||||
const metaTags = {
|
||||
title: "Bugout: Measure the success of your dev tool",
|
||||
description:
|
||||
"Get usage metrics and crash reports. Improve your users' experience",
|
||||
keywords:
|
||||
"bugout, bugout-dev, bugout.dev, usage-metrics, analytics, dev-tool ,knowledge, docs, journal, entry, find-anything",
|
||||
url: "https://bugout.dev",
|
||||
image:
|
||||
"https://s3.amazonaws.com/static.simiotics.com/landing/aviator-2.svg",
|
||||
};
|
||||
|
||||
const assetPreload = Object.keys(assets).map((key) => {
|
||||
return {
|
||||
rel: "preload",
|
||||
href: assets[key],
|
||||
as: "image",
|
||||
};
|
||||
});
|
||||
const preconnects = [
|
||||
{ rel: "preconnect", href: "https://s3.amazonaws.com" },
|
||||
{ rel: "preconnect", href: "https://assets.calendly.com/" },
|
||||
];
|
||||
|
||||
const preloads = assetPreload.concat(preconnects);
|
||||
|
||||
return {
|
||||
props: { metaTags, preloads },
|
||||
};
|
||||
}
|
||||
|
||||
Homepage.layout = "default";
|
||||
Homepage.getLayout = getLayout;
|
||||
|
||||
export default Homepage;
|
|
@ -0,0 +1,10 @@
|
|||
<svg width="71" height="55" viewBox="0 0 71 55" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0)">
|
||||
<path d="M60.1045 4.8978C55.5792 2.8214 50.7265 1.2916 45.6527 0.41542C45.5603 0.39851 45.468 0.440769 45.4204 0.525289C44.7963 1.6353 44.105 3.0834 43.6209 4.2216C38.1637 3.4046 32.7345 3.4046 27.3892 4.2216C26.905 3.0581 26.1886 1.6353 25.5617 0.525289C25.5141 0.443589 25.4218 0.40133 25.3294 0.41542C20.2584 1.2888 15.4057 2.8186 10.8776 4.8978C10.8384 4.9147 10.8048 4.9429 10.7825 4.9795C1.57795 18.7309 -0.943561 32.1443 0.293408 45.3914C0.299005 45.4562 0.335386 45.5182 0.385761 45.5576C6.45866 50.0174 12.3413 52.7249 18.1147 54.5195C18.2071 54.5477 18.305 54.5139 18.3638 54.4378C19.7295 52.5728 20.9469 50.6063 21.9907 48.5383C22.0523 48.4172 21.9935 48.2735 21.8676 48.2256C19.9366 47.4931 18.0979 46.6 16.3292 45.5858C16.1893 45.5041 16.1781 45.304 16.3068 45.2082C16.679 44.9293 17.0513 44.6391 17.4067 44.3461C17.471 44.2926 17.5606 44.2813 17.6362 44.3151C29.2558 49.6202 41.8354 49.6202 53.3179 44.3151C53.3935 44.2785 53.4831 44.2898 53.5502 44.3433C53.9057 44.6363 54.2779 44.9293 54.6529 45.2082C54.7816 45.304 54.7732 45.5041 54.6333 45.5858C52.8646 46.6197 51.0259 47.4931 49.0921 48.2228C48.9662 48.2707 48.9102 48.4172 48.9718 48.5383C50.038 50.6034 51.2554 52.5699 52.5959 54.435C52.6519 54.5139 52.7526 54.5477 52.845 54.5195C58.6464 52.7249 64.529 50.0174 70.6019 45.5576C70.6551 45.5182 70.6887 45.459 70.6943 45.3942C72.1747 30.0791 68.2147 16.7757 60.1968 4.9823C60.1772 4.9429 60.1437 4.9147 60.1045 4.8978ZM23.7259 37.3253C20.2276 37.3253 17.3451 34.1136 17.3451 30.1693C17.3451 26.225 20.1717 23.0133 23.7259 23.0133C27.308 23.0133 30.1626 26.2532 30.1066 30.1693C30.1066 34.1136 27.28 37.3253 23.7259 37.3253ZM47.3178 37.3253C43.8196 37.3253 40.9371 34.1136 40.9371 30.1693C40.9371 26.225 43.7636 23.0133 47.3178 23.0133C50.9 23.0133 53.7545 26.2532 53.6986 30.1693C53.6986 34.1136 50.9 37.3253 47.3178 37.3253Z" fill="#5865F2"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0">
|
||||
<rect width="71" height="55" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
Po Szerokość: | Wysokość: | Rozmiar: 2.0 KiB |
|
@ -0,0 +1,145 @@
|
|||
import React, { useEffect, useRef, useContext } from "react";
|
||||
import {
|
||||
Flex,
|
||||
Heading,
|
||||
Button,
|
||||
Link,
|
||||
SimpleGrid,
|
||||
useBreakpointValue,
|
||||
} from "@chakra-ui/react";
|
||||
import Xarrow, { useXarrow } from "react-xarrows";
|
||||
import UIContext from "../core/providers/UIProvider/context";
|
||||
|
||||
const ArrowCTA = (props) => {
|
||||
const ui = useContext(UIContext);
|
||||
const box0Ref = useRef(null);
|
||||
const box1Ref = useRef(null);
|
||||
const box2Ref = useRef(null);
|
||||
const box3Ref = useRef(null);
|
||||
|
||||
const gridSetup = useBreakpointValue({
|
||||
base: "column",
|
||||
sm: "horizontal",
|
||||
md: "grid",
|
||||
lg: "grid",
|
||||
xl: "grid",
|
||||
"2xl": "grid",
|
||||
});
|
||||
|
||||
const updateXarrow = useXarrow();
|
||||
|
||||
useEffect(() => {
|
||||
updateXarrow();
|
||||
}, [ui.isMobileView]);
|
||||
|
||||
return (
|
||||
<SimpleGrid
|
||||
columns={[1, 2, 3, null, 3]}
|
||||
spacing={[10, 0, 10, null, 10]}
|
||||
placeItems="center"
|
||||
w="100%"
|
||||
_after={{}}
|
||||
>
|
||||
<Flex
|
||||
gridColumn={[1, 1, 2, null, 2]}
|
||||
gridRow={[1, 2, 1, null, 1]}
|
||||
// mb={14}
|
||||
w={["180px", "180px", "250px", null, "250px"]}
|
||||
// ml="16px"
|
||||
placeSelf="center"
|
||||
placeContent="center"
|
||||
>
|
||||
<Heading m={0} ref={box0Ref} fontSize={["lg", "lg", "lg", null, "lg"]}>
|
||||
{props.title}
|
||||
</Heading>
|
||||
</Flex>
|
||||
|
||||
<Button
|
||||
as={props.button1.link && Link}
|
||||
href={props.button1.link ?? null}
|
||||
gridColumn={[1, 2, 1, null, 1]}
|
||||
gridRow={[2, 1, 2, null, 2]}
|
||||
zIndex={10}
|
||||
ref={box1Ref}
|
||||
boxShadow="md"
|
||||
variant="solid"
|
||||
colorScheme="suggested"
|
||||
className="MoonStockSpeciality element1"
|
||||
w={["180px", "180px", "250px", null, "250px"]}
|
||||
onClick={props.button1.onClick}
|
||||
>
|
||||
{props.button1.label}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
as={props.button2.link && Link}
|
||||
href={props.button2.link ?? null}
|
||||
gridColumn={[1, 2, 2, null, 2]}
|
||||
gridRow={[3, 2, 2, null, 2]}
|
||||
zIndex={10}
|
||||
ref={box2Ref}
|
||||
boxShadow="md"
|
||||
variant="solid"
|
||||
colorScheme="secondary"
|
||||
className="MoonStockSpeciality element2"
|
||||
w={["180px", "180px", "250px", null, "250px"]}
|
||||
onClick={props.button2.onClick}
|
||||
>
|
||||
{props.button2.label}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
as={props.button3.link && Link}
|
||||
href={props.button3.link ?? null}
|
||||
gridColumn={[1, 2, 3, null, 3]}
|
||||
gridRow={[4, 3, 2, null, 2]}
|
||||
zIndex={10}
|
||||
ref={box3Ref}
|
||||
boxShadow="md"
|
||||
variant="solid"
|
||||
colorScheme="primary"
|
||||
w={["180px", "180px", "250px", null, "250px"]}
|
||||
onClick={props.button3.onClick}
|
||||
>
|
||||
{props.button3.label}
|
||||
</Button>
|
||||
<Xarrow
|
||||
// showXarrow={!!box0Ref.current && !!box1Ref.current}
|
||||
dashness={{
|
||||
strokeLen: 10,
|
||||
nonStrokeLen: 15,
|
||||
animation: -2,
|
||||
}}
|
||||
// animateDrawing={true}
|
||||
color="#92D050"
|
||||
showHead={false}
|
||||
start={box0Ref} //can be react ref
|
||||
end={box1Ref} //or an id
|
||||
/>
|
||||
<Xarrow
|
||||
dashness={{
|
||||
strokeLen: 10,
|
||||
nonStrokeLen: 15,
|
||||
animation: -1,
|
||||
}}
|
||||
color="#FD5602"
|
||||
showHead={false}
|
||||
start={box0Ref} //can be react ref
|
||||
end={box2Ref} //or an id
|
||||
/>
|
||||
<Xarrow
|
||||
dashness={{
|
||||
strokeLen: 10,
|
||||
nonStrokeLen: 15,
|
||||
animation: -4,
|
||||
}}
|
||||
color="#212990"
|
||||
showHead={false}
|
||||
start={box0Ref} //can be react ref
|
||||
end={box3Ref} //or an id
|
||||
/>
|
||||
</SimpleGrid>
|
||||
);
|
||||
};
|
||||
|
||||
export default ArrowCTA;
|
|
@ -0,0 +1,205 @@
|
|||
import {
|
||||
Container,
|
||||
SimpleGrid,
|
||||
Image,
|
||||
Flex,
|
||||
Heading,
|
||||
Text,
|
||||
Stack,
|
||||
StackDivider,
|
||||
Icon,
|
||||
useColorModeValue,
|
||||
Button,
|
||||
Center,
|
||||
useBreakpointValue,
|
||||
} from "@chakra-ui/react";
|
||||
// import Xarrow, { useXarrow } from "react-xarrows";
|
||||
import React, { useContext, useEffect } from "react";
|
||||
import UIContext from "../core/providers/UIProvider/context";
|
||||
|
||||
const Feature = ({ text, icon, iconBg, bullets }) => {
|
||||
// const updateXarrow = useXarrow();
|
||||
useEffect(() => {
|
||||
// updateXarrow();
|
||||
}, []);
|
||||
console.log("bullets;", bullets);
|
||||
return (
|
||||
<Flex direction="column">
|
||||
<Stack direction={"row"} align={"center"}>
|
||||
<Flex
|
||||
w={8}
|
||||
maxW={8}
|
||||
maxH={8}
|
||||
h={8}
|
||||
flexShrink={0}
|
||||
align={"center"}
|
||||
justify={"center"}
|
||||
rounded={"full"}
|
||||
bg={iconBg}
|
||||
>
|
||||
{icon}
|
||||
</Flex>
|
||||
<Text fontWeight={600}>{text}</Text>
|
||||
</Stack>
|
||||
{bullets?.length > 0 && (
|
||||
<Stack pt={8} pl={8} direction={"column"} spacing={2}>
|
||||
{bullets.map((bullet, idx) => {
|
||||
return (
|
||||
<Feature
|
||||
key={`nested-bullet-${idx}-${bullet.text}`}
|
||||
iconBg={bullet.bgColor}
|
||||
text={bullet.text}
|
||||
{...bullet}
|
||||
icon={
|
||||
<Icon as={bullet.icon} color={bullet.color} w={5} h={5} />
|
||||
}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</Stack>
|
||||
)}
|
||||
</Flex>
|
||||
);
|
||||
};
|
||||
|
||||
const SplitWithImage = ({
|
||||
badge,
|
||||
title,
|
||||
body,
|
||||
bullets,
|
||||
colorScheme,
|
||||
imgURL,
|
||||
mirror,
|
||||
elementName,
|
||||
cta,
|
||||
}) => {
|
||||
const buttonSize = useBreakpointValue({
|
||||
base: "md",
|
||||
sm: "md",
|
||||
md: "md",
|
||||
lg: "lg",
|
||||
xl: "xl",
|
||||
"2xl": "xl",
|
||||
});
|
||||
|
||||
const ui = useContext(UIContext);
|
||||
// const updateXarrow = useXarrow();
|
||||
const iconBgColor = useColorModeValue(
|
||||
`${colorScheme}.100`,
|
||||
`${colorScheme}.900`
|
||||
);
|
||||
|
||||
const [isVisible, setVisible] = React.useState(true);
|
||||
const domRef = React.useRef();
|
||||
React.useEffect(() => {
|
||||
const observer = new IntersectionObserver((entries) => {
|
||||
entries.forEach((entry) => setVisible(entry.isIntersecting));
|
||||
});
|
||||
observer.observe(domRef.current);
|
||||
const current = domRef.current;
|
||||
return () => observer.unobserve(current);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Container
|
||||
maxW={"7xl"}
|
||||
py={0}
|
||||
className={`fade-in-section ${isVisible ? "is-visible" : ""}`}
|
||||
ref={domRef}
|
||||
// onAnimationIteration={() => updateXarrow()}
|
||||
>
|
||||
<SimpleGrid columns={{ base: 1, md: 2 }} spacing={[0, 0, 10, null, 10]}>
|
||||
{mirror && !ui.isMobileView && (
|
||||
<Flex>
|
||||
<Image
|
||||
rounded={"md"}
|
||||
alt={"feature image"}
|
||||
src={imgURL}
|
||||
objectFit={"contain"}
|
||||
/>
|
||||
</Flex>
|
||||
)}
|
||||
<Stack spacing={4}>
|
||||
<Text
|
||||
id={`MoonBadge ${elementName}`}
|
||||
// id={`MoonBadge${elementName}`}
|
||||
textTransform={"uppercase"}
|
||||
color={useColorModeValue(`${colorScheme}.50`, `${colorScheme}.900`)}
|
||||
fontWeight={600}
|
||||
fontSize={"sm"}
|
||||
bg={useColorModeValue(`${colorScheme}.900`, `${colorScheme}.50`)}
|
||||
p={2}
|
||||
alignSelf={mirror && !ui.isMobileView ? "flex-end" : "flex-start"}
|
||||
rounded={"md"}
|
||||
>
|
||||
{badge}
|
||||
</Text>
|
||||
{/* <Xarrow
|
||||
dashness={{
|
||||
strokeLen: 10,
|
||||
nonStrokeLen: 15,
|
||||
animation: -2,
|
||||
}}
|
||||
color="#212990"
|
||||
showHead={false}
|
||||
start={"CryptoTraderButton"} //can be react ref
|
||||
end={`MoonBadge ${elementName}`} //or an id
|
||||
/> */}
|
||||
<Heading>{title}</Heading>
|
||||
<Text color={`primary.500`} fontSize={"lg"}>
|
||||
{body}
|
||||
</Text>
|
||||
<Stack
|
||||
spacing={4}
|
||||
divider={
|
||||
<StackDivider
|
||||
borderColor={useColorModeValue("gray.100", "gray.700")}
|
||||
/>
|
||||
}
|
||||
>
|
||||
{bullets?.map((bullet, idx) => {
|
||||
console.log("bullet1", bullet?.bullets);
|
||||
return (
|
||||
<Feature
|
||||
key={`splitWImageBullet-${idx}-${title}`}
|
||||
icon={
|
||||
<Icon as={bullet.icon} color={bullet.color} w={5} h={5} />
|
||||
}
|
||||
iconBg={bullet.bgColor}
|
||||
text={bullet.text}
|
||||
bullets={bullet?.bullets}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
<Container>
|
||||
<Center>
|
||||
<Button
|
||||
colorScheme={colorScheme}
|
||||
variant="outline"
|
||||
mt={[0, 0, null, 16]}
|
||||
textTransform={"uppercase"}
|
||||
fontSize={["xs", "sm", "lg", null, "lg"]}
|
||||
size={buttonSize}
|
||||
>
|
||||
{cta}
|
||||
</Button>
|
||||
</Center>
|
||||
</Container>
|
||||
</Stack>
|
||||
</Stack>
|
||||
{(!mirror || ui.isMobileView) && (
|
||||
<Flex>
|
||||
<Image
|
||||
rounded={"md"}
|
||||
alt={"feature image"}
|
||||
src={imgURL}
|
||||
objectFit={"cover"}
|
||||
/>
|
||||
</Flex>
|
||||
)}
|
||||
</SimpleGrid>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
|
||||
export default SplitWithImage;
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
import { jsx } from "@emotion/react";
|
||||
import React from "@emotion/react";
|
||||
import { Scrollable, Footer } from "../components";
|
||||
import { getLayout as getSiteLayout } from "./index";
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import Footer from "../components/Footer"
|
||||
import Scrollable from "../components/Scrollable"
|
||||
import React from "react";
|
||||
import Footer from "../components/Footer";
|
||||
import Scrollable from "../components/Scrollable";
|
||||
import RootLayout from "./RootLayout";
|
||||
|
||||
const LayoutWrapper = ({ children }) => {
|
||||
|
|
|
@ -134,6 +134,7 @@
|
|||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
overflow-y: overlay !important;
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
/* ----- react-mde specific ------- */
|
||||
|
@ -183,4 +184,19 @@
|
|||
|
||||
code {
|
||||
white-space: pre-line !important;
|
||||
}
|
||||
|
||||
|
||||
.fade-in-section {
|
||||
opacity: 0;
|
||||
transform: translateY(5vh);
|
||||
visibility: hidden;
|
||||
transition: opacity 0.3s ease-out, transform 0.6s ease-out;
|
||||
will-change: opacity, visibility;
|
||||
}
|
||||
.fade-in-section.is-visible {
|
||||
|
||||
opacity: 1;
|
||||
transform: none;
|
||||
visibility: visible;
|
||||
}
|
|
@ -1153,7 +1153,7 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
|
||||
integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==
|
||||
|
||||
"@types/prop-types@*":
|
||||
"@types/prop-types@*", "@types/prop-types@^15.7.3":
|
||||
version "15.7.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.4.tgz#fcf7205c25dff795ee79af1e30da2c9790808f11"
|
||||
integrity sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==
|
||||
|
@ -3222,7 +3222,7 @@ lodash.truncate@^4.4.2:
|
|||
resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193"
|
||||
integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=
|
||||
|
||||
lodash@^4.17.13, lodash@^4.17.4:
|
||||
lodash@^4.17.13, lodash@^4.17.21, lodash@^4.17.4:
|
||||
version "4.17.21"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
|
||||
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
|
||||
|
@ -4084,6 +4084,15 @@ react-style-singleton@^2.1.0:
|
|||
invariant "^2.2.4"
|
||||
tslib "^1.0.0"
|
||||
|
||||
react-xarrows@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react-xarrows/-/react-xarrows-2.0.2.tgz#7555687612339eaefd4ed55fc5c63f2302726d9c"
|
||||
integrity sha512-tDlAqaxHNmy0vegW/6NdhoWyXJq1LANX/WUAlHyzoHe9BwFVnJPPDghmDjYeVr7XWFmBrVTUrHsrW7GKYI6HtQ==
|
||||
dependencies:
|
||||
"@types/prop-types" "^15.7.3"
|
||||
lodash "^4.17.21"
|
||||
prop-types "^15.7.2"
|
||||
|
||||
react@^17.0.2:
|
||||
version "17.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
|
||||
|
|
Ładowanie…
Reference in New Issue