Skip to content

Commit 5674346

Browse files
committed
update herosection
1 parent f0b2a1d commit 5674346

File tree

2 files changed

+28
-14
lines changed

2 files changed

+28
-14
lines changed

Diff for: src/layout/Landing/HeroSection.tsx

+27-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import React from "react";
2-
import { Plus_Jakarta_Sans } from "next/font/google";
2+
import { Oxygen } from "next/font/google";
3+
import Link from "next/link";
34
import { Stack, Flex, Button } from "@mantine/core";
45
import styled from "styled-components";
5-
import { FaChevronRight } from "react-icons/fa6";
6+
import { FaChevronRight, FaGithub, FaStar } from "react-icons/fa6";
67

7-
const plusJakartaSans = Plus_Jakarta_Sans({
8+
const oxygen = Oxygen({
89
subsets: ["latin-ext"],
10+
weight: ["700"],
911
});
1012

1113
const StyledHeroSection = styled.main`
@@ -56,9 +58,7 @@ const StyledHeroTitle = styled.h1`
5658
width: fit-content;
5759
line-height: 1.15;
5860
max-width: 30rem;
59-
letter-spacing: -0.75px;
60-
word-spacing: 6px;
61-
font-family: ${plusJakartaSans.style.fontFamily};
61+
font-family: ${oxygen.style.fontFamily};
6262
6363
@media only screen and (min-width: 576px) {
6464
font-size: 3.4rem;
@@ -100,11 +100,28 @@ const StyledHeroText = styled.h2`
100100
}
101101
`;
102102

103-
export const HeroSection = () => {
103+
export const HeroSection = ({ stars = 0 }) => {
104104
return (
105105
<StyledHeroSection>
106106
<StyledHeroSectionBody>
107107
<Stack flex="1" miw={250} mx="auto" align="center">
108+
<Link href="https://github.com/AykutSarac/jsoncrack.com" target="_blank" rel="noopener">
109+
<Button
110+
variant="default"
111+
radius="xl"
112+
ta="left"
113+
leftSection={<FaGithub size="18" />}
114+
rightSection={
115+
<Flex ml="sm" c="dimmed" align="center" gap="4">
116+
<FaStar />
117+
{stars}
118+
</Flex>
119+
}
120+
>
121+
GitHub
122+
</Button>
123+
</Link>
124+
108125
<StyledHeroTitle>Visualize JSON into interactive graphs</StyledHeroTitle>
109126
<StyledHeroText>
110127
The best online JSON viewer to <strong>visualize</strong>, <strong>format</strong> and{" "}
@@ -120,7 +137,7 @@ export const HeroSection = () => {
120137
radius="md"
121138
rightSection={<FaChevronRight />}
122139
fw="500"
123-
mt="lg"
140+
mt="sm"
124141
>
125142
Go to Editor
126143
</Button>
@@ -130,11 +147,10 @@ export const HeroSection = () => {
130147
component="a"
131148
color="#202842"
132149
href="/editor"
133-
size="lg"
150+
size="xl"
134151
radius="md"
135152
rightSection={<FaChevronRight />}
136-
fw="500"
137-
mt="lg"
153+
mt="sm"
138154
>
139155
Go to Editor
140156
</Button>

Diff for: src/pages/index.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { FAQ } from "../layout/Landing/FAQ";
66
import { Features } from "../layout/Landing/Features";
77
import { HeroPreview } from "../layout/Landing/HeroPreview";
88
import { HeroSection } from "../layout/Landing/HeroSection";
9-
import { LovedBy } from "../layout/Landing/LovedBy";
109
import { Section1 } from "../layout/Landing/Section1";
1110
import { Section2 } from "../layout/Landing/Section2";
1211
import { Section3 } from "../layout/Landing/Section3";
@@ -16,13 +15,12 @@ export const HomePage = (props: InferGetStaticPropsType<typeof getStaticProps>)
1615
return (
1716
<Layout>
1817
<NextSeo {...SEO} canonical="https://jsoncrack.com" />
19-
<HeroSection />
18+
<HeroSection stars={props.stars} />
2019
<HeroPreview />
2120
<Section1 />
2221
<Section2 />
2322
<Section3 />
2423
<Features />
25-
<LovedBy stars={props.stars} />
2624
<FAQ />
2725
</Layout>
2826
);

0 commit comments

Comments
 (0)