Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
konfig-bot committed Oct 18, 2023
1 parent 2ae0e5f commit 9433b37
Show file tree
Hide file tree
Showing 3 changed files with 166 additions and 20 deletions.
42 changes: 22 additions & 20 deletions konfigthis.com/src/components/SdkFeatures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
IconBook,
IconCode,
IconMouse,
IconPhoto,
TablerIconsProps,
} from "@tabler/icons-react";
import { useGraphicStyles } from "@/utils/use-graphic-styles";
Expand All @@ -27,7 +26,6 @@ export const useFeatureStyles = createStyles((theme) => ({
content: { position: "relative", zIndex: 2 },
feature: {
borderRadius: theme.radius.lg,
width: 300,
color: "white",
padding: theme.spacing.xl,
border: "1px solid",
Expand All @@ -40,24 +38,10 @@ export const useFeatureStyles = createStyles((theme) => ({

// scale by 3%
transform: "scale(1.01)",

// gradient background
background: theme.fn.linearGradient(
50,
theme.fn.darken("#1b354e", 0.4),
theme.fn.darken("#1b354e", 0.6)
),
},
},
title: {
":after": {
content: '""',
display: "block",
backgroundColor: "blue",
width: 20,
height: 5,
marginTop: "sm",
},
borderBottom: `1.5px solid hsl(225 36% 60% / 1)`,
},
graphic: {
position: "absolute",
Expand Down Expand Up @@ -93,8 +77,13 @@ export function SdkFeatures() {
crafted SDKs
</Title>
</Box>
<Flex justify="space-between" gap="xl">
<Flex
className={"items-center flex-col md:flex-row"}
justify="space-between"
gap="xl"
>
<Feature
gradientAngle={50}
title="Documentation"
description="All your SDKs come with branded and well-written READMEs that makes it easy for developers to get started."
Icon={IconBook}
Expand All @@ -104,6 +93,7 @@ export function SdkFeatures() {
}}
/>
<Feature
gradientAngle={230}
title="Ergonomic"
description="We make sure your SDKs are easy to use and follow the best practices of the language they are written in."
Icon={IconMouse}
Expand All @@ -113,6 +103,7 @@ export function SdkFeatures() {
}}
/>
<Feature
gradientAngle={160}
title="Customization"
description="We made it easy to add custom code to your SDKs so you can add features like streaming, request signing, or polling."
Icon={IconCode}
Expand All @@ -133,19 +124,30 @@ function Feature({
description,
link,
Icon,
gradientAngle,
}: {
title: string;
description: string;
link: { label: string; href: string };
Icon: (props: TablerIconsProps) => JSX.Element;
gradientAngle: number;
}) {
const theme = useMantineTheme();
const {
classes: { feature },
classes: { feature, title: titleClass },
cx,
} = useFeatureStyles();
return (
<UnstyledButton
sx={{
":hover": {
background: theme.fn.linearGradient(
gradientAngle,
theme.fn.darken("#1b354e", 0.4),
theme.fn.darken("#1b354e", 0.6)
),
},
}}
target="_blank"
href={link.href}
component="a"
Expand All @@ -155,7 +157,7 @@ function Feature({
<Icon />
</ThemeIcon>
<Title mb="sm" order={3}>
{title}
<span className={cx(titleClass, "pb-1")}>{title}</span>
</Title>
<Text c={theme.colors.gray[5]} fw={400} mb="xl">
{description}
Expand Down
142 changes: 142 additions & 0 deletions konfigthis.com/src/components/UpdatingDocs.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
import {
Text,
Title,
Box,
Stack,
Anchor,
createStyles,
Flex,
} from "@mantine/core";

import "reactflow/dist/style.css";
import { useGraphicStyles } from "@/utils/use-graphic-styles";

export const useSectionStyles = createStyles((theme) => ({
section: {
background: theme.colors.gray[1],
color: theme.white,
},
sectionInner: {
paddingLeft: "1rem",
paddingRight: "1rem",
maxWidth: 1100,
position: "relative",
margin: "auto",
},
diagram: {
maxWidth: "100%",
backgroundColor: theme.colors.gray[1],
width: 1500,
borderRadius: theme.radius.lg,
boxShadow: theme.shadows.lg,
height: 300,
[theme.fn.smallerThan("sm")]: {
height: 500,
},
},
paddingTop: {
paddingTop: 300,
},
paddingBottom: {
paddingBottom: 300,
},
title: {
fontSize: 35,
fontWeight: "normal",
marginBottom: 50,
order: 1,
},
titleHighlight: {
fontWeight: "bolder",
color: theme.black,
borderBottom: "4px solid hsl(214 36% 58% / 1)",
},
textSection: {
position: "relative",
marginBottom: 70,
},
textLayer: {
position: "relative",
zIndex: 2,
},
content: {},
graphicLayer: {
position: "absolute",
zIndex: 1,
width: 200,
height: 200,
},
topRight: {
right: 0,
top: -50,
},
bottomRight: {
right: 0,
bottom: -50,
},
link: {
color: theme.black,
fontWeight: 600,
textDecoration: "none !important",
borderBottom: `1px solid ${theme.colors.blue[8]}`,
wordWrap: "break-word",
":hover": {
borderBottomWidth: "2px",
},
},
}));

export function UpdatingDocs() {
const { classes, cx } = useSectionStyles();
const {
classes: { texture },
} = useGraphicStyles();

return (
<Box
className={cx(classes.section, classes.paddingBottom, classes.paddingTop)}
>
<Box className={classes.sectionInner}>
<Flex
className={classes.content}
gap="xl"
direction={{ base: "column", sm: "row" }}
>
<Box className={cx("text-gray-800", classes.textSection)}>
{/* <div
className={cx(
classes.graphicLayer,
classes.topRight,
texture,
"w-200 h-200"
)}
/> */}
<Box className={classes.textLayer}>
<Title className="text-blue-900" order={6}>
Documentation
</Title>
<Title className={classes.title}>
API Docs & References that{" "}
<span className="text-black font-bold border-t-0 border-l-0 border-r-0 border-b-4 border-solid border-blue-900">
auto-update
</span>
</Title>
<div className="text-lg">
Ensure your docs and SDKs are always in sync with a single
source of truth. Any time you publish a change to your spec,
Konfig{" "}
<Anchor
className={classes.link}
target="_blank"
href="https://konfigthis.com/docs/tutorials/automate-sdk-updates"
>
automatically updates your docs
</Anchor>
</div>
</Box>
</Box>
</Flex>
</Box>
</Box>
);
}
2 changes: 2 additions & 0 deletions konfigthis.com/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { HeroBullets } from "@/components/HeroBullets/HeroBullets";
import { Quotes } from "@/components/Quotes/Quotes";
import { SdkFeatures } from "@/components/SdkFeatures";
import { TrustedBy } from "@/components/TrustedBy/TrustedBy";
import { UpdatingDocs } from "@/components/UpdatingDocs";
import { Box } from "@mantine/core";
import Head from "next/head";

Expand Down Expand Up @@ -34,6 +35,7 @@ export default function Home() {
{/* <GetSdksInAnyLanguage /> */}
<EnsureHighQualitySdks />
<SdkFeatures />
<UpdatingDocs />
<Quotes />
<Cta />
<FooterSimple
Expand Down

0 comments on commit 9433b37

Please sign in to comment.