Skip to content

Commit ef1ae42

Browse files
committed
landing update
1 parent c495272 commit ef1ae42

File tree

4 files changed

+61
-35
lines changed

4 files changed

+61
-35
lines changed

src/containers/Landing/HeroSection.tsx

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React from "react";
22
import { Plus_Jakarta_Sans } from "next/font/google";
33
import Link from "next/link";
4-
import { Stack, Flex, Button, Badge } from "@mantine/core";
4+
import { Stack, Flex, Button, Image } from "@mantine/core";
55
import styled from "styled-components";
6-
import { FaChevronRight, FaFire } from "react-icons/fa6";
6+
import { FaChevronRight } from "react-icons/fa6";
77

88
const plusJakartaSans = Plus_Jakarta_Sans({
99
subsets: ["latin-ext"],
@@ -105,28 +105,10 @@ export const HeroSection = () => {
105105
<StyledHeroSectionBody>
106106
<Stack flex="1" miw={250} mx="auto" align="center">
107107
<Link href="https://todiagram.com?ref=jsoncrack.com">
108-
<Badge
109-
fw={600}
110-
size="lg"
111-
variant="outline"
112-
color="red.5"
113-
leftSection={<FaFire />}
114-
tt="unset"
115-
visibleFrom="xs"
116-
>
117-
NEW: Now faster & more powerful ToDiagram.com
118-
</Badge>
119-
<Badge
120-
fw={600}
121-
size="sm"
122-
variant="outline"
123-
color="red.5"
124-
leftSection={<FaFire />}
125-
tt="unset"
126-
hiddenFrom="xs"
127-
>
128-
NEW: Now faster & more powerful ToDiagram.com
129-
</Badge>
108+
<Flex fz="sm" c="gray.8" gap="8" align="center">
109+
built by
110+
<Image src="/assets/todiagram_logo.png" alt="Todiagram Logo" h={14} />
111+
</Flex>
130112
</Link>
131113
<StyledHeroTitle>Visualize JSON into interactive graphs</StyledHeroTitle>
132114
<StyledHeroText>

src/containers/Landing/LovedBy.tsx

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from "react";
2-
import { Container, Flex, Text } from "@mantine/core";
2+
import { Button, Container, Flex, Text, Image } from "@mantine/core";
33
import styled from "styled-components";
44
import CountUp from "react-countup";
5-
import { FaGithub, FaHackerNews, FaProductHunt } from "react-icons/fa6";
5+
import { FaGithub, FaHackerNews, FaLinkedin, FaProductHunt, FaXTwitter } from "react-icons/fa6";
66

77
interface LovedByProps {
88
stars: number;
@@ -63,6 +63,42 @@ export const LovedBy = ({ stars }: LovedByProps) => {
6363
return (
6464
<Container pos="relative" mx="auto" p={30} fluid>
6565
<Featured stars={stars} />
66+
<Flex wrap="wrap" justify="center" gap="md" mt="md">
67+
<Button
68+
component="a"
69+
href="https://twitter.com/intent/post?text=Looking%20to%20understand%20or%20explore%20some%20JSON%3F%20Just%20paste%20or%20upload%20to%20visualize%20it%20as%20a%20graph%20with%20https%3A%2F%2Fjsoncrack.com%20%F0%9F%98%8D%20"
70+
target="_blank"
71+
rel="noreferrer"
72+
color="black"
73+
leftSection={<FaXTwitter />}
74+
>
75+
Share on X
76+
</Button>
77+
<Button
78+
component="a"
79+
href="https://www.linkedin.com/feed/?shareActive=true&text=Looking%20to%20understand%20or%20explore%20some%20JSON%3F%20Just%20paste%20or%20upload%20to%20visualize%20it%20as%20a%20graph%20with%20https%3A%2F%2Fjsoncrack.com%20%F0%9F%98%8D%20"
80+
target="_blank"
81+
color="#0077B5"
82+
leftSection={<FaLinkedin />}
83+
>
84+
Share on LinkedIn
85+
</Button>
86+
<Button
87+
component="a"
88+
href="https://todiagram.com"
89+
color="#fe5e49"
90+
leftSection={
91+
<Image
92+
src="https://todiagram.com/logo.svg"
93+
alt="Todiagram Logo"
94+
h={14}
95+
style={{ filter: "brightness(0) saturate(100%) invert(100%)" }}
96+
/>
97+
}
98+
>
99+
ToDiagram
100+
</Button>
101+
</Flex>
66102
</Container>
67103
);
68104
};

src/layout/Navbar.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22
import Link from "next/link";
3-
import { Button, Flex, Image, Stack } from "@mantine/core";
3+
import { Button } from "@mantine/core";
44
import styled from "styled-components";
55
import { JSONCrackLogo } from "./JsonCrackLogo";
66

@@ -55,13 +55,7 @@ export const Navbar = () => {
5555
<StyledNavbarWrapper className="navbar">
5656
<StyledNavbar>
5757
<Left>
58-
<Stack gap="0">
59-
<JSONCrackLogo fontSize="1.2rem" />
60-
<Flex justify="right" align="center" gap="4" fz="8" fw="500" c="black">
61-
from
62-
<Image src="/assets/todiagram_logo.png" alt="Todiagram Logo" w={60} />
63-
</Flex>
64-
</Stack>
58+
<JSONCrackLogo fontSize="1.2rem" />
6559
</Left>
6660
<Center>
6761
<Button

src/pages/index.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
import React from "react";
2+
import type { InferGetStaticPropsType, GetStaticProps } from "next";
23
import { NextSeo, SoftwareAppJsonLd } from "next-seo";
34
import { SEO } from "src/constants/seo";
45
import { FAQ } from "src/containers/Landing/FAQ";
56
import { Features } from "src/containers/Landing/Features";
67
import { HeroPreview } from "src/containers/Landing/HeroPreview";
78
import { HeroSection } from "src/containers/Landing/HeroSection";
9+
import { LovedBy } from "src/containers/Landing/LovedBy";
810
import { Section1 } from "src/containers/Landing/Section1";
911
import { SeePremium } from "src/containers/Landing/SeePremium";
1012
import Layout from "src/layout/Layout";
1113

12-
export const HomePage = () => {
14+
export const HomePage = (props: InferGetStaticPropsType<typeof getStaticProps>) => {
1315
return (
1416
<Layout>
1517
<NextSeo {...SEO} canonical="https://jsoncrack.com" />
@@ -27,9 +29,21 @@ export const HomePage = () => {
2729
<Section1 />
2830
<Features />
2931
<SeePremium />
32+
<LovedBy stars={props.stars} />
3033
<FAQ />
3134
</Layout>
3235
);
3336
};
3437

3538
export default HomePage;
39+
40+
export const getStaticProps = (async () => {
41+
const res = await fetch("https://api.github.com/repos/AykutSarac/jsoncrack.com");
42+
const data = await res.json();
43+
44+
return {
45+
props: {
46+
stars: data.stargazers_count,
47+
},
48+
};
49+
}) satisfies GetStaticProps<{ stars: number }>;

0 commit comments

Comments
 (0)